You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Measure the file-cache floor of the suggested budget on real builds #70
The suggested budget of a capped measurement keeps a floor for file cache of a quarter of the full peak (CACHE_FLOOR_DIVISOR = 4 in bounded_run.py, from #59). That value is reasoned, not measured. If it is too low, a command that reads many files again and again (a build, a type check, a development server) thrashes under its new, smaller cap and runs much slower. If it is too high, budgets stay above the need and hold slots that other sessions could use.
Approach
Measure two or three real heavy commands that read and write many files, under caps at several multiples of their held peak, and compare wall time with a run at the old budget. Keep the divisor if the runs at the floor are close to the old time. Otherwise change it, and write the measurements in the PR.
Acceptance criteria
Measurements of at least two such commands, with the cap, the wall time, and the peak and held lines.
CACHE_FLOOR_DIVISOR is kept or changed on that evidence, and the skill's sentence about the floor still matches.
I measured six real heavy commands on a 16-processor Linux machine with 27 GiB of memory, under the hard cap, at --cpus 8. Before each timed run, a script dropped the page cache of the source, module, and toolchain files (posix_fadviseDONTNEED), so that each run read its files from the disk. Each Go build that the table calls cold started with an empty GOCACHE. The wall time is the time of the command only, not the wait in the queue. Other agent sessions ran on the machine at the same time (load average 8 to 9), so a difference of about 5 seconds is noise.
The floor did not bind for any command
The floor applies only when held is less than a quarter of peak. For each command, held was more than that.
command
peak
held
peak / 4
Go build of a large operator, cold
3720M, 4536M
1985M, 1905M
1134M or less
the same build, warm GOCACHE
2362M
1060M
590M
the Go test compile of the same module (go test -run '^$' -exec /bin/true ./...), cold
The cold build does not slow down at any cap down to 1792M. The warm build reads the files of its cache again and again, and it slows down when its cap is near held. A budget from a cold measurement (3072M) keeps the warm build at full speed. A budget from a warm measurement (1792M) makes it about 35% slower. A change of the divisor does not change that budget: with a divisor of 2 or more, the floor stays below _with_margin(held).
The divisor stays at 4. The sentence about the floor in the skill still matches the code, so the skill does not change.
Activity
sourcehawk commentedon Oct 6, 2026
Result: keep
CACHE_FLOOR_DIVISOR = 4I measured six real heavy commands on a 16-processor Linux machine with 27 GiB of memory, under the hard cap, at
--cpus 8. Before each timed run, a script dropped the page cache of the source, module, and toolchain files (posix_fadviseDONTNEED), so that each run read its files from the disk. Each Go build that the table calls cold started with an emptyGOCACHE. The wall time is the time of the command only, not the wait in the queue. Other agent sessions ran on the machine at the same time (load average 8 to 9), so a difference of about 5 seconds is noise.The floor did not bind for any command
The floor applies only when
heldis less than a quarter ofpeak. For each command,heldwas more than that.GOCACHEgo test -run '^$' -exec /bin/true ./...), coldtsc --noEmitof a Next.js appRow lines of the first measurements:
The type check exits 2 because the app has type errors. It did its full work and reported them.
Wall time under smaller caps
Three runs at each cap, in turn:
peak, before #67)GOCACHEThe cold build does not slow down at any cap down to 1792M. The warm build reads the files of its cache again and again, and it slows down when its cap is near
held. A budget from a cold measurement (3072M) keeps the warm build at full speed. A budget from a warm measurement (1792M) makes it about 35% slower. A change of the divisor does not change that budget: with a divisor of 2 or more, the floor stays below_with_margin(held).The divisor stays at 4. The sentence about the floor in the skill still matches the code, so the skill does not change.