FDEInterviews logo
arXiv preprint

LMCache: An Efficient KV Cache Layer for Enterprise-Scale LLM Inference

Treat the KV cache as data that outlives the request: store it beyond the GPU, move it in big chunks, and reuse it across queries and engines. With vLLM, up to 15× throughput.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2025
AUTHORS
Liu, Yao, Cheng, An, Chen, et al.
FROM
Tensormesh, University of Chicago
PUBLISHED
Oct 2025 · arXiv preprint
CITED BY
184Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 25% of this breakdown.

01

The paper in one minute

The KV cache started as a per-request scratchpad: computed during prefill, read during decoding, discarded at the end. Two trends changed that. Prefix caching reuses one query's KV cache for later queries that share its beginning, such as a long document, a system prompt or a conversation history. Prefill–decode disaggregation computes the cache on one GPU and decodes on another. Both need KV caches to live outside a single request and often outside GPU memory, where there is too little room to keep everything worth reusing.

LMCache, from Junchen Jiang's group at the University of Chicago and the company Tensormesh, is an open-source layer that does this. It plugs into vLLM and SGLang through a connector interface, extracts KV caches as requests run, stores them across a hierarchy (GPU memory, CPU memory, local disk, remote storage such as Redis or S3), and loads them back when a later query shares the prefix. It also ships caches between prefill and decode instances.

Most of the paper is about making the data movement fast. Engines store KV in pages of 16 tokens per layer, 20 to 63 KB each, far too small to saturate a network or a PCIe link. LMCache gathers pages into 256-token chunks through a GPU staging buffer, moves them with DMA, loads the next layer's cache while the current layer computes, batches writes of newly decoded tokens, and avoids duplicate copies across tiers. It also exposes controls such as lookup, pinning, cleanup, movement and compression, so routers can send a query to the machine that already holds its cache.

With vLLM, it delivered up to 15× throughput on multi-round question answering and document analysis, 3.7–6.8× lower time to first token on real company traces, and much higher loading bandwidth than vLLM's built-in offloading. The paper ends with lessons from production users, including one that matters to anyone designing prompts: truncating long contexts to the most recent tokens cut a real trace's prefix cache hit rate from about 85% to 45%.

THE IDEA, VISUALLY
KV CACHE AS DATA THAT OUTLIVES THE REQUEST vLLM / SGLang engines, paged KV LMCache connector extract · load · lookup GPU memory fastest, smallest CPU DRAM local offload local disk larger remote store shared: Redis, S3, NFS Moves 256-token chunks, not 16-token pages Loads layer i+1 while layer i computes Stores decode tokens in batches Two uses: reuse a prompt's cache across queries (chat history, documents, RAG), and ship caches from prefill GPUs to decode GPUs. Supports vLLM and SGLang through a connector interface MEASURED WITH vLLM up to 15× throughput across workloads 3.7–6.8× lower TTFT on real company traces 400 vs 88 Gbps loading, LMCache vs vLLM native 1.5–1.8× lower TTFT than vLLM's native PD split A PRODUCTION LESSON prefix cache hit rate, company F trace 85% full context 45% with truncation Keeping only the latest tokens shifts the prefix, so cached KV no longer matches.
LMCache turns the KV cache into a stored, movable asset shared by engines and queries. Its production data also show how easily a prompt-handling choice can halve cache reuse.
Research notes: the problem, approach and results
15×

throughput improvement with vLLM on multi-round question answering and document workloads

85% → 45%

prefix cache hit rate on a real trace when long contexts are truncated to recent tokens

400 vs 88

Gbps of KV loading bandwidth, LMCache vs vLLM's native CPU offloading

THE PROBLEM

Prefix caching and prefill–decode splitting both need KV caches outside a single GPU's memory, but engines kept caches in GPU memory and moved them in small pages that cannot saturate links.

THE IDEA

A caching layer between engines and storage tiers: extract and reload KV through a stable connector, move it in large chunks with pipelining and zero-copy, and expose controls such as lookup, pinning, movement and compression.

THE RESULT

Up to 15× throughput with vLLM on multi-round Q&A and document analysis, 3.7–6.8× lower time to first token on real traces, 400 Gbps loading against 88 for vLLM's native offload, and wide enterprise adoption.

02

Why it matters to an FDE

Long documents, RAG with repeated sources, coding assistants with growing histories and multi-turn chat all reprocess the same tokens again and again. Each repeat costs prefill compute and time to first token. A KV cache layer turns that repeated work into a lookup.

Reuse is larger than people expect. The authors report that customers did not expect high hit rates, one saw about 50% in production, because reuse comes not only from fixed system prompts but from conversation histories and frequently retrieved documents.

How you handle long context decides whether caching works. Sliding-window truncation, keeping only the most recent tokens, changes the start of the prompt on every turn, so nothing matches the cache. Summarizing old turns into a stable block, or keeping a fixed head and trimming from the middle, preserves the shared prefix.

Loading can beat recomputing, but check the bandwidth. With fast links, loading a stored cache is quicker than recomputing it at every context length the authors tested. With slow links, loading wins only for very long contexts; at 32 Gbps, only beyond about 256K tokens in their setup. Decide per deployment, and per request if possible.

Remote storage has become viable. Object stores that used to deliver about 100 MB/s now approach 1 GB/s, and users loading caches from their own object store saw 22–32% lower time to first token than full prefill.

Routing should know where caches live. With several replicas, sending a request to the replica holding its prefix is the difference between a hit and a recompute.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 49 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The design, the performance techniques, the production lessons, and the misreadings to avoid

    Free account
  2. 04How it works

    Store, retrieve and lookup paths, the batching and pipelining, and cache-aware routing

    Premium
  3. 05The numbers that matter

    Every headline result, the bandwidth crossover, and how to read a vendor-authored evaluation

    Premium
  4. 06Try it yourself

    Estimate when loading a stored KV cache beats recomputing it, and see how truncation destroys reuse

    Premium
  5. 07Where it breaks

    The conditions under which a KV cache layer does not pay, and the gaps in the evaluation

    Premium
  6. 08Using it on a deployment

    Adding a KV cache tier to a customer's serving stack, and designing prompts that reuse well

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →