arXiv:2610.21500cs.DCOct 2026

Manuscript Offprint

arXiv:2610.21500

When the KV Cache Is Slower Than the GPU: Scaling Remote KV Tiers for Context-Parallel Prefill

Muhammad Ibrahim

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reusing the attention KV cache across requests is a standard way to cut prefill cost in long-context LLM serving, and production systems increasingly back the per-engine cache with a remote tier shared by every engine. We study such a tier in a disaggregated deployment of GLM-5.3, an FP8 mixture-of-experts model with multi-head latent attention (MLA), on 8×B300 nodes running prefill context parallelism (PCP8). Enabling the remote tier (LMCache with a Valkey store) left median time-to-first-token unchanged but raised the 16k-token p99 from 3.96 s to 17.3 s. Replaying a production request stream on an isolated engine, we find that a remote hit took 0.88 s against 0.31 s to recompute the prompt, and that synchronous loading turned a hit-heavy stream into an unstable queue: p99 83.32 s with the GPUs 7% busy. A two-term cost model explains both: a hit pays off only if the tier delivers more than B∗=sRB^* = sR (2.53 GB/s for this model and GPU), and a fixed per-hit engine cost ( T0≈0.33T_0 \approx 0.33 s) means that hits on prompts shorter than about 17k tokens cannot beat recompute at any bandwidth. Guided by the model, we (i) shard the MLA KV store across PCP ranks, with a proof that the existing minimum-over-ranks lookup returns the longest cached prefix and a load protocol that can never desynchronize collectives; (ii) partition the remote tier by rank, one server instance per rank with no coordination, which raises GET bandwidth 6.3× to 10.76 GB/s; (iii) add asynchronous loading to the sharded store; and (iv) fix three client bugs that caused unbounded stalls. On the hit-heavy stream, with 98.5% of prompt tokens served from the remote tier, p99 falls from 83.32 s to 0.67 s. The sharded store raises prefill throughput by 14%, and by 34% together with an upstream kernel fix. All changes are submitted upstream to LMCache.

1 Introduction

For long prompts, prefill dominates time-to-first-token (TTFT): reading a 200k-token prompt takes seconds even on the newest accelerators. Serving systems therefore keep the attention key/value (KV) cache of earlier prompts and reuse it when a new prompt shares a prefix [4, 16, 19, 22, 26]. A common layout has two tiers: a fast tier in each engine's host memory, and a larger remote tier that every engine can read and that survives restarts. The remote tier is attractive because it decouples cache capacity from engine count and lets one engine reuse what another computed.

The implicit assumption behind a remote tier is that loading KV is cheaper than recomputing it. This paper reports a production setting in which the assumption failed, explains why with a simple model, and shows how to restore it.

Setting. We serve GLM-5.3, a large mixture-of-experts (MoE) model with DeepSeek-style multi-head latent attention (MLA) [1, 2], in FP8 on nodes with eight NVIDIA B300 GPUs. Prefill and decode run on separate nodes [21, 27]. Each prefill node runs one vLLM [16] engine with prefill context parallelism across its eight GPUs (PCP8): the prompt is split along the sequence, the ranks exchange KV with collectives, and all eight ranks advance in lockstep. LMCache [19] stores KV in 256-token chunks in host memory (L1) and in a Valkey [24] remote store (L2).

Problem. Turning on L2 for an enterprise SLA workload of 9k–200k-token prompts left median TTFT unchanged but inflated the tail: p99 rose from 3.96 s to 17.3 s at 16k tokens and from 6.06 s to 25.0 s at 32k. The deployment was rolled back to L1 only.

Findings. We rebuilt one production engine’s request stream from logs, replayed it against an isolated engine with the identical image and configuration, and profiled it (§3). Three effects explain the regression:

  1. A hit was slower than a miss. A 16k-token prompt took 0.31 s to recompute but 0.88 s to load from L2 (§6.1). On a B300 node the GPU prefills about 52.2k tokens/s; the L2 path delivered well under the bandwidth needed to keep up with that.

  2. Synchronous loading is unstable under hit-heavy load. A load inside the engine step stalls all eight PCP ranks. When the arrival rate times the per-hit service time exceeds one, the engine becomes an overloaded queue: median latency grew from 3.52 s to 52.30 s within six minutes while the GPUs were 7% busy (§6.3).

  3. Rare client bugs caused unbounded stalls. A lost-completion race and a missing-key read that never returns each froze an engine for 3–10 s per request, or permanently (§5.4).

Contributions.

• A cost model for remote KV hits with two parameters, break-even bandwidth B∗=sRB^* = sR and a fixed per-hit cost T0T_0, validated on configurations that were not used to fit it (§4).

• A sharded MLA KV store for context parallelism that spreads store, lookup and load across ranks, with a proof that the scheduler’s existing minimum-over-ranks lookup returns the longest cached prefix and a load protocol in which every rank issues the same collectives (§5.1).

• A rank-partitioned remote tier: because the sharded store partitions chunks statically by rank, rank r of every engine can use its own server instance without a cluster protocol or client-side hashing, while cross-engine reuse still works (§5.2).

• Asynchronous loading for the sharded store and fixes for three client bugs, each with a regression test (§5.3, §5.4).

• An evaluation by trace replay of production traffic: p99 on a hit-heavy stream falls from 83.32 s to 0.67 s, a 124× reduction, with 98.5% of prompt tokens served from L2; the sharded store raises prefill throughput by 14–34%; and a five-node disaggregated deployment using these changes passes the workload’s SLA (§6).

The broader lesson is that on current GPUs recompute is a demanding baseline. A cache tier has to be judged against the prefill rate of the hardware it serves, not against the latency of the network.