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

The check's tsc gets a 6 GiB heap bound: under 2 GiB its collector never stopped, and tsc was a check's largest CPU cost #17285

opened this

Merged 39h 13m ago, live in production

vxrail at 23:20Z on 2026-12-01: checks p50 12.8 min (10.3 the hour before), load 145, and tsc the top process at 576% and 314%. Sampled every 2 s for 3 min, each check's tsc used about 450 CPU-seconds in about 40 s. The check's tsc is already TypeScript 7.0.2, the native compiler, so there is no faster tsgo to swap in.

Notes

opened this

vxrail at 23:20Z on 2026-12-01: checks p50 12.8 min (10.3 the hour before), load 145, and tsc the top process at 576% and 314%. Sampled every 2 s for 3 min, each check's tsc used about 450 CPU-seconds in about 40 s.

The check's tsc is already TypeScript 7.0.2, the native compiler, so there is no faster tsgo to swap in. The cost was its bound. forge.json runs it as GOMEMLIMIT=2GiB, set when a cold check was ~17 CPU-s. On today's tree its working set is about 3.5 GB, so under 2 GiB Go's collector runs without pause.

Cold, on one Mac, each run alone with the same 0 errors:

bound checkers wall CPU peak RSS 2 GiB 4 (deflt) 13.6 s 66.5 s 3.3 GB none 4 6.6 s 23.8 s 3.0 GB 6 GiB 4 6.8-8.4 30-31 s 3.7-3.8 GB 2 GiB 1 38.0 s 217.7 s 3.3 GB none 1 9.7 s 18.0 s 3.4 GB

  • forge.json (fast, run, full) and scripts/preflight.ts: GOMEMLIMIT=6GiB. That is above the working set with room to grow, and inside the check's 8 GiB cell. tsc runs alone in the && chain, so nothing else in the cell competes for it.
  • test/shards.test.ts asserts the new bound and says why. docs/DEVELOP.md gives the numbers.

Expected on the runners: tsc from ~450 to ~100-200 CPU-s per check, and its wall time with it. I'll compare the next hour's checks against this one.

Not in this commit (found while measuring): the incremental cache gives pulls almost nothing now. src/checks/cache.ts keeps .forge-cache only after a green default-branch check that ran on the forge itself (run_tier.ts). Since checks moved to outside runners at 19:05Z, nothing has written it. A pull is seeded with that 65-commit-old tsbuildinfo, and from it main costs 28 CPU-s against 31 cold. A fresh one costs 6.7. The fix is for a runner's green default-branch check to send its .forge-cache back. That is a separate pull.

No door: the check command's heap bound; nothing a person sees or sets Direction: CI speed: a check's largest CPU cost cut at its cause (#1864)

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs