Repository & SSH Tuning
Managing borg compact Segment Reclaim & Free-Space Headroom
Understand why borg prune alone does not free slice disk space until borg compact runs, and size 15% free slice headroom for segment rewriting.
15% Free Slice Margin · 1.65x Index Peak · Zero S3 Fees
Why Prune Alone Leaves Storage Slices Full
In Borg 1.2+, prune only marks deleted chunks inside repository segments without rewriting multi-megabyte data files. Borgmatic automatically chains compact after prune unless disabled, reclaiming dead space on your InterServer Storage Slice.
Why Compaction Breaks Glacier Early-Deletion Economics
On AWS S3 Glacier Deep Archive, rewriting sparse segments deletes objects younger than 180 days and triggers early-deletion billing. On flat-rate $6/TB InterServer Slices, segment compaction costs $0.00.
Measured Thresholds & Borgmatic Configuration
| Phase | What Happens on Storage Slice | Disk & RAM Impact |
|---|---|---|
| borgmatic prune | Deletes archive manifests & decrements refcounts | Minimal RAM; 0% disk space freed yet |
| borgmatic compact | Rewrites sparse segments & drops unreferenced chunks | Reclaims full disk TB; needs ~10-15% free slice buffer |
| compact --threshold 10 | Skips rewriting segments <10% sparse | Cuts slice disk I/O by >60% on daily runs |