Inside the Trap: A Renewal Law for Prefix-Cache Collapse in LLM Agent Serving
Akshat Valse, Ali Jannesari
Abstract
Prefix caching lets an LLM agent's follow-up turns reuse cached KV, but a burst can tip an engine into a trap in which every turn misses and the backlog does not drain, at a load it served before. In registered paired tests on two engines, two GPUs and two models (passed at 9 of 10 rates), a 200-session burst left the engine at zero hits to the end in all 30 runs, while every matched no-burst run stayed good and a session cap prevented the trap in all 30 capped runs. We analyse an idealization of the trapped state exactly: for a fluid FIFO server on which every turn misses, we prove that along FIFO orbits its cycles obey a linear renewal recursion. As is classical, the trap drains if and only if arrivals are below the all-miss capacity; above it, a Perron root fixes the dynamics: every trapped state converges to a known self-similar regime in which the gap between turns grows linearly and the turns served are young and short. For our workload the backlog grows at 0.6 to 0.8 of the excess load and sessions complete faster than the all-miss capacity, a youth premium with turn-count and cost-growth factors, so in the model a trap's measured throughput overstates the recovery threshold. Retrospectively, with nothing fitted to trap data, the theory matches 57 stuck runs: the mean served prompt within 3% in 50 runs, completions above the all-miss capacity in every run, and the pooled gap growth. Blind in outcome, 4 runs trapped by a tool slowdown met 4 of 5 pre-set scores, cut traps persisted, and with a 20-step budget, trapped runs completed below the all-miss capacity, as predicted. Of two exits, refusing arrivals sheds sessions; a session cap restores reuse: in registered tests it rescued 9 of 9 established traps at the same load without shedding, and the engine stayed good after release. We do not prove that the engine converges to the model.
Create a lesson
Related papers
Bursts That Outlast Themselves: Persistent Degradation in Prefix-Cached Agent Serving
Shared title terminology · Wen Huang, Jack Liu
When Cache Pressure Becomes a Trap: Metastability in Agent Serving
Shared title terminology · Chengzhi Lu, Boxi Zhou, Yanying Lin et al.
HiState: Hierarchical Prefix Cache Management for Hybrid LLM Serving in Agentic Workloads
Shared title terminology · Zaifeng Pan, Lucas Wang, Xinwei Qiang et al.
Rethinking KV Cache Eviction for Agentic LLM Serving
Shared title terminology · Jiakun Fan, Han Meng, Yuxuan Xia et al.
Contexture: Runtime Context Eviction for High-Throughput Agent Serving
Shared title terminology · Colin Hong, Bryan Shan, Wei Siong Pang et al.
TideCache: Efficient Hybrid LLM Serving with Transparent Cache Management and Layer-Wise Streaming
Shared title terminology · Jinbin Luo, Xiaozhe Yao, Shang Yang et al.