diff --git a/docs/scheduler/ci.md b/docs/scheduler/ci.md index 2640a155..bd3689bb 100644 --- a/docs/scheduler/ci.md +++ b/docs/scheduler/ci.md @@ -211,9 +211,17 @@ following to your host config: { # Daily GC: delete store paths not referenced by a live root and older # than a day. Keeps the store bounded between builds. + # + # `randomizedDelaySec` because a fixed daily time lands on the same wall + # clock as whatever else runs nightly. A collection that overlaps a CI + # job does not fail it — the runner builds through the host nix-daemon, + # so an in-flight build's temp roots are protected — but the first build + # after a collection rebuilds what the collection deleted, so a run that + # lands just behind one pays for it in wall time. nix.gc = { automatic = true; dates = "daily"; + randomizedDelaySec = "45min"; options = "--delete-older-than 1d"; }; @@ -231,6 +239,13 @@ following to your host config: store, so the same GC config should be applied wherever the builder runs — GC on the coordinator host won't reclaim space on the builder. +⚠️ Two stores also means the temp-root protection above **doesn't span +them**. Each daemon holds roots only for the builds it runs, so a +collection on the _builder_ knows nothing about a coordinator build +waiting on a path there. Stagger the two hosts' GC windows rather than +giving them the same `dates`, and prefer `min-free`/`max-free` on the +builder — disk-pressure collection at least runs while nothing is mid-copy. + ## References - `nix/host-modules/hive-ci.nix`: runner configuration, auto-registration script, container setup.