In this series / On this page· 17 of 18
- 1. Disaggregated Serving: Dynamo, llm-d, and When Splitting Prefill from Decode Pays
- 2. TTFT, ITL, Goodput: Measuring What Users Feel
- 3. Benchmark an Inference Server Without Lying to Yourself
- 4. Expert Parallelism, and What DeepEP Does for It
- 5. Serving Kimi K3.1 Pro: The State per Request, the Indexer's Cost, and Where 1M Tokens Fit
- 6. Other Users' Data in the KV Cache: What Cloudflare's GLM-5.3 Incident Teaches Operators
- 7. Flow Control in the Serving Stack: What llm-d, Dynamo and AIBrix Do When the Fleet Is Full
- 8. Context Parallelism for Long-Context Serving: PCP and DCP in vLLM and SGLang
- 9. Several Models, One GPU: Time-Slicing, MPS, MIG, and What CUDA 13.4's Memory Caps Change
- 10. Serving Mistral Large 4: What Its Cache Costs and Where It Fits
- 11. Prefix-Aware Routing Across Replicas: Kubernetes Service, Dynamo's KV Router, the llm-d EPP and Kinference
- 12. Serving Ripple-65B: What a Dense Model with 1M Context Costs, and When It Beats an MoE
- 13. Cost per Million Tokens, Computed: GPU-Hours, Utilization, and the Cache
- 14. Kinference at alpha.7: What Buoyant's Inference Control Plane Does, and What It Reuses
- 15. Splitting Off the Vision Encoder: When Encoder Disaggregation Pays in vLLM
- 16. The Cache Hit That Changed the Answer
- 17. Prefix Caches That Collapse Under Bursts, and the Session Cap That Prevents It
- 18. MLPerf Endpoints v1.0: How to Read an Agentic Inference Benchmark
Prefix Caches That Collapse Under Bursts, and the Session Cap That Prevents It
Three minutes of extra agent sessions took a vLLM server from 91% prefix-cache hits to none, and it stayed there after the burst ended. Why the misses feed themselves, how to see it coming, and the session cap that kept the same burst harmless.

We ran agent sessions against vLLM at 70% of what the server could sustain with a warm cache, and for three minutes sent three times as many. Before the burst, 91% of each turn's prompt came from the prefix cache and the first token arrived in 0.2 seconds. Within a minute of the burst starting, the hit ratio was 0%. Twelve minutes after it ended, it was still 0%, and two to seven minutes after it the median first token took 21 and 47 seconds in our two runs. The same burst sent through a gateway that admits at most 8 sessions at a time changed nothing: 91% hits, 0.3 seconds.
Two papers posted on arXiv this week describe this failure, and both conclude that it is a state the server stays in rather than a slowdown it recovers from.
Two papers, one failure
Inside the Trap (6 November, Iowa State University) ran registered paired tests on SGLang 0.5.22 and vLLM 0.32.0, with two 7 to 8B models on two GPUs: a burst of 200 sessions within 60 seconds left the engine at zero hits to the end in all 30 runs, 7,500 seconds after the burst, while every matched run without the burst stayed healthy and a session cap prevented the trap in all 30 capped runs. The paper proves when a trapped engine can drain: only if sessions arrive more slowly than the engine can serve them when every turn misses, its all-miss capacity.
Bursts That Outlast Themselves (10 November) ran vLLM on MI300X with Qwen3-8B and Qwen3-32B: a five-minute burst left the hit ratio at about 10%, throughput at about half and a backlog that grew for the remaining 70 minutes of the run, in 9 of 12 paired runs and never in the reverse direction. The degraded regime did not appear with prefix caching off, appeared on SGLang with larger triggers, and was prevented in every run by a gateway budgeter that bounds the KV demand of admitted sessions.
Both used open arrivals (sessions keep coming whatever the server does) at loads the warm server carried (the second paper at about 70% of its warm-cache capacity, the first at 1.35 and 1.65 times its all-miss rate) and multi-turn sessions whose context grows each turn and that share at most a system prompt. That is what an agent product looks like from the engine.
Measured: one burst, four runs
We reproduced the setup at a smaller scale on one GB10 (DGX Spark) with vLLM 0.33.0 and Qwen3-8B in FP8. Each session is an agent loop of 10 turns: a private context of 2,000 tokens, then a 400-token tool output per turn, 64 tokens generated, and 2 seconds of "tool time" before the next turn. Contexts grow from 2,500 to 7,000 tokens. Sessions share no text, so a turn can only hit the cache on its own earlier turns. We capped the KV pool at 68,000 tokens with --num-gpu-blocks-override 4250, a quarter of what the engine would have taken, so that 7,000-token contexts stand in for the 10,000 to 40,000-token contexts of the papers; what matters is the ratio of session context to pool.
A closed-loop calibration with 8 sessions gave 0.118 sessions per second. Arrivals were Poisson at 70% of that, 0.083 sessions per second, with four arms:
- no burst for 15 minutes;
- burst: three times the arrival rate from minute 5 to minute 8, then back to normal, for 20 minutes, with two seeds;
- burst, cap of 8: the same as seed 1, with a gate that admits at most 8 sessions at once; the others wait before their first turn.


| 2 to 7 minutes after the burst | no burst | burst, seed 1 | burst, seed 2 | burst, cap of 8 |
|---|---|---|---|---|
| Hit ratio, turns 2 to 10 | 91% | 0% | 0% | 91% |
| Median time to first token | 0.22 s | 46.6 s | 20.9 s | 0.28 s |
| Prompt tokens computed per turn | 647 | 4,942 | 4,852 | 658 |
| Sessions in the system | 5.4 | 50.1 | 30.0 | 8.0 admitted, 8.5 waiting |
| Median session time (sessions started after 8:20) | 59 s | 585 s (6 finished) | 341 s | 65 s, plus about 73 s waiting |
The engine's own counters agree: vllm:prefix_cache_hits_total over vllm:prefix_cache_queries_total was 86% in the healthy runs (first turns included) and 0.0% in both trapped ones. No turn errored or timed out; in seed 1, 59 of the 141 sessions admitted were still unfinished when the run stopped. The trapped server still served about 50 turns a minute, the same as the healthy one. It was simply computing seven times more prompt per turn to do it.
Why zero, and not half
A cache that is too small usually degrades gracefully: hold half the working set, hit about half the time. This one went from 91% to exactly zero, because of how vLLM evicts and how agents come back.
When a turn finishes, vLLM releases its KV blocks to a free queue but keeps their contents and hashes, so the next turn of the same session can find them. The queue is ordered for least-recently-used eviction (FreeKVCacheBlockQueue): blocks that carry a hash go to the tail and are reused last (free_blocks); a new allocation takes blocks from the head. A session between turns holds nothing in the engine. Its context is just the oldest cached blocks, first in line to be overwritten.
Agent sessions visit the cache in a cycle: each comes back once per turn, after the others have had theirs. That is the textbook worst case for LRU. If the sessions in flight need more KV than the pool holds, the session that has waited longest, which is exactly the one about to return, is the one whose blocks were just reused, every time. In our trapped runs the sessions in the system needed 2.1 and 3.6 times the pool.


SGLang's radix cache also evicts least recently used by default (Prefix Caching covers both engines' eviction), and the second paper found the same regime there. With a shared system prompt, every turn still hits on those first few thousand tokens, which is why the second paper, with a 2,000-token shared prompt, reports about 10% rather than zero; the first, with no shared text, reports zero, as we do. the private context, which is most of an agent's prompt, is gone either way.
Why it outlasts the burst
The burst is over at minute 8. What keeps the server trapped is a loop, and each step of it is in the measurements.


The step from slow turns to more sessions is Little's law: the number of sessions in the system is their arrival rate times how long each stays. At 0.083 sessions per second, a 58-second session means about 5 in flight; a 585-second session means 48. We measured 4.5 and 50. The check is approximate: the trapped system was not steady, and the 585 seconds come from the 6 late sessions that finished before the run stopped, so the true figure is longer. Arrivals did not change after the burst; session time did, and the sessions it kept in flight are what overflow the pool. The burst only has to push the system over the edge once.
Whether it can come back is the first paper's drain condition: a trapped engine recovers only if sessions arrive more slowly than its all-miss capacity. Ours computed about 4,000 prompt tokens per second while trapped, and a session costs about 47,500 tokens of prefill when every one of its 10 turns misses, so its all-miss capacity is about 0.084 sessions per second. That reading holds because the trapped engine was saturated, with 27 to 40 requests waiting; the first paper warns that a trap's measured throughput overstates the recovery threshold, and measures the all-miss rate directly, with prefix caching disabled (--no-enable-prefix-caching in vLLM), which is the method to use on your own deployment. Sessions were arriving at 0.083. The load that ran at 91% hits with room to spare sat right at the capacity of the trapped state, so the backlog had no way to drain: seed 1 held between 43 and 59 sessions in flight, seed 2 between 25 and 34. The first paper tested at 1.35 and 1.65 times the all-miss rate, where every burst trapped; we ran at the margin, within the error of our estimate, and did not test clearly below it, where the theory says a trap drains.
The useful number for an operator is the ratio of the two capacities. Ours was 0.084 against 0.118 sessions per second warm: 71%, because with 64-token answers on a small model, generating still takes a large part of each turn. Any load above 71% of the warm-cache capacity is, for this workload, a load the server can only carry while the cache holds. The more of a turn's time is prefill, the lower that line: in the second paper's workload, with contexts of 6,000 to 37,000 tokens, the paper's own estimate of the all-miss capacity is about 0.013 sessions per second, against about 0.05 warm: a quarter.
What does not help
--max-num-seqs. It bounds the requests running in one step: 256 for the API server on the machine we used, 1,024 on H100, H200 and B200-class GPUs (arg_utils.py). A session waiting for its tool call has no request in the engine, so no engine limit counts it. In the worst trapped run, vLLM had 10 to 15 requests running and 27 to 40 waiting while 50 sessions held context.
Watching preemptions. Preemption is the engine taking KV from a running request. There was almost none: 4 in five minutes of the worst run. The cache was lost between turns, by eviction, which no preemption counter sees. vllm:kv_cache_usage_perc near 1.0 is a symptom, but the run without a burst reached 0.93 at its busiest moment too.
Refusing new sessions after the fact. In the second paper, throttling admission of new sessions recovered 1 of 7 collapsed runs; in the first, refusing arrivals for 10 minutes left both runs trapped, and only an hour of refusals got them out. The sessions already admitted are the problem.
A CPU offload tier. The second paper's 128 GiB offload tier delayed the collapse from minute 20 to minute 40 to 60, and 4 of 6 burst runs still degraded. A bigger pool moves the edge; it does not remove the loop.
Request-level gates. The flow control in llm-d, Dynamo and AIBrix (Flow Control in the Serving Stack) queues requests when the fleet is saturated. The load that sets the trap off is below saturation, and the state at risk belongs to sessions between their requests.
The fix: bound the sessions, not the requests
Both papers put the control where sessions are visible, in the gateway or the agent runtime, and pause a session at a turn boundary rather than in the middle of a turn. A session waits before its first turn, or between turns, until the KV of the admitted sessions fits.
A session cap is a semaphore per replica. In our simulator, the only difference between the arm that held at 91% and the trapped one is the async with cap line:
cap = asyncio.Semaphore(8) # per replica: 68,000 // 7,000 = 9, minus one for the turn in flight
async def session(client, task):
async with cap: # waits here before the first turn, never mid-session
ctx = task.prompt
for _ in range(task.max_turns):
reply = await client.complete(ctx)
ctx += reply + await run_tool(reply)
Size it from the pool and the largest context a session reaches: 68,000 tokens and 7,000-token sessions gave 9, and we used 8 to leave room for the turn being computed. The vLLM startup log prints the pool (GPU KV cache size: 68,000 tokens in our runs). The first paper picks the smallest cap that keeps 95% of the warm-cache throughput (20 sessions at a 300,000-token pool in its runs).
The cost is waiting before the first turn. Through the burst our capped run had up to 25 sessions queued, and a session waited about 73 seconds on average before starting, then ran in 65. In the trapped run a session took 585 seconds. In 20 minutes the capped server completed 129 sessions; the trapped one, 82 of the 141 it had admitted. The first paper's caps cost 405 to 471 seconds of admission delay on average, at higher loads and longer sessions: a cap turns a burst into a queue you can see, size and put a timeout on.
A KV budget handles sessions of different lengths. The second paper's budgeter sums the KV demand of admitted sessions, D = the sum of each session's context plus its next output, admits a session while D stays under 75% of the pool and parks one at its next turn boundary when D passes 95%. The thresholds were fixed before the experiments; moving them to 65/85 or 85/98 changed nothing. It prevented the collapse in every run, and in 7 of 7 runs that had already collapsed it brought the hit ratio back within 5 minutes; a plain session cap did it within 6. We did not test the budgeter or recovery from a trap here.
The cap is per replica. Behind a router that spreads a session's turns over replicas, each replica sees sessions it cannot cache anyway; route sessions to a replica (Prefix-Aware Routing) before you bound them there.
Seeing it
The trap is easy to detect because nothing else looks like it: the prefix-cache hit ratio falls to near zero while traffic stays the same and the cache is full. In Prometheus, against vLLM's metrics:
(
rate(vllm:prefix_cache_hits_total[5m])
/ rate(vllm:prefix_cache_queries_total[5m])
) < 0.3
and
avg_over_time(vllm:kv_cache_usage_perc[5m]) > 0.8
Set the hit threshold well below your normal ratio: ours was 86% healthy (first turns always miss) and 0% trapped, with KV usage averaging 0.91 in the trap (never below 0.81) against 0.25 healthy; with a shared system prompt the trapped floor is the prompt's share of the context, about 10% in the second paper. Time to first token is the user-facing symptom, but it rises for many reasons; the hit ratio falls for one.
To check a deployment before it happens, compare two numbers per replica: the KV the sessions in flight need at your peak (sessions in the system times their mean context) against the pool, and your arrival rate against the all-miss capacity (prefill throughput divided by the full contexts of a whole session). If the first can pass 1 and the second is near or above 1, a burst can trap you. Our measurement scripts are attached: collapse_sim.py drives sessions against any OpenAI-compatible server, collapse_analyze.py turns its logs into the table above, and collapse-results.txt has the measurements behind every number here.
Verdict
If you serve agents, multi-turn sessions whose context lives in the prefix cache between turns, on a replica whose load is at or near its all-miss capacity, or above it (71% of the warm-cache capacity in our runs, about a quarter with the second paper's long contexts), you are exposed: the healthy state is not the only stable one, and a burst you would otherwise absorb can move you to the other. Our small reproduction and the papers' larger ones agree on the mechanism, LRU eviction plus a cyclic workload plus Little's law, and on the cure: bound the sessions admitted to a replica so their KV fits its pool.
Put a session cap or a KV budget in the gateway or agent runtime, per replica, released only at turn boundaries; size it from the pool and the largest session context; add the hit-ratio alert. The price is a visible queue before first turns during bursts, which is cheaper than the 5 to 10-minute sessions of the trapped state.
What would change the call: sessions that share most of their prompt (a long common system prompt keeps a floor of hits), loads far below the all-miss capacity (the papers predict a trap drains there), or an engine that learns about sessions and evicts accordingly, which neither vLLM 0.33.0 nor SGLang 0.5.22 does.
- Running an agent product on vLLM or SGLang: add the alert this week, then the cap; the alert costs nothing.
- Running chat or single-turn traffic: not exposed in this way; requests do not come back for their context.
- Building a gateway or agent runtime: the session is your unit, not the request. Count resident KV per replica and park at turn boundaries.
Gotchas
We shrank the pool. 68,000 tokens is a quarter of what vLLM would allocate for this model on our machine, chosen so short sessions would behave like long ones. The ratio is what we tested; with the default pool, the same 8B model needs about four times more sessions in flight to get there, which agents with 30,000-token contexts reach easily.
One engine, one model, two seeds. Both uncapped seeds trapped and the capped one did not, which matches the papers' 30 of 30 and 9 of 12, but two seeds measure nothing about how often. We did not test SGLang, a shared system prompt, or recovery from a trap.
A cap sized for the average fails at the peak. Contexts grow every turn; size the cap from the largest context a session reaches, or use a budget that counts actual context.
Waiting sessions have no context yet; parked ones do. A cap that only gates first turns recovered 1 of 7 collapsed runs in the second paper. The cap we tested is of that kind: it prevented the trap, but it would not rescue a server already in one. To get out, sessions already admitted must be parked at their next turn boundary.
Timeouts turn the trap into retries. With first tokens at 40 seconds, a client timeout of 30 seconds would have retried every turn, from scratch, with the same context. Retries add load; put the queue in front of the first turn, where a timeout is cheap.
For how vLLM and SGLang find a shared prefix and what breaks a hit, see Prefix Caching; for keeping a session's turns on the replica that holds its cache, Prefix-Aware Routing Across Replicas.
Sources
- Inside the Trap: A Renewal Law for Prefix-Cache Collapse in LLM Agent Serving, arXiv 2611.08902, 6 November 2026 (code)
- Bursts That Outlast Themselves: Persistent Degradation in Prefix-Cached Agent Serving, arXiv 2611.13412, 10 November 2026
- vLLM v0.33.0:
kv_cache_utils.py,block_pool.py,arg_utils.py