Unit 8 of 11 · about 5 hours · derive
Pool placement, heterogeneous GPUs and the disaggregation break-even
Separating phases is justified only against a comparable colocated plan. A faster phase on a different GPU type can still lose once transfer, queueing, duplicated weights and reserve cost are counted.
You'll be able to
- Derive a workload-specific disaggregation break-even that includes both phase queues, exposed transfer and layout work.
- Choose prefill and decode placements from local memory, shared-link capacity, heterogeneous phase service rates and cost.
- Account for ready reserve, startup lag and draining requests when resizing a phase pool.
Covers
Read
In this order, only the parts listed
0 of 3 done
- Placement with and without fast cross-node linksDistServe: Disaggregating Prefill and Decoding for Goodput-Optimized LLM Serving
arXiv:2401.09670v3, Sections 4.1 and 4.2, Algorithms 1 and 2; Section 4.3 - Replanning
Retain the enumeration method and corresponding-layer placement constraint. Do not assume KV overhead is negligible just because a link is called InfiniBand.
- Different devices for different phasesHands-On LLM Serving and Optimization - Chapter 7, multi-GPU and disaggregation
Chapter 7, Prefill-Decode Disaggregation - Opening up more hardware options and Enabling independent and asymmetric scaling, printed pp. 252 to 253; When to Use, printed pp. 256 to 257
Use the hardware comparison to pose a phase-cost hypothesis, not to promise its example assignment meets your workload's SLO.
- Resize discoverable phase poolsNVIDIA Dynamo - Disaggregated Serving and KV-Aware Routing
Dynamo v1.5.1, Runtime-Reconfigurable xPyD; Performance Characteristics - Capacity effects of disaggregation
Focus on
- Define a latency comparison before a throughput comparison. With the same work and no overlap, disaggregation reduces a chosen latency only if : service change , queue change , transfer and extra routing work must be smaller than the colocated interference removed.
- First-token placement changes the critical path. If prefill streams the first token before KV transfer, transfer may appear in the first decode gap rather than TTFT. Compare the declared TTFT and ITL or TPOT contracts separately.
- DistServe's low-node-affinity plan keeps corresponding prefill and decode layer segments together so KV uses fast local links. Different TP layouts can still need shard redistribution and conversion within that placement.
- Heterogeneous assignment uses measured or explicitly synthetic phase service curves, memory and price, not peak FLOP/s alone. Ready warm reserve costs money; a registered worker is not usable until weights, buffers and warmup are ready. Drain active handoffs before removing capacity.
Common mistakes · 3
- Comparing one transfer delay with the sum of stalls over many decoding users. These are different objectives; choose per-request latency, aggregate lost work or goodput and use consistent units.
- Assigning decode to a cheaper GPU without checking KV capacity, supported dtypes, layout compatibility and achievable batch service time.
- Counting a newly launched worker as immediate capacity, or reclaiming a drained worker while an in-flight write can still reach it.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.Why can low offered load favor colocation even on a fast link?Answer
There may be little interference to remove. Handoff, extra routing and fragmented phase capacity still cost latency and resources.
2.What does the synthetic regression isolate?Answer
Queueing alone reverses the latency decision. Transfer and service are unchanged, so faster transport would not explain that reversal.
3.What capacity counts during a phase-pool resize?Answer
Only ready workers able to admit compatible new requests. Starting workers provide no immediate capacity; draining workers retain resources for active requests until safe retirement.
4.Does lower average handoff-gated latency prove better goodput?Answer
No. Goodput also depends on tail targets, the completion and quality contract, admission, offered load and equal resource cost. Replay the same workload through both plans.
You're done when
Your placement decision includes a winning and losing regime, identifies the first-token critical path, and charges transfer, queueing, reserve and startup under the same workload and cost budget.
Only when you can do this without notes.
Leads to
Notes
Resources · 3 for this unit, 10 more in the section
- DistServe: Disaggregating Prefill and Decoding for Goodput-Optimized LLM ServingPeking University and Microsoft Research · primary
Read the interference model, independent phase parallelism, placement, KV transfer and goodput evaluation. Reuse the break-even method with your workload and topology; do not transfer the paper's speedups to different hardware.
- Hands-On LLM Serving and Optimization - Chapter 7, multi-GPU and disaggregationChi Wang and Peiheng Hu (O'Reilly) · support
Read "Multi-GPU and Multi-Node Inferencing" (data, tensor, pipeline and expert parallelism) and "Prefill-Decode Disaggregation" (architecture, KV transfer, when to use it) in Chapter 7.
- NVIDIA Dynamo - Disaggregated Serving and KV-Aware RoutingNVIDIA · required
Trace frontend, prefill router, prefill worker, KV transfer, decode routing and decode worker. Record how load, cache overlap, worker discovery and transfer metadata affect placement; implement only a small simulated or available-hardware slice.
Also in this section
- AI Systems Performance Engineering - Chapters 15 and 17, distributed and disaggregated inferenceChris Fregly (O'Reilly) · required
Read the disaggregated prefill and decode architecture and the MoE parallelism strategies in Chapter 15, then Chapter 17 on disaggregated pools, routing policies and scalability. Reproduce every communication and KV-transfer estimate for a small declared topology.
- AI Systems Performance Engineering companion code - Chapters 15 and 17Chris Fregly · required
Use the single-device KV-handoff and simulation paths before the multi-GPU pairs. Then choose one disaggregation, routing or MoE target compatible with available hardware and keep bundled results separate from newly captured evidence.
- TensorRT-LLM Disaggregated Serving and KV Cache ExchangeNVIDIA · required
Study the KV exchange abstraction, unique request identity, layout conversion, overlap and fleet-worker model. Use its reproducible benchmark sections only on supported hardware and pin the release.
- SGLang documentation - PD DisaggregationSGLang Project · support
Use the transfer backends, router integration, heartbeat, timeout and cleanup behavior as a second engine's view of the same handoff.
- Mooncake: A KVCache-Centric Disaggregated Architecture for LLM ServingMoonshot AI · support
Read the KV-centric architecture, transfer engine and scheduling sections to understand remote cache pools. Compare its assumptions with DistServe and your simpler handoff; defer reproduction requiring a large cluster.
- 100 Days of LLM Inference - Days 12, 17 and 18Elizabeth Thomas · support
Use the Dynamo, model-parallelism and disaggregation notebooks for a compact topology simulator and request-handoff trace. Label notebook outputs as local analytical or simulated evidence unless real devices were used.
- TensorTonic Language Modeling from Scratch - Route Cache-Aware Prefill RequestsTensorTonic · support
Solve after the routing unit and compare its cost rule with your own placement model.
- LLM Inference: From scratch, one token at a time - Module 09Tushar Amrit · support
Work the Distributed Inference module's communication arithmetic before the tensor and pipeline parallel units.
- AI Performance Engineering - Distributed InferenceWafer · reference
A curated index. Use Section 5 only to find a distributed-serving paper the other entries lack.
- Python 3.14 hashlib - byte digests for KV integrity checksPython Software Foundation · reference
Usage and Hash Objects only: compute and compare a SHA-256 digest over a declared canonical KV payload. Add request/version checks separately; a byte digest is not cache compatibility or authentication.