Unit 6 of 11 · about 4 hours · explain, derive

Prefill-decode disaggregation and independent phase capacity

Disaggregation removes one source of phase interference and introduces a new queue and transfer boundary. Pool sizes must follow service demand and SLOs, not just the input-to-output token ratio.

You'll be able to

  • Trace a request through prefill, KV handoff and decode, locating each queue and duplicated model copy.
  • Derive independent phase demand and a bottleneck capacity bound for a declared workload.
  • Explain how phase-specific batching and parallelism can improve isolation while stranding capacity in the other pool.

Covers

Prefill and decode disaggregationIndependent phase parallelism and capacity
1

Read

In this order, only the parts listed

0 of 3 done

  1. The independent phase trade-offDistServe: Disaggregating Prefill and Decoding for Goodput-Optimized LLM Serving

    arXiv:2401.09670v3, Section 2.3 Problems and Opportunities, then Sections 3.1 Analysis for Prefill Instance and 3.2 Analysis for Decoding Instance

    Use the phase and queue models, not the paper's speedups as targets. Its constant-service, Poisson-arrival queue approximation is not a tail-SLO model for arbitrary prompt mixtures.

  2. What each phase pool ownsAI Systems Performance Engineering - Chapters 15 and 17, distributed and disaggregated inference

    Chapter 15, Disaggregated Prefill and Decode Architecture; Chapter 17, Disaggregated Prefill and Decode Cluster Pools

    Read the architecture, memory-management and phase-worker design. Skip deployment snippets and fixed hardware recommendations; use Dynamo v1.5.1 for the current orchestration path.

  3. Where phase separation helps and losesNVIDIA Dynamo - Disaggregated Serving and KV-Aware Routing

    Dynamo v1.5.1, Performance Characteristics - Prefill saturation, Decode memory tradeoff and Capacity effects of disaggregation

2

Focus on

  • Build on Mixing prefill and decode, and chunked prefill to protect decode. Separate pools remove same-device mixed-phase execution, but not queueing, host contention, shared-link contention or decode KV pressure.
  • DistServe prefill produces prompt KV and the first sampled token. Follow the first token explicitly: receiving it is not the same event as having KV ready for the next decode step.
  • For arrival rate , mean prompt length and mean output length , prompt demand is . If prefill emits the first token, subsequent decode demand is . Declare that convention before using token/s capacities.
  • An idealized fixed-throughput bound is the minimum of each pool's token capacity divided by its per-request token demand. Actual capacity must also satisfy KV admission, transfers, arrivals and latency tails; token rates vary with batch, lengths and cache reuse.
Common mistakes · 3
  • Sizing pool counts from token ratio alone. One prompt token and one decode token need not consume equal service time or memory.
  • Treating phase isolation as independent end-to-end latency. The request still depends on both pools and its handoff.
  • Removing GPUs from decode to add prefill without accounting for stranded weights and lost decode KV capacity.
3

Try it yourself

Closed-book, before checking anything

Derive a transfer-free synthetic bound for two prefill workers, each assumed to sustain 1,000 prompt tokens/s, and one decode worker assumed to sustain 400 subsequent output tokens/s. Every request has 100 prompt tokens and 21 output tokens, with the first output produced in prefill. Both phase bounds are 20 requests/s. Explain why 20 requests/s is a capacity ceiling, not a safe offered-load target or an SLO guarantee, and identify what happens if only prefill capacity doubles.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.In the synthetic example, what is the rate bound after prefill capacity doubles?Answer

    Still 20 requests/s. Decode must produce 20 subsequent tokens per request from its unchanged 400-token/s capacity.

  2. 2.Why must both phase pools hold model weights?Answer

    Both execute the model's layers, although their parallel layouts may differ. Separating phases does not let the decode pool operate from KV alone without model weights.

  3. 3.Why is operation exactly at the ideal rate bound unsafe?Answer

    Variability, bursts and finite buffers create waiting, and any capacity loss can make the backlog grow. A latency contract needs headroom and a workload-specific queue test.

  4. 4.Can higher decode batch size change the phase ratio you should provision?Answer

    Yes. It changes effective decode throughput, token latency and workspace or KV availability. Recompute the ratio under the chosen operating point.

You're done when

Your request trace names every phase queue and first-token event, and your capacity derivation identifies the limiting phase without treating its ceiling as an SLO-qualified rate.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 10 more in the section

Also in this section