arXiv:2611.02543cs.DCNov 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2611.02543

When Cache Pressure Becomes a Trap: Metastability in Agent Serving

Chengzhi Lu, Boxi Zhou, Yanying Lin, Dmitrii Ustiugov

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Chengzhi Lu

Nanyang Technological

University

Singapore

chengzhi.lu@ntu.edu.sg

Boxi Zhou

Nanyang Technological

University

Singapore

bzhou01l@e.ntu.edu.sg

Yanying Lin

Harvard University

Cambridge, MA, USA

yanying_lin@seas.harvard.edu

Dmitrii Ustiugov

Nanyang Technological

University

Singapore

dmitrii.ustiugov@ntu.edu.sg

Abstract

LLM agents repeatedly send a growing conversation to a model, making prefix reuse central to efficient serving. We show that a brief surge can disrupt this reuse and trigger metastable failure in prefill-decode (PD) disaggregated engines: service remains degraded after arrivals return to a load the engine previously sustained. On SGLang, a ten-minute surge reduced goodput by about 88% over the following hour. Removing the residual burst sessions restored service within minutes.

The sustaining mechanism is population-cache feedback. Slower calls prolong sessions and enlarge their aggregate context, or working set; the resulting cache misses increase recomputation and further delay departures. A fluid model identifies the resource conditions for this feedback and explains how cache capacity, tool time and base load affect vulnerability. Across 36 simulated deployments, it flags all 17 cache-first cases. Controlled simulations hold the post-surge state fixed and show that changing subsequent arrivals alone reverses the recovery outcome. Once the cache collapses, low-reuse departure capacity sets the scale of the load reduction needed for recovery.

Guided by these dynamics, we build BASIN, which gives each session a fixed priority, reserves their predicted peak contexts against an adaptive admission budget, extends the cache with idle decode memory, and sheds excess demand. On real H200 1P3D deployments under surges, including long-context SWE-bench Pro sessions, an arrival-time prototype achieves 1.20–1.70× the goodput of Continuum and 2.35–3.59× that of HiCache alone. In simulation, the predictor-driven policy delivers 1.20–2.05× the strongest baseline's goodput across six surge scenarios.

1 Introduction

LLM agents build long conversations as they alternate between model calls and tool executions. Each call resends much of the preceding context: in the Terminal-Bench traces we study, the median prompt contains 25.6K tokens, 98% of which appeared in the preceding call. Prefill-decode (PD)

Figure

(a) Why: a feedback loop

(b) Effect: completions fall

Fig. 1: Population–cache feedback (schematic). (a) Cache misses extend session lifetimes, increasing the working set and further reducing reuse. (b) Departures rise with active sessions until cache pressure reduces throughput. A surge crossing the unstable intersection with base arrivals leaves departures below arrivals and active sessions accumulating.

disaggregated engines [65, 67, 95] use prefix caching to reuse this earlier computation. A returning call then prefills only its new tokens, reducing prefill work by up to 50×50\times when the prefix is available.

The problem. This reliance on prefix reuse also creates a vulnerability: a brief surge can leave the engine persistently degraded even after arrivals return to a rate it previously sustained. On SGLang, a ten-minute burst reduces goodput by about 88% over the following hour ( §3§3). Before the burst, prefill and decode both operate well below saturation. Utilization, queue length and KV usage, commonly used for scaling and overload control [42, 67, 74, 92], all show ample headroom and give little warning of the failure. The degradation persists after the trigger ends, a defining feature of metastable failure [7,31].

Why it happens. The degradation outlasts the burst because slower calls keep sessions active and competing for the cache. A surge enlarges the engine's working set: the combined context of active sessions, including those executing tools. Cache contention evicts prefixes, forcing returning calls to recompute more tokens. The extra prefill work slows calls and keeps sessions active longer, since a session ends only after its final turn. New arrivals during this delay enlarge the working set, causing more eviction and recomputation (Fig. 1). To

Figure

(a) Capacity

(b) Scheduling

(c) Load signals

(d) Ours

Fig. 2: Existing remedies (a–c) and our design (d) on the curve of Fig. 1b (gray: unchanged engine). (a) More capacity moves the cliff; vulnerability remains if the cache still limits the engine first. (b) Serving sessions already in progress first limits entry into the working set, but a surge can leave a long queue. (c) A fixed load or capacity threshold can admit too much or hold sessions out unnecessarily. (d) BASIN combines fixed session priority (2), lent cache capacity (1), and admission and shedding for excess load (3).

test whether these accumulated sessions sustain the failure, we terminate the sessions introduced by the burst; service recovers within minutes. In a matching run that lets those sessions finish, active sessions keep accumulating after the last burst session departs, with arrivals at the original base rate.

Once this feedback develops, the engine can complete fewer sessions than arrive at the original base rate, so active sessions continue to accumulate after the surge ends. Recovery requires completions to exceed new arrivals, making the outcome depend on both the state left by the surge and the load that follows it. Controlled simulations confirm this dependence: runs with the same post-surge state recover under lighter arrivals and remain trapped under heavier arrivals. For a given deployment, the recovery boundary therefore depends on the base load.

Existing remedies. To improve the balance between session arrivals and completions, existing systems change capacity, service order or admission. Capacity expansion adds cache tiers or borrows idle decode resources to raise prefill throughput [48,67,84,85]. More cache supports more active sessions before the cliff, but feedback remains possible if cache pressure still limits service before decode saturates (Fig. 2a). Scheduling changes request or session priorities to preserve reuse and accelerate completion [1, 43, 93]. Prioritizing sessions already in progress can preserve reuse but leave new sessions waiting when completions barely exceed arrivals (Fig. 2b). Admission control bounds entry using KV usage, cache feedback or tier capacity [9,37]. KV usage can remain low while tool-idle sessions accumulate prefix demand, whereas a fixed cache-capacity budget can delay admission even while reuse remains high (Fig. 2c).

Our approach. To explain how capacity, scheduling and admission change population–cache feedback, we model the active session population as a fluid, with departures determined by closed-loop demand, cache reuse and decode capacity ( §5§5). The model identifies deployments where cache pressure limits service before decode saturates, flagging all 17 cache-first cases in a 36-deployment comparison. It explains how cache capacity, tool time and base load change vulnerability, and why preserving reuse can still leave a long backlog. Recovery also depends on cache history: in simulation, hit rates remain low after collapse at working sets that sustain high reuse in healthy runs. This hysteresis limits throughput during recovery.

We use this analysis to design BASIN, which tracks session contexts across calls and tool executions (Fig. 2d). It assigns each session a fixed priority from its arrival time and predicted peak context, using the same order for admission and both engine queues. Idle decode memory preserves prompts between calls, reducing recomputation. Running decode requests reclaim the lent memory on demand ( §6§6). An adaptive working-set budget regulates admission, and shedding removes persistent excess demand.

On real H200 1P3D deployments, an arrival-time prototype delivers up to 3.59×3.59 \times HiCache's goodput and 1.70×1.70 \times that of the strongest baseline, Continuum. In simulation with the working-set predictor, BASIN achieves the highest goodput in all six end-to-end scenarios, 1.20−2.05×1.20-2.05 \times the strongest baseline's. In the simulated 3–6× surge-size sweep on 1P3D, BASIN avoids trapping and completes at least 95% of sessions while shedding at most 2.2% ( §7§7).

This paper makes three contributions:

• We identify population–cache feedback: slower calls keep sessions active, and continuing arrivals sustain cache thrashing after a finite surge. Real-system interventions establish its causal role in metastable failure in PD-disaggregated agent serving ( §3§3).

• We develop a fluid model that identifies resource conditions for cache-driven vulnerability and explains the effects of capacity, load and entry control. Across 36 simulated deployments, it flags every cache-first case. Controlled interventions reveal how continuing arrivals and cache hysteresis govern recovery ( §4,§5§4, §5).

• We design BASIN to preserve reuse through a fixed session priority, admission by predicted peak context, and decode-memory lending. A SGLang prototype establishes the benefits of session ordering and lending on hardware; simulation evaluates the full predictor-driven policy across deployments and loads ( §6,§7§6, §7).

References (92)