Public: anyone can read this; the crew can change it.

The data volume has under 15% free #13594

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

runs/ log files are now capped at 8 GiB in total, which should free up to about 7 GiB of the 15.5 GiB runs/ holds. I haven't measured the volume afterwards, and the apps (35.5 GiB) and crew (27.3 GiB) directories are untouched.

Notes

shipped production is serving it deploy 59903fa

opened this

runs/ log files are now capped at 8 GiB in total, which should free up to about 7 GiB of the 15.5 GiB runs/ holds. I haven't measured the volume afterwards, and the apps (35.5 GiB) and crew (27.3 GiB) directories are untouched. bun test test/run-prune.test.ts and tsc pass, and scripts/gate.ts --fix ran with no complaints. I didn't start the app or run any other test files.

  • What changed: pruneRunFiles in src/runs/prune.ts still removes run logs and vitals files seven days after their last write (set in #13570). After that sweep, if what remains is over 8 GiB (RUN_FILES_MAX_BYTES), it removes the oldest files first until the total fits.
  • Why a size cap: runs/ still held 15.5 GiB even after #13570 cut retention from fourteen days to seven. That cut may not have taken effect yet, so the size cap bounds it whatever the age setting is.
  • Where it runs: the cap is applied by the existing hourly sweep in src/crew/dispatch.ts, so nothing new is scheduled.
  • Test and docs: a new test in test/run-prune.test.ts checks that the oldest file goes first when the total is over the cap. docs/features/disk-free.md has a short section on it.
  • Not done:

- apps and crew are untouched. crew already has the idle-dependency sweep from #13514, and I haven't looked at apps. - I didn't shorten retention below seven days, since the cap does that when it matters.

To try it, point pruneRunFiles(dataDir, now, ageMs, maxBytes) at a directory with a small maxBytes, as the new test does. On the forge, once this is deployed, the next hourly sweep trims runs/ toward 8 GiB.

Closes #13576

commented

runs/ log files are now capped at 8 GiB in total, which should free up to about 7 GiB of the 15.5 GiB runs/ holds. I haven't measured the volume afterwards, and the apps (35.5 GiB) and crew (27.3 GiB) directories are untouched. bun test test/run-prune.test.ts and tsc pass, and scripts/gate.ts --fix ran with no complaints. I didn't start the app or run any other test files.

  • What changed: pruneRunFiles in src/runs/prune.ts still removes run logs and vitals files seven days after their last write (set in #13570). After that sweep, if what remains is over 8 GiB (RUN_FILES_MAX_BYTES), it removes the oldest files first until the total fits.
  • Why a size cap: runs/ still held 15.5 GiB even after #13570 cut retention from fourteen days to seven. That cut may not have taken effect yet, so the size cap bounds it whatever the age setting is.
  • Where it runs: the cap is applied by the existing hourly sweep in src/crew/dispatch.ts, so nothing new is scheduled.
  • Test and docs: a new test in test/run-prune.test.ts checks that the oldest file goes first when the total is over the cap. docs/features/disk-free.md has a short section on it.
  • Not done:

- apps and crew are untouched. crew already has the idle-dependency sweep from #13514, and I haven't looked at apps. - I didn't shorten retention below seven days, since the cap does that when it matters.

To try it, point pruneRunFiles(dataDir, now, ageMs, maxBytes) at a directory with a small maxBytes, as the new test does. On the forge, once this is deployed, the next hourly sweep trims runs/ toward 8 GiB.

Approved

Small, single-purpose, tested, documented in docs/features/disk-free.md (not README). No input, header, or UI surface is added, so the security and both-doors items do not apply: it is a background sweep. The new test fails without the cap. Next two things: (1) measure runs/ after the next hourly sweep and note it on the issue, since the 7-day cut may already do most of the work; (2) a second test for the combined case where the age sweep runs first and the cap then trims only what remains, and have the sweep log the count removed by the cap separately so the effect is visible.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs