9.e owns how a KV cache moves (links, GPUDirect RDMA, NIXL, Mooncake) and the transfer-versus-recompute arithmetic; 19.b owns vLLM’s KV connectors and flags; 21.j owns the frameworks (Dynamo, llm-d) that run disaggregated fleets. This lesson is the idea itself: why you split the two phases, how you size and configure each side, and when it pays.
Before you start: words you need#
| Word | Plain meaning |
|---|---|
| Prefill | Reading the whole prompt in one big parallel pass. Limited by compute (12.c). |
| Decode | Generating output tokens one step at a time. Limited by memory bandwidth (12.c). |
| Colocated | The usual setup: the same GPUs run both phases, mixed in one batch. |
| Disaggregated | Prefill and decode run on separate groups of GPUs (“pools”), and the KV cache is sent from one to the other. Often written “P/D”. |
| Interference | A prefill in the same batch makes every decoding user’s next token late. |
| Goodput | Requests per second that meet both latency targets (TTFT and ITL). Plain throughput counts requests that missed them. |
| xPyD | Shorthand for a layout with x prefill instances and y decode instances, such as 1P1D or 4P9D. |
| TTFT / ITL | Time to first token; inter-token latency, the gap between streamed tokens (2.c). |
1. What is it?#
Disaggregated serving runs the two phases of a request on different GPUs. A prefill instance reads the prompt and builds its KV cache; the cache is sent to a decode instance, which generates the answer.
flowchart LR
C(("client")) --> R["Router / proxy"]
R -->|"1. prompt"| P["Prefill pool<br/><small>compute-bound, bursty</small>"]
P ==>|"2. KV cache<br/><small>NVLink or RDMA</small>"| D["Decode pool<br/><small>bandwidth-bound, steady</small>"]
R -.->|"3. same request"| D
D -->|"4. streamed tokens"| C
class C neutral
class R queue
class P,D computeIn 2024 this was a research idea (DistServe, Splitwise, Mooncake). By November 2026 it is the standard layout for large deployments: DeepSeek, Moonshot (Kimi) and most large API providers run it, and vLLM, SGLang and TensorRT-LLM all support it, with NVIDIA Dynamo and llm-d as the frameworks around them (21.j). It is still optional for small ones, and vLLM still labels its own support experimental.
Facts checked on 13 November 2026.
2. Why does it exist?#
Prefill and decode want opposite things (12.c):
| Prefill | Decode | |
|---|---|---|
| Bottleneck | FLOPs | HBM bandwidth |
| Ideal batch | A few long prompts fill the GPU | Hundreds of sequences, to reuse each weight read |
| Latency target | TTFT, often seconds are fine | ITL, tens of milliseconds, every step |
| Load shape | Bursty: arrives with requests | Steady: runs as long as answers stream |
On a colocated GPU they share every step. A 30k-token prompt in the batch makes that step hundreds of milliseconds long, and every user who is streaming sees a stall. Chunked prefill (12.k) cuts the prompt into pieces so the stall is bounded, but each step still carries some prefill work, so ITL is still worse than it would be, and you cannot pick a parallelism or a batch size that suits both phases.
Splitting them removes the interference and lets each pool be tuned, sized and scaled for its own job. The price is a KV transfer per request, a second set of model weights, and a harder system to run.
3. Simple analogy#
A restaurant kitchen with a prep station and a service line.
In a small restaurant one cook does both: chopping for the next table between plating dishes for this one. Every big prep job delays the plates (colocated). A large restaurant gives prep and service their own cooks and passes trays between them (disaggregated). The service line now runs smoothly, and you can hire more prep cooks on banquet nights without hiring more servers. But it only pays when there is enough work to keep both stations busy; a café with one cook and two stations just has one idle cook.
4. Tiny example: one request, end to end#
A 70B dense model, FP8 KV cache (about 160 KB per token), 8,000-token prompt, 400-token answer:
1. router → prefill instance prompt arrives; prefill takes ~1 s on its GPUs
2. KV is sent layer by layer 8,000 × 160 KB ≈ 1.3 GB; over 400 Gb/s RDMA ≈ 30 ms,
mostly hidden under the prefill itself (9.e)
3. decode instance takes over it allocates blocks, reads the KV, emits token 2, 3, ...
4. 400 decode steps none of them shares a step with anyone's prefillTTFT is the prefill plus the part of the transfer that was not hidden, plus a little routing. ITL is set by the decode pool alone. In a colocated engine the same ITL would jump every time some other user’s long prompt was scheduled.
5. Technical explanation#
What splitting buys: goodput, not raw throughput#
Disaggregation rarely makes the GPUs do more total work; vLLM’s documentation says plainly that it “DOES NOT improve throughput.” What it improves is goodput: how much traffic you can carry while still meeting both latency targets. A colocated fleet that must hold a tight ITL target has to run small batches or be over-provisioned; a disaggregated one can push the decode pool to large batches because no prefill ever lands in its steps.
Reported gains, each from the authors’ own benchmarks:
- DistServe (OSDI 2024): up to 7.4x more requests or 12.6x tighter SLOs than colocated serving, on its workloads.
- vLLM with AMD’s MORI-IO connector (April 2026): on one 8-GPU MI300X node with Qwen3-235B-A22B-FP8, 1P1D met the SLOs (TTFT < 1 s, ITL < 50 ms) for 73 of 100 requests, versus 30 for the best colocated layout: 2.5x goodput. Colocated ITL clustered near 150 ms because prefills kept landing in decode steps.
- NVIDIA’s MLSys 2026 study of hundreds of thousands of configurations found it pays most for prefill-heavy traffic and large models, and only with dynamic rate matching and elastic scaling.
Each pool gets its own configuration#
| Prefill pool | Decode pool | |
|---|---|---|
| Token budget per step | Large | Small: no long prompts arrive |
| Concurrent sequences | Few | Many (hundreds) |
| Parallelism | Whatever makes one prompt fastest (higher TP, CP for long prompts, 14.f) | Whatever gives the lowest step time at high batch; wide EP for MoE (14.e) |
| MoE all-to-all mode | High-throughput kernels | Low-latency kernels (14.h) |
| CUDA graphs | Piecewise | Decode-only full graphs, smaller and faster (13.k) |
| KV cache | Transient: held only until sent | Large: holds every active answer |
Early implementations required both pools to use the same tensor-parallel size, because the KV heads are split differently at TP 8 and TP 4. That is no longer generally true: vLLM’s NIXL connector, SGLang and TensorRT-LLM can map between different TP sizes (with restrictions, such as hybrid models; 19.b). Check your engine’s compatibility matrix rather than assuming either way.
The hand-off#
The KV transfer is the crux, but its arithmetic belongs to 9.e. The short version:
- Size. Tens of KB to a few hundred KB per token (12.f), so 0.1–3 GB for an 8k prompt, depending on the model and KV precision.
- Link. Inside an NVLink domain or over RDMA it takes milliseconds to tens of milliseconds and is faster than recomputing. Over plain TCP it may not be.
- Overlap. Sending each layer’s KV while later layers are still computing hides most of it.
- Pull or push. The decode side reserves blocks and reads (pull), or the prefill side writes into blocks reserved in advance (push), which starts earlier but needs coordination (19.b).
- Hold-until-read. The prefill side must keep the blocks until the decode side has them, with a timeout if it never asks.
Sizing the pools: the ratio is set by the traffic#
How many prefill GPUs you need depends on prompt tokens per second; how many decode GPUs, on output tokens per second. So the ratio follows the workload: RAG and summarisation (long in, short out) need many prefill nodes; reasoning models (short in, very long out) need almost none (section 6 computes this).
Traffic mix changes during the day, so a fixed ratio drifts out of balance: too little prefill and TTFT climbs while decoders wait; too little decode and finished prefills queue for blocks. Production systems rebalance continuously. Dynamo’s planner and llm-d’s autoscaling scale each pool against its own SLO (21.j, 23.d), and some systems let an instance switch roles.
Where it runs in 2026#
- DeepSeek (published February 2025): V3/R1 on H800 nodes, prefill instances of 4 nodes (EP32) and decode instances of 18 nodes (EP144). Over one day the fleet averaged about 227 nodes, with about 73.7k input tokens/s per prefill node and 14.8k output tokens/s per decode node. Disaggregation is what let them run the very different EP widths.
- SGLang on 96 H100s (May 2025): DeepSeek-V3 with P/D plus large-scale EP, reporting 52.3k input and 22.3k output tokens/s per node at 2,000-token inputs (project’s own benchmark).
- Mooncake (Moonshot AI): treats the KV cache as a shared distributed store that both pools read and write, which merges disaggregation with prefix caching and offload (14.k, 14.l).
- Frameworks: NVIDIA Dynamo, llm-d and Ray Serve LLM orchestrate P/D on top of vLLM, SGLang and TensorRT-LLM (21.j).
Variations on the split#
- Multi-turn traffic. The decode instance holds the freshest KV of a conversation, but the next turn starts with a prefill. Moving that KV back (vLLM’s bi-directional transfer, October 2026) or keeping a shared store avoids recomputing the history (24.h). Cache-aware disaggregation (Together AI, March 2026) sends cold prompts (little cached context) to their own prefill tier, which writes KV to a shared cache, so warm requests do not queue behind them. It reports up to 35–40% more sustainable QPS than plain P/D on a coding-agent workload on B200s (vendor’s own evaluation).
- Different hardware per phase. Prefill wants FLOPs, decode wants bandwidth, so vendors pair chips: NVIDIA put Groq 3 LPX beside Rubin for latency-critical decode (7.k). The GDDR7-based Rubin CPX prefill chip announced in 2025 is off NVIDIA’s public roadmap (7.e).
- Further splits (EMERGING): encoder disaggregation for images and video, and attention–FFN disaggregation for MoE models (24.f, 24.h). The same rule applies: each split helps at high load and hurts at low load.
6. Under the hood: sizing the two pools#
The program sizes prefill and decode pools from token rates, using DeepSeek’s published per-node figures, and then rounds up to whole deployment units (4-node prefill and 18-node decode instances, as DeepSeek ran them). The first row checks the model against DeepSeek’s own day.
// pdpools.go — how many prefill and decode nodes does a workload need?
package main
import (
"fmt"
"math"
)
type workload struct {
name string
reqPS float64 // requests per second
inTok float64 // prompt tokens per request that must be computed (after cache hits)
outTok float64 // output tokens per request
}
func main() {
// Per-node rates from DeepSeek's published day of V3/R1 serving on H800 nodes (Feb 2025).
const prefillPerNode = 73_700.0 // input tokens/s per prefill node
const decodePerNode = 14_800.0 // output tokens/s per decode node, at their latency target
// Their deployment units: a prefill instance is 4 nodes, a decode instance 18.
const prefillUnit, decodeUnit = 4.0, 18.0
loads := []workload{
{"DeepSeek's day (avg)", 1, 608e9 / 86400, 168e9 / 86400}, // one "request" = the whole day's mix per second
{"chat 2k in / 500 out", 1000, 2000, 500},
{"RAG 8k in / 300 out", 1000, 8000, 300},
{"reasoning 1k / 8k", 1000, 1000, 8000},
{"small: chat at 20 req/s", 20, 2000, 500},
}
fmt.Printf("%-24s %8s %8s %7s %16s %8s\n", "workload", "P nodes", "D nodes", "P:D", "rounded to units", "idle")
for _, w := range loads {
p := w.reqPS * w.inTok / prefillPerNode
d := w.reqPS * w.outTok / decodePerNode
pu := math.Ceil(p/prefillUnit) * prefillUnit
du := math.Ceil(d/decodeUnit) * decodeUnit
idle := 1 - (p+d)/(pu+du)
fmt.Printf("%-24s %8.1f %8.1f %7.2f %7.0f + %-6.0f %7.0f%%\n",
w.name, p, d, p/d, pu, du, idle*100)
}
}Output:
workload P nodes D nodes P:D rounded to units idle
DeepSeek's day (avg) 95.5 131.4 0.73 96 + 144 5%
chat 2k in / 500 out 27.1 33.8 0.80 28 + 36 5%
RAG 8k in / 300 out 108.5 20.3 5.36 112 + 36 13%
reasoning 1k / 8k 13.6 540.5 0.03 16 + 558 3%
small: chat at 20 req/s 0.5 0.7 0.80 4 + 18 94%How to read it:
- The model matches reality. 95.5 + 131.4 ≈ 227 nodes, the same as DeepSeek’s reported average of 226.75 for that day (its input figure includes cache hits, as does the per-node rate).
- The ratio swings by more than 100x with the workload: RAG needs five prefill nodes per decode node; a reasoning model needs one prefill node per forty decode nodes. A fixed ratio is wrong for most of the day.
- Small fleets cannot split efficiently. At 20 requests per second the work fits in about one node, but the smallest disaggregated layout is a whole prefill instance plus a whole decode instance: 94% idle. This is the real reason “disaggregate only at scale”; smaller instances (1P1D on one node, as in the vLLM example) shrink the unit and move the break-even down.
- The per-node rates are fixed here. Real prefill rates fall with prompt length (attention grows faster than linearly) and decode rates depend on the batch you can hold within the ITL target.
7. Performance implications#
- ITL becomes flat. p99 ITL falls close to p50 because decode steps never contain prefill.
- TTFT gains a hand-off. Routing plus the exposed part of the transfer, typically milliseconds to tens of milliseconds with RDMA and layer-wise sending. With TCP or a missing GPUDirect path it can be worse than recomputing.
- Decode batches grow. A decode-only instance can run larger batches at the same ITL, which is where the goodput gain comes from.
- Throughput per GPU stays roughly the same, and drops if the pools are mis-sized: idle prefill nodes during a reasoning-heavy hour are pure waste.
8. Production implications#
- Turn on chunked prefill first (12.k) and measure. If p99 ITL is close to p50 at your load, you do not have the problem disaggregation solves.
- Check the network before anything else: RDMA or NVLink, GPUDirect working inside the containers, and NIC placement (9.c, 9.e). A silent fallback to the host path is the most common reason it ends up slower.
- Plan for two pools and autoscale them separately, with a router that understands the two-step protocol (21.j).
- Upgrade both pools together: the transfer handshake checks versions, KV dtype and model details (19.b).
- Decide what happens when the decode pool is full when a prefill finishes: hold the KV in prefill memory with a timeout, or drop and recompute. Both must be monitored.
- Handle multi-turn sessions explicitly, or every turn re-prefills the whole conversation on the prefill side.
9. Common mistakes#
- Disaggregating before trying chunked prefill. Most deployments get most of the benefit from chunked prefill alone.
- Splitting a small fleet. Two instances where one would do leaves most of both idle (section 6).
- Running the transfer over plain TCP or a broken GPUDirect path. The transfer then costs more than the prefill it saved.
- A fixed P:D ratio. Traffic mix changes during the day; without rebalancing one pool queues while the other idles.
- Expecting more throughput. The gain is goodput under SLOs; measure that.
- Assuming TP must match, or assuming it never needs to. It depends on the engine and model type; read the compatibility matrix.
- Forgetting multi-turn. The freshest KV sits on the decode side, where the next prefill is not.
10. Hands-on exercise#
- Run
pdpools.go. Add a coding-agent workload: 50,000 prompt tokens per turn with 90% prefix cache hits, 800 output tokens, 200 turns per second. What is its P:D ratio? - At what request rate does the “small chat” row fall below 20% idle? What if each unit is one node (1P1D)?
- With vLLM or SGLang, serve one model colocated with chunked prefill, then as 1P1D on the same GPUs. Measure p50 and p99 ITL and the share of requests meeting TTFT < 1 s and ITL < 50 ms at increasing load. Where do the curves cross?
- Using 9.e’s program, find the shortest prompt for which sending the KV over 100 GbE TCP is slower than recomputing it for your model.
- Read DistServe and DeepSeek’s inference-system overview. List what each assumes about the network, the model and the traffic.
11. Interview questions#
- What problem does disaggregated serving solve that chunked prefill does not?
- Why does disaggregation improve goodput but not raw throughput?
- How would you choose the ratio of prefill to decode GPUs, and why must it change over time?
- What can differ between the two pools, and what must match?
- When is the KV transfer slower than recomputing the prefill?
- Why is disaggregation hard to justify for small deployments?
- How do multi-turn conversations complicate disaggregation, and how do systems handle it?
12. Further reading#
Checked on 13 November 2026.
- [ESTABLISHED] Zhong et al., “DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM Serving” (OSDI 2024)
- [ESTABLISHED] Patel et al., “Splitwise: Efficient Generative LLM Inference Using Phase Splitting” (ISCA 2024)
- [ESTABLISHED] Qin et al., “Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving” (FAST 2025)
- [ESTABLISHED] Hao AI Lab, “Disaggregated Inference: 18 Months Later” (November 2025) — who adopted it and what came next
- [ESTABLISHED] DeepSeek-V3/R1 inference system overview (February 2025) — prefill and decode units, one day of real numbers
- [ESTABLISHED] LMSYS — DeepSeek with P/D disaggregation and large-scale EP on 96 H100s (May 2025) — project’s own benchmark
- [EMERGING] Mitra et al., “Beyond the Buzz: A Pragmatic Take on Inference Disaggregation” (MLSys 2026)
- [EMERGING] vLLM — MORI-IO KV connector, single-node disaggregation on MI300X (April 2026) — project’s own benchmark
- [EMERGING] Together AI — Cache-aware disaggregated inference (March 2026) — vendor’s own evaluation
- [REFERENCE] vLLM disaggregated prefilling documentation