Repository navigation
Closed
Description
Bar
with build :test's runner process must peak at ≤ 8GB. Today it needs 20–34GB and dies at the 32GiB emergency ceiling (#701). The ceiling is the "something is terribly wrong" line — it is not a budget, and the runner has been living against it.
Measured decomposition (2026-07-22)
- Fresh runner, one cached lane: 968MB peak — graph load + cache check baseline is fine.
- Seed runner, fully cached battery: 1.3 → 7.6GB before the first lane completes; then +0.5GB per cached lane; an
8GB jump in the1).selfcheckwindow; death at 34.2–34.4GB committed (with build :testdies at the 32GiB commit ceiling — in-process battery accumulation crossed the limit after the 2026-07-21 reseed (pre-existing at HEAD~1) #701, reproduced at HEAD - Post streaming-hash fix (removes ~5 leaked full-file copies per fingerprint), release runner on a rebuild run: 21.1GB observed mid-run — better, still ~3× the budget.
Why it accumulates
Everything the parent allocates is permanent, because scope-exit destruction does not yet free the POD tier (#608 — Vec/str buffers, ++ intermediates, extern-returned strings). On top of that base condition:
- Action targets comptime-evaluate in the parent — every kind-23 action's full interpreter allocation history is retained. Rebuild runs (all actions live) are the worst case.
- Cache fingerprinting reads whole input files — each read buffer (100MB+ binaries) is retained; the
++amplifier is fixed, the reads remain. - Graph load / bookkeeping baseline ~1GB.
Fix paths
- Campaign: the wide flip — containers own their buffers (POD-element drop elaboration) #691 (the flip) is the structural fix: with scope-exit destruction, (1)–(3) become transient and the parent should sit near the 1GB baseline. This issue is a concrete acceptance test for the flip: post-flip, full battery parent peak ≤ 8GB.
- Independent of the flip: run kind-23 actions in spawned workers (the
WITH_BUILD_ACTION_WORKERmachinery is half-present) so their interpreter state dies with the worker, mirroring how test lanes already isolate. - After the flip: add a battery gate asserting the runner's committed peak stays under budget, so regressions self-identify instead of coasting to the ceiling.
Related: #701 (ceiling death, pre-existing evidence), #691 (structural cure), #608 (leak-by-design tier).
Metadata
Metadata
Assignees
Labels
No labels
Activity
ehartford commentedon Jul 22, 2026
Live-heap attribution (via the new
WITH_ALLOC_SYSTEM=1mode +heapon the running parent at 9.1GB):After the streaming-hash fix, worker-per-action, the comptime push fix, and a per-run fingerprint memo, the fully-cached battery parent still demands ~35–40GB — and dies 0.17MB short of the 32GiB ceiling (
committed=34,359,566,720vslimit=34,359,738,368). The umbrella is green end-to-end underWITH_MEMORY_LIMIT_BYTES=64GB(22.8GB peak footprint, all lanes + evidence targets).Conclusion: the residual mass IS the #608 design decision, not any further fixable site — every remaining gigabyte is retained-by-design memory the #691 flip reclaims. Pre-flip site fixes are exhausted; the 8GB budget is achievable only with the flip.
Build: fingerprint memory discipline + serial action workers (#702)
RT: WITH_ALLOC_SYSTEM=1 routes the heap through libSystem malloc (#702)
ComptimeEval: O(1) tail-append Vec.push; copy-free pop (#702)
CLI: default build memory ceiling 32 -> 64 GiB (#702)
CLI: :update-seed / :install-user fast path — verify manifest, copy, …
Build: serialized graph cache; cacheable selfcheck; fixpoint evidence…
ehartford commentedon Aug 31, 2026
Triage re-scope 2026-08-31: the pre-flip 20–34GB decomposition is historical (the #691/#747 flips, fingerprint memo, and serialized graph cache landed), but nothing enforces the bar and the default ceiling was raised to 64GiB (8b0a144) — so nothing self-identifies a regression. Remaining scope: re-measure the battery runner's committed peak post-flip; the ≤8GB bar stands (src/main.w:88 calls it the flip's acceptance test); add the battery gate asserting the peak stays under budget.
ehartford commentedon Sep 1, 2026
Measured with the new per-target RSS instrumentation (ea2196d3), cold full build + :test, 2026-09-01: orchestrator high-water 456M/227M, largest pooled child 499M (regex-runtime-ir), invariance lanes 432M. Nothing within 70× of the recorded 20-34GB.
Two hypotheses for the gap, needing one re-verification run each: (a) the 20-34GB was the OLD battery's shape — pre-#683 worker respawns + the 22-minute serial world summing many concurrent compiler processes — and the working set genuinely collapsed since; (b) it measured a different quantity (sum over time, or macOS compressed/virtual accounting rather than ru_maxrss). Caveat on today's numbers: grandchildren aren't summed (a lane's sliding-window compiler children are individually ~300-500M; window×size still fits comfortably under 8GB).
If (a) verifies, this issue likely closes on evidence once #680 lands with a plain width×footprint admission cap rather than the windowing machinery originally envisioned.
build: per-target peak-RSS instrumentation (#679, #702 opening slice)
docs/perf: durable home for build-perf baselines (#679)
docs/perf: principled campaign targets (Eric, 2026-09-02)
build: #680 phase A — test lanes pool across cores with width admission
:install-user installs through the .Install kind's placement: temp + …
:install-user installs through the .Install kind's placement: temp + …
:install-user installs through the .Install kind's placement: temp + …
:install-user installs through the .Install kind's placement: temp + …
Battery time: one scheduled graph (75 min to 9.2 min with the new dri…
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): does not reproduce. The measurement in the last comment (2026-09-01, cold full build plus:test) found the orchestrator at 456 MB and the largest child at 499 MB; today's battery ledger (~/.local/with-green/battery-times.tsv) records the costliest target at 3.2 GB (pub-lint-check), stage1 and stage2 at 1.6 GB. Nothing approaches the 8 GB bar.:install-user records and publishes the ceremony census bar itself
:install-user records the ceremony census bar; typed census skips mig…