How much space is needed to prune

Hi!

I’m in the same situation: lack of available space in order to perform the prune. I decided to give prune-aggressive a chance, it seems to be OK for now:

# run-restic.sh prune
repository f61db6ba opened successfully, password is correct
counting files in repo
building new index for repo
[4:01:26] 100.00%  2256424 / 2256424 packs
repository contains 2256424 packs (79874147 blobs) with 10.094 TiB
processed 79874147 blobs: 13891697 duplicate blobs, 1.760 TiB duplicate
load all snapshots
find data that is still in use for 17 snapshots
[1:55:21] 100.00%  17 / 17 snapshots
found 24423103 of 79874147 data blobs still in use, removing 55451044 blobs
will remove 0 invalid files
will delete 502926 packs and rewrite 1362261 packs, this frees 6.699 TiB
[2:22:46] 100.00%  502926 / 502926 packs deleted
[18:06:02] 21.51%  292961 / 1362261 packs rewritten
...

That said, I faced a problem due to the high memory usage of the prune command (both with regular version and prune-aggressive version), so that the restic prune has been oomkilled.

# cat /proc/139267/status
Name:   restic
State:  S (sleeping)
Tgid:   139267
Pid:    139267
PPid:   139266
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
Utrace: 0
FDSize: 256
Groups: 0
VmPeak: 40166480 kB
VmSize: 40166480 kB
VmLck:         0 kB
VmHWM:  30972256 kB
VmRSS:  24122140 kB
VmData: 40154560 kB
VmStk:        88 kB
VmExe:      6088 kB
VmLib:         0 kB
VmPTE:     78240 kB
VmSwap:  3290432 kB
Threads:        54
SigQ:   2/127888
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: fffffffe7fc1feff
CapInh: 0000000000000000
CapPrm: ffffffffffffffff
CapEff: ffffffffffffffff
CapBnd: ffffffffffffffff
Cpus_allowed:   ffff,ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list:      0-143
Mems_allowed:   00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003
Mems_allowed_list:      0-1
voluntary_ctxt_switches:        25294094
nonvoluntary_ctxt_switches:     448718

The server where restic is running on has 32 Gb of RAM.

BTW, this prune run has a lot of job to do because I missed to add the ‘–prune’ option with the ‘forget’ command.


Olivier