fix(producer): withhold de parallel router below a machine ram floor#2249
Conversation
miga-heygen
left a comment
There was a problem hiding this comment.
#2249 — withhold de parallel router below a machine ram floor
Verdict: LGTM 🟢
RAM floor for parallel drawElement routing: 3 concurrent hardware-GPU Chrome instances on a 16 GB machine produced vertical black slabs (wild 0.7.52 report). Default floor 24 GB — telemetry-backed (every clean routed cohort ≥24 GB). Env override HF_DE_PARALLEL_MIN_MEM_MB (0 disables). Single-worker DE stays available below the floor; only the parallel bet is withheld.
SSOT: the guard is a single boolean term in the existing shouldPreferParallelDrawElement predicate — no duplicated decision. Tests cover below-floor, at-floor, and guard-disabled cases. Clean.
Review by Miga
miguel-heygen
left a comment
There was a problem hiding this comment.
Reviewed current head 4c02c8f. RAM units/default/override are explicit and the guard is limited to the parallel DE router; tests cover below/at floor and disabled guard. Required functional checks are green; Graphite mergeability is still pending only. APPROVE.
james-russo-rames-d-jusso
left a comment
There was a problem hiding this comment.
Reviewed at 4c02c8f.
Small clean predicate change with matching env override, sane default (24 GB matches the wild-report boundary + your telemetry cohort), and the disable path (minMemoryMb <= 0) is tested explicitly. Only the parallel bet is withheld; single-worker DE stays available below the floor — that's the right inversion.
One clarifying question, not a blocker:
Route-decline reason surfacing. shouldPreferParallelDrawElement still returns a plain bool. perfSummary.drawElement.parallelRouter captures the routed/not-routed outcome, but not WHICH gate declined — RAM floor vs short comp vs CSS-effect-risk vs experimental opt-in all collapse to false. For FF-flip observability on this floor specifically (is 24 GB the right knob?), threading a parallelRouterDeclineReason through — same shape as the existing deClampReason — would let you see the RAM-rejected cohort in aggregate. Pre-existing gap the whole predicate carries, not this PR's job — but this PR adds a decline reason that would benefit from being observable.
LGTM from my side.
jrusso1020
left a comment
There was a problem hiding this comment.
Approving per the channel stamp-flow: Rames-D and Magi both cleared, CI clean at 4c02c8f.
4c02c8f to
ddcd380
Compare
The base branch was changed.

What
Adds a machine-RAM floor to the DE parallel router.
shouldPreferParallelDrawElementnow also requirestotalMemoryMb >= minMemoryMb(default 24576 MB, override viaHF_DE_PARALLEL_MIN_MEM_MB, 0 disables the guard). Single-worker DE (the inversion) is unaffected — only the parallel bet is withheld below the floor.Why
Wild report on CLI 0.7.52: a 16 GB darwin machine hit vertical black slabs on the second render with
HF_DE_PARALLEL_ROUTERon; disabling the flag fixed it. Parallel DE runs 3 concurrent hardware-GPU Chrome instances — on a 16 GB machine that's plausible compositor-tile eviction under memory pressure. Every clean routed render seen in telemetry so far has been on machines ≥24 GB.Validation
4 new unit tests: routes at the floor, withholds below it,
minMemoryMb<=0disables the guard entirely. Full producer test suite (129 tests) green.🤖 Generated with Claude Code