You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Requests that branch from a shared prefix re-prefill it at the default --scheduler-checkpoint-extra-work-fraction (0.05) #292
At the default --scheduler-checkpoint-extra-work-fraction (0.05), a request that shares a prefix with an earlier request often re-prefills the whole prefix instead of reusing it. On e774a46, the same probes reused the shared 4K-token system prompt.
Setup: four DGX Spark (GB10) hosts, TP4 over --roce-ring, GLM-5.3 Flash FP4-Local core gb10-tp4-202611101725, --scheduler-policy throughput, a fresh server for each run, main 6b68b9b.
Probe (three runs each)
Tokens reused at 0.05
Tokens reused at 0.25
Same 4K-token system prompt, different user message
4,010 in two runs, 0 in one
about 4,010
Same history, different last user message
0 in all three (1.50 s time to first token)
about 4,010
At 0.05, the server reported 11 checkpoints skipped as work_budget and 14 as unknown_cost. At 0.25, once checkpoint costs are learned, time to first token for the branched request drops from 1.46 s to 0.22–0.32 s. The first request on each new prefix takes about 0.3–0.5 s longer, because it captures the checkpoint.
Likely cause
The checkpoint at the end of the shared system prompt does not fit the extra-work budget that 0.05 allows. The scheduler skips it, so later requests have no checkpoint at the branch point to resume from. unknown_cost skips suggest that checkpoints are also skipped before their capture cost has been measured. Neither cause has been isolated.
Not established
Whether TP1 or other models are affected.
Whether the right fix is a different default fraction or a budget rule that always allows a checkpoint at a shared prefix.
This issue first reported a 9–14x slowdown of concurrent requests at the default fraction. Rank zero's scheduler thread spent its time requoting snapshot selections on every commit. #309 fixed that stall, and #296 moves the remaining selection work into checkpoint_planning_scope. The earlier comments on this issue record those measurements.
Cause. For one or two snapshot destinations, select_snapshots (helios/src/scheduler/cache_memory.rs) clones a BTreeSet of excluded pages for every candidate pair. service_participants, called from commit, runs outside checkpoint_planning_scope, so this repeats for every prefill capacity.
Fix: #296 (on 7006928, same selections): count each pair's union by merging the sorted page lists, and open checkpoint_planning_scope in service_participants. A test checks the result against exhaustive search on 2,000 random layouts.
Same 32-request workload, fresh server, 240 s cap:
correct.py passes 544/544, and throughput and time to first token match e774a46.
Branch reuse needs a larger extra-work fraction. At the default 0.05, a request sharing a 4K-token system prompt with an earlier one reuses at most 9 tokens, because the system-prompt checkpoint doesn't fit the budget. At --scheduler-checkpoint-extra-work-fraction 0.25, after costs warm, it reuses 4,010 tokens (time to first token 1.46 s → 0.22–0.32 s), matching e774a46. The first request on each new prefix pays about 0.3–0.5 s more.
33K-token prompt extended by 19 tokens: fixed. Time to first token is 0.28 s.
Branch reuse of a shared 4K-token system prompt: still lost. Of three probes, a second request with the same system prompt and a different user message reused 4,010 tokens in two and 0 in one. A request with the same history and a different last user message reused 0 tokens in all three (1.50 s time to first token). The server reported 11 work_budget and 14 unknown_cost checkpoint skips. At --scheduler-checkpoint-extra-work-fraction 0.25, both cases reuse about 4,010 tokens.
I'm narrowing this issue to the branch-reuse loss at the default fraction.
changed the title [-]Optional prefix checkpoints stall TP4 scheduling since #285: distinct-prompt requests run 9–14× slower[/-][+]Branch reuse of shared prefixes is lost at the default checkpoint extra-work fraction[/+]on Nov 15, 2026
changed the title [-]Branch reuse of shared prefixes is lost at the default checkpoint extra-work fraction[/-][+]Requests that branch from a shared prefix re-prefill it at the default `--scheduler-checkpoint-extra-work-fraction` (0.05)[/+]on Nov 18, 2026
Closing. Whether a shared prefix is reused here comes down to the checkpoint work budget, which is a deployment setting. Setting --scheduler-checkpoint-extra-work-fraction 0.25 gives the reuse this workload needs. The stall this issue first reported is fixed by #309, and #296 carries the remaining scope change.
Activity
iein commentedon Nov 14, 2026
Cause. For one or two snapshot destinations,
select_snapshots(helios/src/scheduler/cache_memory.rs) clones aBTreeSetof excluded pages for every candidate pair.service_participants, called fromcommit, runs outsidecheckpoint_planning_scope, so this repeats for every prefill capacity.Fix: #296 (on 7006928, same selections): count each pair's union by merging the sorted page lists, and open
checkpoint_planning_scopeinservice_participants. A test checks the result against exhaustive search on 2,000 random layouts.Same 32-request workload, fresh server, 240 s cap:
correct.pypasses 544/544, and throughput and time to first token match e774a46.Branch reuse needs a larger extra-work fraction. At the default 0.05, a request sharing a 4K-token system prompt with an earlier one reuses at most 9 tokens, because the system-prompt checkpoint doesn't fit the budget. At
--scheduler-checkpoint-extra-work-fraction 0.25, after costs warm, it reuses 4,010 tokens (time to first token 1.46 s → 0.22–0.32 s), matching e774a46. The first request on each new prefix pays about 0.3–0.5 s more.Not run: other models, TP1.
iein commentedon Nov 15, 2026
Update on main 6b68b9b (includes #309), same setup, default extra-work fraction, fresh server:
checkpoint_planning_scopechange, which brings it to 59.5–60.0 s.work_budgetand 14unknown_costcheckpoint skips. At--scheduler-checkpoint-extra-work-fraction 0.25, both cases reuse about 4,010 tokens.I'm narrowing this issue to the branch-reuse loss at the default fraction.
[-]Optional prefix checkpoints stall TP4 scheduling since #285: distinct-prompt requests run 9–14× slower[/-][+]Branch reuse of shared prefixes is lost at the default checkpoint extra-work fraction[/+][-]Branch reuse of shared prefixes is lost at the default checkpoint extra-work fraction[/-][+]Requests that branch from a shared prefix re-prefill it at the default `--scheduler-checkpoint-extra-work-fraction` (0.05)[/+]iein commentedon Nov 18, 2026
Closing. Whether a shared prefix is reused here comes down to the checkpoint work budget, which is a deployment setting. Setting
--scheduler-checkpoint-extra-work-fraction 0.25gives the reuse this workload needs. The stall this issue first reported is fixed by #309, and #296 carries the remaining scope change.