Metastable failures in prefix-cached LLM agent serving
Ali Jannesari · SwaPP Lab, Computer Science, Iowa State University · ongoing
An agent works in a loop: model call, tool call, model call, re-sending the
whole growing conversation each turn. Serving engines such as SGLang and
vLLM keep that shared prefix in a GPU KV cache so a follow-up turn costs a
fraction of the first. The cache is small, though. When enough agent
sessions compete for it, a session evicted while it waits on a tool has to
recompute everything on its next turn, and that extra work keeps the cache
full and evicts the next session. The question is whether a short burst of
traffic can push an otherwise healthy server into a self-sustaining
all-miss, low-throughput state, a metastable failure, and which scheduling
and admission mechanisms prevent it.
Three instruments. A discrete-event simulator of a continuous-batching
engine with prefix caching, covering scheduling policies, eviction rules,
memory-allocation modes and re-implementations of recently proposed
mechanisms. A queueing-theoretic thrashing-curve model that connects the
classical working-set and metastability literature to agent workloads and
says when caching helps, when it collapses, and when admission control
restores stability. And a load-testing harness that drives a production
engine, SGLang serving a 7B-parameter model on NVIDIA A100s, on Iowa
State's Nova cluster through SLURM, with the prediction for each run
committed before the run and paired control arms under common random
numbers. On the real engine, cache reuse collapses sharply once concurrent
sessions exceed the cache's working set and throughput falls severalfold,
which matches the simulator. Whether the collapse outlives the burst that
caused it is the experiment in progress.
Public overview:
Nova-Research-Overview.
Code and data held back pending the preprint.