Skip to content

spark-server: drop hoisted SSM pool terms from inference_reserve - #66

Merged
AzeezIsh merged 1 commit into
mainfrom
fix/ssm-reserve-double-count
Sep 25, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
fix/ssm-reserve-double-count

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

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 — but preflight_reserve kept the same bytes in inference_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:

No memory left for KV cache: total GPU = 119.6 GB, util 70% → budget 83.7 GB,
but 72.6 GB already consumed + 19.9 GB inference reserve = 92.5 GB committed

(seen on the post-merge bfcl leg, spark benchmark run bfcl-subset self-serve at util 0.70 — booted fine pre-#63).

inference_reserve now 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

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).
@AzeezIsh
AzeezIsh merged commit 5b07b95 into main Sep 25, 2026
24 of 25 checks passed
@AzeezIsh
AzeezIsh deleted the fix/ssm-reserve-double-count branch September 25, 2026 06:16
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.

1 participant