Repository navigation
spark-server: drop hoisted SSM pool terms from inference_reserve - #66
Merged
Merged
Conversation
The #61 fix (SsmPools::new before the KV-budget snapshot) moved the SSM state/snapshot pools into used_so_far, but preflight kept reserving the same bytes in inference_reserve — double-charging ~20 GB and refusing configs that physically fit (bfcl leg at util 0.70: 72.6 consumed + 19.9 reserve > 83.7 budget). inference_reserve now keeps only the terms still allocated post-snapshot (gdn_two_phase, cuda_headroom).
This was referenced Sep 25, 2026
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.
Summary
Follow-up to #63 (the #61 fix). Moving the SSM state/snapshot pools before the KV-budget snapshot put them in
used_so_far— butpreflight_reservekept the same bytes ininference_reserve(ssm_pool_bytes + ssm_h_stage_bytes + ssm_replay_ring + ssm_snapshot_bytes). The pools were charged twice (~18–22 GB), and configs that physically fit refused at boot:(seen on the post-merge bfcl leg,
spark benchmark run bfcl-subsetself-serve at util 0.70 — booted fine pre-#63).inference_reservenow keeps only the terms still allocated post-snapshot (gdn_two_phase_bytes,cuda_headroom). The dropped terms remain computed for the debug breakdown log and the early-refusal error path.Test plan
cargo check -p spark-server,cargo fmt --checkclean