Your Second GPU Is Bought for the Cache, Not the Model
From the publisher’s feed, collected in the ZeroLabs newsroom.
There are three reasons to add GPUs and they call for different answers. Then there is a split that has nothing to do with any of them: reading the prompt and writing the answer want different machines.The serving stack with the distributed serving layer lit.Part six of seven. The layer you reach when the previous five have run out of room.Part 1: Start Here: The Words Everyone Uses About LLM InferencePart 2: Your KV Cache Is Bigger Than Your ModelPart 3: What a Kernel Is, and Why Everyone Is Writing New OnesPart 4: Quantization Is Four Decisions, Not OnePart 5: Tuning vLLM: What Every Setting Does to the ArithmeticEverything so far has assumed one machine, and for most deployments that is the right assumption. This part is what happens when it stops being enough. One question comes first, because the answer decides what you buy. Are you adding GPUs because the model does not fit, because you need more throughput, or because one card cannot hold a long enough conversation? Three problems, three purchases. The figure below carries the diagnosis. The third is part two’s problem, and the one people misdiagnose: the weights fit, so the card looks like it has room.Then there is a fourth thing, and it is not a reason to add GPUs at all: prompt-reading and answer-writing want opposite hardware, and on one card they get in each other’s way.Four machines in trouble, and the four different reasons behind it.The first three need another card, each for a different job; the fourth just rearranges what you have.The ways to splitFive ways to use more than one GPU, and what each one costs in communication.Top to bottom is roughly the order to reach for them.Data parallel is whole replicas of the model, each serving its own requests. --data-parallel-size, default 1. On a dense model there is nothing to synchronize. On a mixture-of-experts model the expert layers exchange on every forward pass, so the replicas move in lockstep; a rank, one process on one GPU, runs a dummy pass when idle so the others can finish. Routing still needs thought: each engine holds its own prefix cache, so a conversation returning on a different replica pays full prefill again, and the built-in balancer does not route on cache state. If your model fits and you need capacity, try this first.Tensor parallel splits every matrix across GPUs, so each holds a slice and they combine results. --tensor-parallel-size, default 1. The combination is an all-reduce, a synchronizing exchange between all the cards, twice per layer: after attention, and after the feed-forward block.Tensor parallelism also does something the other splits cannot: the cards pool their KV cache into one budget rather than two. That answers the opening’s third reason. gpt-oss-120b is part two’s clean case: the weights fit on one H100, but the card keeps only about 3 GiB free for cache, short of a single 128K conversation. Part four’s 8-bit cache halves what the conversation costs, one flag against a second card, so try the flag first. If the shortfall survives it, two cards pool 160 GB of memory. The second card is bought for the cache, not for the model. Replicas cannot do this: two cards that each fall short still fall short together.Pipeline parallel splits layers rather than matrices: this GPU holds layers 1 to 20, that one 21 to 40. --pipeline-parallel-size, default 1. Communication is small, just activations handed between stages, but you get bubbles, a stage idle while it waits for the one before it; keeping several requests in flight at different stages fills them.Expert parallel spreads a mixture-of-experts model’s experts across GPUs. --enable-expert-parallel, off by default. The traffic is not the routing, a few bytes per token. It is an all-to-all of the token activations themselves, sent and gathered back twice per expert layer, and its shape differs by phase: prefill dispatches thousands of tokens at once, decode one per sequence. Hence --all2all-backend, which has twelve values in v0.27.1 and defaults to allgather_reducescatter. The phase-shaped pair is DeepEP’s, deepep_high_throughput for prefill and deepep_low_latency for decode. The flag takes one value for the whole engine, so a pool serving both phases picks a side. Only a deployment that has already split them gets both, which is where the next section goes.The other problem is load balance. A popular expert makes its GPU the bottleneck while the rest idle, and part two puts gpt-oss-120b’s expert layers at 93% of the bytes fetched per step. --enable-eplb rearranges experts to level the measured load, and can hold redundant copies of the popular ones, paid out of the same memory pool as the KV cache: the balance is bought with cache. The startup log prints each rank’s DP, PP, TP and EP assignment; EP reads a literal N/A when no expert-parallel group exists. That line is the cheapest check that the flag took effect.Splitting the two phasesPrefill runs past the ridge point. A 4,000-token prompt is around 4,000 operations per byte against an H100 ridge of 296, so arithmetic is what limits it. Decode sits far below it, because decode’s arithmetic intensity is just the number of users you are serving at once. Same model, same card, opposite constraints: part one’s roofline with a workload either side of it, granted part three’s condition that a FlashAttention-class kernel is in the path.What part one did not say is that on a shared card they interfere: a long prompt arriving stalls everyone already generating, and a machine full of generators gives a new prompt nowhere to run. Part five’s chunked prefill is the cheap answer, on by default, and it works. vLLM’s own framing: the right chunk size can hold tail inter-token latency as well as splitting the phases can, but that size is hard to find, which is what makes the split more reliable. That latency is part five’s TPOT read at the worst percentiles, and it says nothing about time to first token, where the transfer priced in the next section lands. What chunked prefill costs is the first token: the prompt is admitted, then fed a chunk per step behind the generators. A separate pool ends that wait.Animated: four conversations ticking on one card, a long prompt arriving, every lane stalling, then resuming.One long prompt stalls every conversation on the card.So stop sharing. Prefill on one pool, decode on another, and ship the cache between them.Animated: requests entering a prefill pool, their KV cache travelling across, and decode slots filling.Prefill is brief and busy. Decode is long and patient. Between them, a KV cache crossing the network.That handoff is the whole of it: prefill produces part two’s KV cache, decode needs it to generate, so splitting the phases means shipping it per request.In vLLM this is one configuration blob on both pools, --kv-transfer-config naming a connector and a role, and it is still labelled experimental. The connector most people mean is NIXL, NVIDIA’s transfer library, now the shared transport underneath vLLM, SGLang and TensorRT-LLM. Two environment variables make it work across machines rather than inside one; the host defaults to localhost, and it is the one people forget.vLLM’s own documentation says it supports nine connectors. Its registry in v0.27.1 has sixteen. Both numbers are in the same repository.How big the handoff isPart two’s figure is 36 KiB per token at 16-bit, counting only the eighteen layers of gpt-oss-120b that grow; the other eighteen are sliding-window, a flat 4.5 MiB however long the conversation runs. Part two could set that flat term aside. A transfer carries it. So a 2,048-token prompt is 76.5 MiB, an 8,192-token one is 292.5 MiB, and a gibibyte does not arrive until around 29,000 tokens.KV cache transfer size against prompt length, for both per-token shapes.Drawn from part two’s own KiB-per-token figures; both solid lines are 16-bit, and an 8-bit cache halves them.Every figure above is 16-bit. Part four’s recommendation is an 8-bit KV cache, one flag, so a reader who took it ships half of the numbers above: 38 MiB at 2K, 146 MiB at 8K, the gibibyte out past 58,000 tokens.Sliding-window layers are what keep the number that small. Run part two’s formula over the older dense geometry, 80 layers and head dimension 128, and there is nothing to discount: 320 KiB per token. A 2,048-token prompt becomes 640 MiB, an 8,192-token one 2.5 GiB, and the gibibyte crossing arrives at about 3,300 tokens rather than 29,000. Which number is yours is a generational question: sliding-window attention is common in new models and absent from most of the installed base.Then divide by a link. A 400 Gb/s NIC moves 50 GB/s, so 292.5 MiB crosses in about 6 ms. A 100 Gb/s NIC moves 12.5 GB/s and takes about 24 ms. Against part five’s --goodput ttft:500 that is 1.2% or 4.9% of the budget you promised. That is arithmetic, not measurement: a threshold you can check instead of a fear. It also overestimates in your favour, because prefix caching shrinks what ships whenever prompts share a front, and once you are running, vllm:nixl_bytes_transferred measures what the chart was guessing at.What it is worth, with the attribution keptOne misreading sits in front of all three numbers. vLLM’s documentation states, in capitals, that disaggregated prefill does not improve throughput. What it buys is goodput in part five’s sense: requests that met the targets you declared. The requests-per-GPU and capacity figures below are goodput; the target-tightness figure and the Dynamo figure are not, and that is the point of both.The three published results with their comparison baselines attached.The baseline is part of the claim, not a footnote to it.DistServe reports up to 7.4 times more requests per GPU while meeting targets for over 90% of requests. The headline is the top of a range: 1.6 to 7.4 against DeepSpeed-MII, with 7.4 landing on the smallest model tested, and 2.0 to 4.6 against vLLM on the same chat traffic. DeepSpeed-MII runs chunked prefill, so even the largest figure is measured against the cheap fix, not against both phases sharing a card.The other headline number, 12.6 times, is not a goodput figure at all. It is how much tighter a latency target survives at a fixed request rate against vLLM, on long-context summarization; requests per GPU on that same workload is 4.3 times. And 12.6 is a lone outlier. Every other tightness ratio in the paper sits between 1.4 and 3.2, and the number printed next to it is 2.6, DistServe against DeepSpeed-MII on the identical workload. Most of that gap was chunked prefill.Mooncake, the platform behind Kimi, reports capacity against the best vLLM configuration it tested. Its range reads like an error bar until you see it is a curve: on a replayed conversation trace across sixteen eight-GPU nodes, +498% at a 100 ms inter-token target, +157% at 200 ms, +59% at 300 ms. The tighter your promise, the more the split is worth. The baseline is vLLM v0.5.1, a mid-2024 release. That belongs in the citation.NVIDIA’s Dynamo turns the citation problem into an epistemics problem: the widely repeated figure is “up to 30 times”, and NVIDIA published it twice, differently. The developer blog says up to 30 times more requests served. The press release says over 30 times more tokens generated per GPU. Those are different quantities. One is an upper bound and one is a lower bound, and both are NVIDIA’s own wording.The chart itself is footnoted as projected, and its two arms change the parallelism layout as well, so the figure bundles disaggregation with a re-tuning. The same graphic carries a Llama 70B result where the gain is a little over 2 times. Same vendor, same graphic, one order of magnitude apart, and nothing in either is false.Then set those three beside the one figure in vLLM’s own repository: the llm-d integration page lists up to 70% higher tokens per second from the split on GPT-OSS and a B200, naming no baseline, and it is a throughput number sitting in the same repository as the capitalised note this section opened with. It is still the figure closest to the engine you run, and a long way from thirty times.What it costs youEvery article lists the wins. The bill is four items.The four operating costs of the split, drawn as an itemised bill.The four line items the wins never mention.Two pools to size, against a prompt-to-generation mix that moves through the day; get it wrong and one pool idles while the other queues. vLLM tells you the ratio if you ask, vllm:request_prefill_time_seconds against vllm:request_decode_time_seconds, and the Grafana dashboard it ships already plots them. The ratio between the two, the one number the sizing turns on, is the panel it does not draw.Then there is memory you keep paying for after the work is done: a completed prefill’s KV blocks stay pinned until a decoder collects them, on a 30-second default lease. So the prefill pool’s real cache budget covers in-flight prefills plus everything queued on the decode side. vllm:nixl_num_kv_expired_reqs_total counts the ones nobody came for.The interconnect stops being merely slow and becomes a thing that can fail: vllm:nixl_num_failed_transfers_total and vllm:nixl_num_failed_notifications_total count the ways. What a failure means for the caller is kv_load_failure_policy, default fail: the request ends with an error. The alternative, recompute, revives the interference this architecture was bought to remove. A failed transfer is a choice between a 500 and everyone else’s latency. The quieter failure is compatibility: the pools negotiate a hash over vLLM version, model architecture, dtypes and the attention backend, and a mismatch refuses the handshake. Your prefill and decode pools now have to be upgraded together, and part four’s --kv-cache-dtype is one of the fields.Routing is the fourth, and the one you build. vLLM’s documentation is admirably plain that routing solutions are still being worked on; what ships today is a toy proxy in the tests directory and a demo script in examples. A real engineering item, not a config line.What to do with thisCheapest check first. If vllm:num_preemptions_total is climbing under a load you used to handle, part five buys the capacity back for the price of a flag. Nobody should draw a distributed architecture on top of a preemption graph.The opening question answers itself out of the startup log. vLLM prints GPU KV cache size: 643,232 tokens and Maximum concurrency for 40,960 tokens per request: 15.70x on every boot. Read the denominator before you read the answer. That 40,960 is --max-model-len, not your traffic. The concurrency figure is the cache size divided by it, so the line answers “how many conversations fit if every one runs to the full context window”. Serve two-thousand-token chats with --max-model-len left at the model’s advertised context and the same 643,232 tokens is a little over three hundred conversations, not fifteen. That is how a machine with room for hundreds gets read as a capacity wall.The two startup log lines with the trap annotated.Two log lines, and the denominator people misread.So set --max-model-len to the length you actually serve and branch on the second number. If it sits comfortably above what you run at once, replicas are your answer, and for most deployments that ends the exercise. If it is one or two, you have part two’s problem, and pooling the cache with tensor parallelism is the fix rather than more copies. If the model does not load at all, the split is not optional.The fourth thing from the opening already has its cheap answer running: chunked prefill, on by default. Disaggregation is for when that stops holding your tail inter-token latency, and it wants the four request shapes part five tells you to pin first: prompt and output length distributions, the shared-prefix fraction, and the arrival rate. The first two size the pools. The third can cancel the project on its own, because prefix caching removes prefill you were about to build a cluster to move.You can size the decode pool without building a prefill pool: DecodeBenchConnector fills the KV cache with dummy values so decode profiles on its own. It ships in the release, barely documented, and answers the harder half of the sizing question.And do the previous five parts first. Prefix caching, an 8-bit cache, the right attention backend, and a sensible concurrency limit are all cheaper than a second cluster, and at least one is usually still on the table when somebody starts drawing boxes.None of that says when. The split is the right call when three things hold at once. Your inter-token target is tight enough that chunked prefill is not holding it, which is Mooncake’s curve read from the other end. Your prefill-to-decode mix is steady enough that two pools can be sized once and left alone. And your link swallows the transfer at the prompt lengths you actually see, which is the threshold the handoff section priced. Miss one of the three and the cheap fix is still the better buy.ConclusionSplitting prompt-reading from generating is the most interesting architectural idea in this series. It takes part one’s division into two phases with opposite constraints, and adds what part one left out: on a shared card they spoil each other.It is also the most expensive. You trade a scheduling problem you understand for a capacity-planning problem you do not, you put hundreds of megabytes on the network per request, and two clusters that used to be one now upgrade together. The published wins are real and large, and they arrive with baselines attached: 12.6 times against one system and 2.6 against another, on the same workload, in the same table. Reading the baseline is most of the skill.Six rungs, then. The memory roof, the cache, the kernels, the precision, the engine, and now the machines. Part seven is about what happens to a win on its way up that ladder, and why a number that was true where it was measured arrives at the top as something much smaller.The six parts drawn as a ladder, with part six the top rung and part seven waiting above the rails.Six parts, one ladder. Part seven follows a win on its way up, to see what is left of it at the top.Every vLLM flag, default, metric and log line here is from v0.27.1 and moves between releases. The DistServe figures are from the OSDI '24 paper, the Mooncake figures from the FAST '25 paper rather than the preprint, and the Dynamo figure from NVIDIA’s developer blog and press release, which disagree with each other. Read everything against the version you are running.Your Second GPU Is Bought for the Cache, Not the Model was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.