Unit 7 of 11 · about 5 hours · derive, explain
KV transfer cost, connectors, overlap, backpressure and offload tiers
A fast data plane is not a complete handoff. The receiver must have space, layout and identity ready, and the sender must retain buffers until transfer completion makes reuse safe.
You'll be able to
- Derive handoff payload and transfer time from KV ownership, transport startup, effective bandwidth and layout work.
- Trace connector control metadata, memory registration, data movement, completion and source-buffer retirement.
- Explain valid overlap and bound in-flight KV with backpressure across HBM, DRAM and storage tiers.
Covers
Read
In this order, only the parts listed
0 of 4 done
- Pull handoff and burst bufferingDistServe: Disaggregating Prefill and Decoding for Goodput-Optimized LLM Serving
arXiv:2401.09670v3, Section 3.3 Practical Problems - Communication overhead; Section 4.3 Online scheduling - Combat burstiness
Recompute payload from your KV ledger instead of copying the paper's GB-labeled OPT-66B estimate. Pull buffering still needs a bound on retained prefill KV.
- Exchange, mapping and completionTensorRT-LLM Disaggregated Serving and KV Cache Exchange
Introduction to KV Cache Transmission, TensorRT-LLM commit cc63e66: Workflow; Key Components - Peer Registrar and Mappers, Page Table and Transfer Agent; Current Limitations (page read 2026-10-14)
- Overlap across independent requestsTensorRT-LLM Disaggregated Serving and KV Cache Exchange
Disaggregated Serving, TensorRT-LLM commit cc63e66: KV Cache Exchange - Overlap Optimization and Cache Layout Transformation, Figures 4 and 5 (page read 2026-10-14)
- Remote and lower-tier KVMooncake: A KVCache-Centric Disaggregated Architecture for LLM Serving
FAST 25 paper, Sections 3.1 Overview and 3.2.1 to 3.2.3 Mooncake Store, printed pp. 158 to 160, Figure 3 and Listing 1
Read storage ownership, registration and topology-aware transfer. Cluster reproduction is outside this unit; use deterministic tier and link costs in servelab.
Focus on
- Reuse Prefill-decode disaggregation and KV transfer from the GPU route. Start with unique logical KV bytes, then add physical replication, destination fragments, page padding, transport metadata and any layout-conversion work actually transferred.
- A serialized transfer model is , with payload bytes , effective directional bytes/s , startup and exposed packing or conversion time. A shared bottleneck link also needs offered byte rate below its capacity for a stable queue.
- The TensorRT-LLM Python workflow separates ZeroMQ control messages from one-sided NIXL writes. Completion requires every expected writer; submission alone does not make destination KV readable or source memory reusable.
- Overlap with other requests differs from layer-wise transfer within one request. The cited Python transceiver currently moves a whole prompt slice after prefill. Offload adds restore latency and pinned or staged memory; HBM, DRAM and SSD capacities are not interchangeable decode-ready capacity.
Common mistakes · 3
- Treating nonblocking submission as transfer completion. Releasing or overwriting a source page can corrupt an in-flight write.
- Subtracting an arbitrary overlap percentage without a dependency timeline or accounting for shared compute, HBM and link contention.
- Assuming a pull protocol eliminates overload. It moves the waiting KV to the sender, whose memory is also finite.
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.Which event allows a receiver with several source ranks to use the full KV?Answer
Successful completion and validation of all expected fragments or writers for that request attempt, followed by the required local visibility and rank agreement. The first completion is insufficient.
2.Does overlap reduce the total KV bytes crossing a link?Answer
No. It may reduce exposed latency by scheduling independent work concurrently, but the link still carries the payload and can saturate.
3.Why can an SSD-resident prefix lose to recomputing it?Answer
Reading, staging and restoring its bytes can cost more than the saved prefill work for that prefix and workload. Compare complete paths, not cache-hit count.
4.Does a saturated receiver justify freeing sender KV immediately?Answer
No. The sender needs explicit bounded retention and rejection or cancellation policy. Its buffers remain owned until writes have completed or can no longer touch them.
You're done when
Your handoff byte and time ledger agrees with the event trace, no dependent decode reads incomplete KV, and a stalled receiver cannot cause unbounded retained buffers.
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.
- 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.
- 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.
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.
- 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.
- 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.
- 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.