Skip to content

fix(producer): withhold de parallel router below a machine ram floor#2249

Merged
vanceingalls merged 1 commit into
mainfrom
07-11-fix_producer_withhold_de_parallel_router_below_a_machine_ram_floor
Jul 11, 2026
Merged

fix(producer): withhold de parallel router below a machine ram floor#2249
vanceingalls merged 1 commit into
mainfrom
07-11-fix_producer_withhold_de_parallel_router_below_a_machine_ram_floor

Conversation

@vanceingalls

@vanceingalls vanceingalls commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a machine-RAM floor to the DE parallel router. shouldPreferParallelDrawElement now also requires totalMemoryMb >= minMemoryMb (default 24576 MB, override via HF_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_ROUTER on; 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<=0 disables the guard entirely. Full producer test suite (129 tests) green.

🤖 Generated with Claude Code

@miga-heygen miga-heygen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#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
miguel-heygen previously approved these changes Jul 11, 2026

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 james-russo-rames-d-jusso left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Review by Rames D Jusso

jrusso1020
jrusso1020 previously approved these changes Jul 11, 2026

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving per the channel stamp-flow: Rames-D and Magi both cleared, CI clean at 4c02c8f.

@vanceingalls vanceingalls changed the base branch from 07-11-fix_producer_engine_gate_drawelement_on_ancestor_background-image_tail_verify_sample to graphite-base/2249 July 11, 2026 21:13
@vanceingalls vanceingalls force-pushed the 07-11-fix_producer_withhold_de_parallel_router_below_a_machine_ram_floor branch from 4c02c8f to ddcd380 Compare July 11, 2026 21:18
@vanceingalls vanceingalls changed the base branch from graphite-base/2249 to main July 11, 2026 21:18
@vanceingalls vanceingalls dismissed stale reviews from jrusso1020 and miguel-heygen July 11, 2026 21:18

The base branch was changed.

@vanceingalls vanceingalls merged commit 9582be9 into main Jul 11, 2026
50 of 59 checks passed
@vanceingalls vanceingalls deleted the 07-11-fix_producer_withhold_de_parallel_router_below_a_machine_ram_floor branch July 11, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants