Found while measuring #2018.
Repro: perf+hotpath build of dbf7f13, isolated HOME, XDG_RUNTIME_DIR=/run/user/1000 systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=1G -- tracedecay daemon run, then tracedecay init <clone of tracedecay @dbf7f13a25> (6,521 files).
Observed (twice; second run with TRACEDECAY_INDEX_WORKERS=8):
- daemon log:
daemon_resident_memory_over_budget observed_bytes=5994946560 limit_bytes=6442450944 (first run, ~35 s in), observed_bytes=5607731200 (second run, text artifact bulk_commit phase);
- journal:
run-u42567.scope: Failed with result 'oom-kill' / run-u42571.scope: Failed with result 'oom-kill' a few seconds later.
The daemon sees the cgroup limit and reports the high watermark, but the growth it admits before that point still exceeds the cap, so a first index of a 6.5k-file repo cannot complete inside the 6 GB scope agents are required to use. A 3.3k-file corpus (rsbuild) indexes fine under the same cap (RSS ~1.1 GB once the clone index was ready). Possibly related to #2050 (long-run growth), but this is the initial build.
Found while measuring #2018.
Repro: perf+hotpath build of dbf7f13, isolated
HOME,XDG_RUNTIME_DIR=/run/user/1000 systemd-run --user --scope -p MemoryMax=6G -p MemorySwapMax=1G -- tracedecay daemon run, thentracedecay init <clone of tracedecay @dbf7f13a25>(6,521 files).Observed (twice; second run with
TRACEDECAY_INDEX_WORKERS=8):daemon_resident_memory_over_budget observed_bytes=5994946560 limit_bytes=6442450944(first run, ~35 s in),observed_bytes=5607731200(second run, text artifactbulk_commitphase);run-u42567.scope: Failed with result 'oom-kill'/run-u42571.scope: Failed with result 'oom-kill'a few seconds later.The daemon sees the cgroup limit and reports the high watermark, but the growth it admits before that point still exceeds the cap, so a first index of a 6.5k-file repo cannot complete inside the 6 GB scope agents are required to use. A 3.3k-file corpus (rsbuild) indexes fine under the same cap (RSS ~1.1 GB once the clone index was ready). Possibly related to #2050 (long-run growth), but this is the initial build.