Repository & SSH Tuning
Borg chunks.archive.d & Chunk-Index Hashtable RAM Formula
Calculate exact resident RAM across 1M to 20M unique chunks (~62 MB/1M chunks) plus chunks.archive.d cache and 1.65x rehash surges.
~62 MB / 1M Chunks · 1.65x Rehash Surge · 20M = 2.25 GB
Breaking Down Repo Hashtable vs chunks.archive.d
Borg loads the repository chunk index into an open-addressing hash table in RAM (~62 MB per 1M unique chunks at 0.75 max load factor). In addition, the client maintains a local chunks.archive.d cache that grows with retained archive count.
Keeping Retention Lean to Cap Archive Cache Growth
Keeping 365 daily snapshots instead of keep_daily: 14 / keep_weekly: 8 / keep_monthly: 12 inflates chunks.archive.d disk and memory sync overhead. Prune aggressively on schedule so index sizes stay predictable.
Measured Thresholds & Borgmatic Configuration
| Unique Chunks in Repo | Core Hashtable (62 MB/1M) | Peak Compact / Check RSS |
|---|---|---|
| 1,000,000 chunks | ~62 MB | ~230 MB |
| 5,000,000 chunks | ~310 MB | ~815 MB |
| 10,000,000 chunks | ~620 MB | ~1,450 MB |
| 20,000,000 chunks | ~1,240 MB | ~2,750 MB |