Before you start: words you need#
| Word | Plain meaning |
|---|---|
| KVCache-centric | Designing the whole serving system around where KV caches live, how they are reused and how they move, rather than around GPUs alone. |
| Disaggregated KV cache pool | KV blocks kept in the spare CPU DRAM and SSDs of all GPU servers, shared across the cluster, not only in one GPU’s memory (14.l). |
| RDMA / GPUDirect RDMA | Network transfers that read and write remote memory (CPU or GPU) without involving the remote CPU (9.c). |
| Prefix hash | A hash of a block of tokens and everything before it, so equal hashes mean equal prefixes (17.f). |
| Conductor | Mooncake’s global scheduler, which picks a prefill node and a decode node for each request. |
| Chunked pipeline parallelism (CPP) | Splitting a very long prompt into chunks and pipelining them across several prefill nodes to cut TTFT. |
| Early rejection | Refusing a request at the door when the system predicts it cannot meet its SLO, instead of wasting prefill work on it. |
| Overload | More demand than capacity. Most papers assume it away; a popular consumer service lives in it. |
1. The paper#
- Title: “Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving”
- Authors: Ruoyu Qin, Zheming Li, Weiran He, Mingxing Zhang, Yongwei Wu, Weimin Zheng, Xinran Xu (Moonshot AI, Tsinghua University)
- Venue: arXiv technical report (June 2024, revised since). A version titled “Mooncake: Trading More Storage for Less Computation” won a Best Paper award at USENIX FAST 2025.
- Links: arXiv:2407.00079 · FAST ‘25 paper · code: kvcache-ai/Mooncake
It describes the production system behind Kimi, Moonshot AI’s chatbot, known for long context.
2. The problem#
Kimi’s workload looked unlike academic benchmarks:
- Very long prompts, short answers. In the sample trace the paper releases, the average input is 8,590 tokens and the average output 182 — a ratio of about 720. Prefill dominates cost.
- Lots of repeated context. Users re-send the same long documents and chat histories. A large cache could skip much of that prefill.
- Constant overload. Demand grew faster than GPUs. The question was not “how fast at low load” but “how many requests can we accept and still meet SLOs”.
GPU memory is far too small to cache prefixes for millions of long conversations. Meanwhile each GPU server has hundreds of gigabytes of CPU DRAM, local SSDs and fast RDMA NICs that sit mostly idle.
3. The idea#
Trade storage for computation. Treat the KV cache as a cluster-wide, multi-tier resource:
- Disaggregate prefill and decode (as in 30.q) into separate GPU pools.
- Build a distributed KV cache pool in the CPU DRAM and SSDs of all nodes, with blocks addressed by prefix hash and moved over (GPUDirect) RDMA by a transfer component (the “Messenger”, later the open-source Mooncake Transfer Engine).
- A KVCache-centric scheduler (Conductor) chooses, for each request, the prefill node that minimises expected TTFT — combining how much of the prefix it already has cached, its queue, and the cost of fetching missing blocks from elsewhere — and a decode node that can meet TBT.
- Replicate hot blocks to more nodes; evict cold ones.
- Under overload, reject early using a prediction of future decode load, so the cluster does not waste prefill on requests that would miss their SLOs anyway.
flowchart LR R["Request"] --> C["Conductor: match prefix hashes, pick prefill + decode nodes"] C --> L["Load cached prefix blocks (remote DRAM/SSD over RDMA)"] L --> P["Prefill pool: compute only the new tokens (CPP for long prompts)"] P --> T["Stream KV layer by layer to decode node"] T --> D["Decode pool"] P --> S["Store new blocks in distributed KV pool"] class R io class C neutral class L,S,T memory class P,D compute
4. How it works#
- Blocks and hashes. KV is stored in blocks (the released trace uses 512-token blocks); each block is keyed by a hash of its tokens and its prefix, so identical prefixes deduplicate across users.
- Request flow: (1) load the reusable prefix from the pool into GPU memory; (2) incremental prefill of only the new tokens, writing KV back to the pool; (3) stream KV to the chosen decode node layer by layer; (4) decode with continuous batching.
- Long prompts: chunked pipeline parallelism across a group of prefill nodes, which the authors prefer to sequence parallelism because it needs less cross-node communication and suits varying lengths.
- Cache policy: on the released trace, LRU did best; growing the cache from 1,000 to 50,000 blocks raised the hit ratio from 34% to 55%, and over half the blocks were never reused.
- Overload: naive early rejection makes load oscillate between prefill and decode pools; predicting decode load a little ahead smooths it.
5. Results#
| Claim | Result |
|---|---|
| Throughput vs baseline (vLLM, colocated, no global cache) in simulated long-context scenarios | up to 525% higher while meeting SLOs |
| End-to-end on public long-context datasets (ArXiv summarisation, L-Eval) | 20% and 40% more throughput than four vLLM instances, with a 3 prefill + 1 decode split |
| Real Kimi workload | 75% more requests handled |
| Released trace | average 8,590 input tokens, 182 output tokens |
Read the 525% as a best case: it comes from simulation with a dummy LLaMA2-70B-shaped model on long-prompt, high-reuse workloads, compared with a 2024 vLLM that had only local prefix caching. The 75% figure from production is the more conservative and more useful number.
6. What held up and what did not#
Held up
- The KV cache as a cluster resource. Multi-tier KV stores (GPU → CPU DRAM → SSD → remote) are a standard part of 2026 serving stacks: LMCache, NVIDIA Dynamo’s KV block manager, llm-d’s KV-aware routing, SGLang’s HiCache (14.k, 14.l, 21.j).
- Mooncake’s code. The Transfer Engine and Mooncake Store are open source and integrated as KV connectors in vLLM and SGLang, and used for disaggregation by others (19.b).
- Cache-aware, SLO-aware scheduling across prefill nodes: the basis of prefix-aware routing (21.h).
- Admission control under overload as a first-class design concern (20.c).
- Real traces released by a production provider gave researchers realistic long-context workloads.
Did not, or changed
- Not every workload benefits. Short prompts with little reuse gain little from a remote cache and pay for transfers. Mooncake is tuned for long-context chat.
- Chunked pipeline parallelism stayed less common than context parallelism and plain chunked prefill for long prompts in the open engines (14.f).
- Hardware moved on. NVL72 racks with large NVLink domains change the cost of moving KV versus recomputing it; the trade-off has to be re-measured per platform (9.e).
7. Where it lives in 2026#
- Taught in depth: KV offloading and transfer in 14.k, distributed KV caches in 14.l, moving the KV cache in 9.e, vLLM KV connectors in 19.b, prefix-aware routing in 21.h, Dynamo and llm-d in 21.j.
kvcache-ai/Mooncakeis actively developed; vLLM v0.32.0 includes a Mooncake KV connector, and SGLang uses the Mooncake transfer engine for prefill/decode disaggregation.
Checked on 13 November 2026.
8. Questions#
- Why does a workload with 8,590-token inputs and 182-token outputs favour caching prefixes?
- What spare resources does Mooncake use for its KV pool, and why are they “free”?
- How does the Conductor choose a prefill node? What does it trade off?
- Why hash a block together with its prefix rather than on its own?
- What goes wrong with naive early rejection, and how does prediction help?
- The paper reports 525% and 75%. Which would you quote to a manager, and why?
- Your workload is 300-token prompts with no shared context. Would Mooncake’s design help?
9. Further reading#
- arXiv:2407.00079 — sections 3–6.
- Mooncake at FAST ‘25.
- kvcache-ai/Mooncake on GitHub — includes the released trace.
- 14.k and 14.l in this material.
- Next: FlashInfer (30.x).