Repository navigation
The pool's one relaunch quiesces admission instead of waiting for an idle sample (card 2540194e) - #5748
Merged
Conversation
…idle sample (card 2540194e) On the M5 on 2026-11-03 (24e4d2c, then the 90fe06f rollback) the engine launched at 5 x 2,048 and the pool never grew: #5742 waited for a /slots read with no slot processing, and five residents on 409-token windows acted without pause (112 admission.lane.granted in 7 min), so the read never came (Fable's evidence: ~/.continuum/evidence/2026-11-03-pool-stuck/). The relaunch now makes its idle edge: - resource_admission::quiesce: every lane request ENTERS one count before either semaphore, then checks a flag; a quiesce SETS the flag, then waits for the count to reach zero. Both SeqCst, so nothing slips between. Both waits are Notify edges, never a poll. The entry is the permit's LAST field, so the lane and the in-flight marker are released before a quiesce sees it gone. - The serving daemon, when the first steady plan proves a larger pool, spawns the quiesce and only then requests the relaunch. llama_server::pool_growth holds the quiesce across the relaunch: it ends after the ensure once the request is spent (a serving engine, or a failure), or when a different engine process serves. Never while no engine serves. - #5742's engine_idle sample, its health-tick writer, no_slot_processing and its test are deleted. The bound on the hold: the longest in-flight generation, plus up to one serving tick, plus the relaunch until the new engine answers. Probed: serving.pool.grow_quiesced (drained_ms), serving.pool.grow_held (held_ms, reason), admission.quiesce.ended (held_ms). Not covered: external drivers on :58057 reach llama-server without admission, and a relaunch cuts them (Fable on 2540194e). That's acceptable for this one-time bridge; card to follow. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
PASS at 576d3cc (Fable). Claims verified, and how:
Two clippy flags in Minor: Merge on green. After deploy, the receipt I'll post: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The pool's one relaunch quiesces admission instead of waiting for an idle sample (card 2540194e)
On the M5 on 2026-11-03 (24e4d2c, then the 90fe06f rollback) the engine launched at 5 x 2,048
and the pool never grew: #5742 waited for a /slots read with no slot processing, and five residents
on 409-token windows acted without pause (112 admission.lane.granted in 7 min), so the read never
came (Fable's evidence: ~/.continuum/evidence/2026-11-03-pool-stuck/).
The relaunch now makes its idle edge:
checks a flag; a quiesce SETS the flag, then waits for the count to reach zero. Both SeqCst, so
nothing slips between. Both waits are Notify edges, never a poll. The entry is the permit's LAST
field, so the lane and the in-flight marker are released before a quiesce sees it gone.
then requests the relaunch. llama_server::pool_growth holds the quiesce across the relaunch: it
ends after the ensure once the request is spent (a serving engine, or a failure), or when a
different engine process serves. Never while no engine serves.
The bound on the hold: the longest in-flight generation, plus up to one serving tick, plus the
relaunch until the new engine answers. Probed: serving.pool.grow_quiesced (drained_ms),
serving.pool.grow_held (held_ms, reason), admission.quiesce.ended (held_ms).
Not covered: external drivers on :58057 reach llama-server without admission, and a relaunch cuts
them (Fable on 2540194e). That's acceptable for this one-time bridge; card to follow.
Measured
Not yet measured live. The receipt is due on the M5 after this merges (Fable offered the serving-down window):
serving.pool.grow_quiesceddrained_ms andserving.pool.grow_heldheld_ms on the first steady plan after boot;context_geometry.allocated_tokens) vs the 2,048 launch;The engine crate builds in CI only: it pulls llama.cpp, which the IntelMac does not build beside its residents. CI is the compile check.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE