Skip to content

fix(deploy): a warm build beside a CPU-served lane takes one job and, on macOS, the background band (card 682a5abf) - #4471

Merged
joelteply merged 1 commit into
canaryfrom
fix/warm-build-leaves-lane-cores
Sep 27, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/warm-build-leaves-lane-cores

Conversation

@joelteply

@joelteply joelteply commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

A warm build beside a CPU-served lane takes one job and, on macOS, the background band (card 682a5abf).

Why

yield_to_serving (#4449) set nice 19 and nothing else. Nice reorders the run queue, but it frees no core. cargo ran its default jobs, one per logical CPU, and rustc's codegen draws on that jobserver, on the same cores a CPU-served lane decodes on. llama.cpp's default threads are one per physical core, and the core passes no --threads.

On the IntelMac (i7-8850H, 6 cores / 12 threads) on 2026-09-27:

What

Cost

A slower deploy on a CPU-only node. This one already took 3h+ at 12 jobs.

Pre-registered

  1. The citizens: the next deploy hour on the IntelMac, against today's baseline (0 acts, 7 of 11 generations dropped). It worked if fewer than half the generations drop and acts > 0.
  2. The build's wall time (Fable): at 12 jobs the last one took 3h13m+ (continuum_core alone was 131 CPU-min). At one job, plus the background band, it runs on one codegen thread. It worked if the next warm build finishes within 6 h. If not, step the CPU-served budget to 2 jobs in warm_build_jobs and measure again, because a build that outruns canary means the node never deploys.

Test

a_warm_build_beside_a_cpu_lane_gets_one_job pins the budget for each backend. The existing nice test still covers the priority. Not built locally: this node's deploy build still holds the shared target, and CI is the compile.

Docs: CONCURRENCY-STYLE-GUIDE. Sibling: #4468.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

… on macOS, the background band (card 682a5abf)

yield_to_serving set nice 19 and nothing else. Nice reorders the run queue but
frees no core, and cargo ran its default jobs (one per logical CPU) on the cores
a CPU-served lane decodes on: llama.cpp's default threads are one per physical
core, and the core passes no --threads. The IntelMac (6 cores, 12 threads) went
three hours at 0 acts with 7 of 11 generations dropped while it built (Fable's
health reads, 2026-09-27), and the build's contention is what condemned its
lane three times today.

- warm_build_jobs(backend), pure: Some(1) when the installed engine's stamp says
  cpu, None otherwise (metal, cuda, unknown: no cap). installed_engine_backend()
  reads the same stamp as installed_engine_commit().
- yield_to_serving sets CARGO_BUILD_JOBS from it. install-llama-server.sh (which
  the warm build runs since #4464) reads the same budget instead of nproc.
- On macOS the child also enters the background band
  (setpriority PRIO_DARWIN_PROCESS, PRIO_DARWIN_BG), which throttles CPU and I/O
  below nice. Measured here: a child keeps nice 19 at priority 3, and so do its
  children.

The deploy gets slower on a CPU-only node. That is the trade against hours of
citizens with no lane.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Fable read 4b71b01: the mechanism reads right (the stamp's backend decides; CARGO_BUILD_JOBS reaches cargo and install-llama-server.sh alike; the macOS background band is inherited). Word follows at green, with one addition to the pre-registration.

The other side of the trade needs a number too. At one job the whole of continuum-core compiles on one codegen thread (rustc's codegen units draw on the same jobserver), and the IntelMac's warm build already took 3h13m at 12 jobs. If a build at -j1 runs longer than canary moves, the IntelMac never lands a deploy and runs stale code all day, which is its own outage. Please pre-register the build's wall time beside the acts: e.g. the next warm build finishes within 6 h, and if it does not, step to 2 jobs. The background band may carry most of the protection on its own; the measurement will say whether -j1 is also needed.

@joelteply

Copy link
Copy Markdown
Contributor Author

Fable: APPROVED at 4b71b01, 13/13 green. One job and the macOS background band beside a CPU-served engine only; GPU nodes unchanged; both outcomes pre-registered (acts > 0 with under half dropped, and the warm build within 6 h or step to 2 jobs).

@joelteply
joelteply merged commit f03812d into canary Sep 27, 2026
13 checks passed
@joelteply
joelteply deleted the fix/warm-build-leaves-lane-cores branch September 27, 2026 18:51
joelteply added a commit that referenced this pull request Sep 27, 2026
… jobs instead of never running (the M5 could not deploy) (#4478)

* fix(deploy): a warm build beside a lane that fills memory takes fewer jobs instead of never running (the M5 could not deploy)

The warm build refused below a fixed 12 GiB free. The M5 serving the 27B at 4 lanes
(llama-server 29.5 GB, core 4.4 GB) sat at 10.4 GiB, so every tracker pass from 19:33Z
on 2026-09-27 was refused ("no artifact to hand the supervisor") and the node stayed on
c9ee8b1 under a day of merges (#4457, #4467, #4468, #4471). A node whose lane fills
its memory never deployed.

Now 12 GiB free still runs at cargo's own job count; below it the build takes one job
per 3 GiB above a 4 GiB reserve for the citizens and the core (rustc's codegen threads
draw on the same jobserver, so fewer jobs is less memory), at least one; the refusal
moves to the floor of one job plus the reserve (7 GiB). When a CPU-served lane also caps
the build (#4471), the smaller budget wins. The engine build reads the same
CARGO_BUILD_JOBS.

Pre-registered: the M5's first warm build under this runs at 2 jobs at ~10 GiB free and
completes with memory.pressure never reaching critical and no citizen generation dropped
during the build window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(deploy): the warm build's memory budget lives in the lib beside the CPU budget, so CI runs its test (Codex on #4478: CLI tests run only by name)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply added a commit that referenced this pull request Sep 28, 2026
…t one (card 2530d2cb) (#4490)

The step pre-registered on #4471. At one job the IntelMac's warm build of
f03812d ran past the registered 6 h bound (19:14Z start, still compiling
continuum_core_server at 01:14Z); a build slower than canary's pace means
the node never deploys. One more job costs the lane little and roughly
halves the wall time.


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant