Inference Trade-offs Explained

Chapter 04 · Disaggregation

Disaggregation and the pool split

Running prefill and decode on separate GPU pools, handing each request's KV cache across a link. Below, the mechanism as the simulator ran it, step by step; then what it measured, why it behaves that way, and the papers.

Check yourself ↓ three questions and what to remember, at the end

Loading the pool animation…

Its row of the matrix

Loading the matrix…

Separate the two phases

Colocated, every instance does both jobs, so each long prefill stalls the decodes sharing its GPUs. Disaggregated (DistServe, Splitwise), prefill runs on one pool and decode on another: decode passes never wait behind a prompt, and in the animation ITL p99 falls from 58.4 ms to 15.2 ms. What it costs: every request's KV cache crosses a link (chapter 6), and prompts now share one prefill instance instead of two, so they queue when they bunch up.

Why the split helps decode and can hurt capacity

The two phases want different things from the hardware: a prefill is compute-bound, a decode memory-bound (the roofline). Splitting them lets each pool be sized and batched for its own bound, and keeps the decode tail flat. But a fixed split is right for only one mix of prompt and output lengths: too few prefill GPUs and prompts queue (TTFT rises), too few decode GPUs and the batch overflows.

ConfigurationTTFT p99TPOT p99SLO metJ / token
Colocated, 2 instances630.2 ms 25.9 ms 97.8% 3.09
Disaggregated 1P1D854.2 ms 15.2 ms 99.7% 2.77
Recorded in results.md section 3: Llama-3-70B, four H100s per instance, four requests per second. ✓ / ✗ against colocated.

Which workloads it helps

In the sweep, disaggregating into one prefill and one decode instance of four GPUs cuts TPOT p99 on every workload (chat -37%) but raises TTFT p99 (chat +46%), and capacity under both SLOs moves both ways: goodput per GPU +66% on real-time voice, whose tight TPOT SLO the colocated stalls break, but -17% on chat and -33% on offline batch, which only wants throughput. A different split (two smaller prefill instances) does not rescue chat (-5%); on voice it gains +60%, against +66% for the even split.

With paged decode KV and a prefix-cached prefill pool the disaggregated cluster gains +2577% on voice: that number is real but sits at an SLO cliff (the baseline barely meets voice's tight SLOs), which is why the matrix marks it. The combined colocated configuration (chapter 13), with FP8 as well, gains more there.

What the sweep measured, lever by lever

Disaggregated 1P1D (TP4 each)

Change from the baseline on H100, at capacity for goodput, cost and energy, at the reference load for latency. Run it live

Workloadgoodput$/M tokJ/tokTTFT p99TPOT p99ITL p99
Chat-17% +21% $+4% +46% -37% -90%
Coding agent-29% +42% $+13% +14% -42% +3%
Offline batch-33% +49% $+19% +86% -92% -88%
Long-context RAG-3% +3% $-1% +60% -50% +0%
Real-time voice+66% -40% $-32% +28% -28% +75%

Disaggregated 2P (TP2) + 1D (TP4)

Change from the baseline on H100, at capacity for goodput, cost and energy, at the reference load for latency. Run it live

Workloadgoodput$/M tokJ/tokTTFT p99TPOT p99ITL p99
Chat-5% +5% $-1% +40% -37% -90%
Coding agent-100% – $– +48% -42% +3%
Offline batch-28% +39% $+16% +71% -91% -88%
Long-context RAG+3% -3% $-4% +77% -50% +1%
Real-time voice+60% -38% $-31% +35% -28% +73%

Disaggregated 1P1D, paged decode, prefix-cached prefill

Change from the baseline on H100, at capacity for goodput, cost and energy, at the reference load for latency. Run it live

Workloadgoodput$/M tokJ/tokTTFT p99TPOT p99ITL p99
Chat+123% E-55% E$-49% E-52% -37% -90%
Coding agent+1054% E-91% E$-88% E-82% -42% +3%
Offline batch-33% +49% $+19% +86% -92% -88%
Long-context RAG+15% -13% $-14% +37% -50% +1%
Real-time voice+2577% E-96% E$-93% E-84% -28% +75%

Caveats on these numbers

  • EHuge percentages come from a baseline at its SLO edge. Capacity is the highest load at which 90% of requests meet both SLOs. Where the baseline sits just past a latency cliff (voice and the coding agent especially), a lever that pulls latency back under the SLO multiplies capacity, so gains of hundreds or thousands of percent are real in the model but say more about the cliff than about the lever. Marked wherever capacity at least doubles; read the absolute numbers too.
  • $Prices per GPU-hour are illustrative. Cost per million tokens uses round illustrative prices (H100 $3.00, H200 $3.50, B200 $5.00 per GPU-hour), not quotes. Cost scales linearly with them, so the ranking of levers on one device does not depend on them; comparisons across devices do.

✓ better than the baseline, ✗ worse, by more than ±2%. Every lever on every metric and device: the matrix; on any two metrics: the explorer.

Check yourself

Commit to an answer before you reveal it: a wrong guess you can explain teaches more than a right one you skimmed. Every number in the answers comes from the same tested model as the chapter’s.

Q1In the animation, what is ITL p99 once prefill and decode run on separate pools, in ms?
Reveal the answer

Answer: 15.2 ms (counted right within 10%)

Against 58.4 ms colocated: decode passes never wait behind a prompt.

Separate the two phases →

Commit to a number, then reveal.

Q2Disaggregating into one prefill and one decode instance: what happens to chat's TTFT p99?
Reveal the answer

Answer: It rises

It rises +46%: prompts now share one prefill instance instead of two, and queue when they bunch up, while TPOT p99 falls.

Which workloads it helps →

Pick one, then reveal.

Q3So which workload's goodput does the split raise, and which does it cut?
Reveal the answer

Answer: It raises voice's, whose tight TPOT SLO the stalls break, and cuts chat's

Voice +66%, chat -17%: a fixed split is right for only one mix of prompt and output lengths.

Which workloads it helps →

Pick one, then reveal.

Papers and sources