KV-cache handoff in vLLM without GPU peer-to-peer: 0.4 to 0.8 GB/s
Updated 2026-10-17. Two corrections. (1) vLLM v0.30.0 also ships a second route this post did not measure:
OffloadingConnectorwith its P2P tier, which I have since measured at about 3 GB/s on the same two GPUs; and the open pull request vllm#61056 speeds up the host-buffer configuration measured here by 6 to 7x, to 3.8-5.7 GB/s (measurement). The NIXL numbers below are unchanged; they describe the best NixlConnector configuration, not the best route vLLM ships. (2) The push-mode lease problem below is a known bug in v0.30.0, fixed by vllm#58188 in v0.31.0.Updated 2026-10-24. The PR #61056 range now spans both readings defined below (3.8-5.7 GB/s; 5.0-5.7 when the decode side’s own work is not counted), and the host-buffer section points to where the rest of its time goes.
In the previous post I measured how fast data can move between host memory and the GPUs of an 8x RTX 4090 server that has no GPU peer-to-peer. A pinned copy from one GPU down to host memory and then up to another GPU, measured here alongside every round, runs at 12.74-12.89 GB/s. That is the budget for handing a KV cache from a prefill GPU to a decode GPU on this machine.
This post measures what vLLM actually gets. The answer: every configuration of vLLM v0.30.0’s default KV-cache connector moves the cache at 0.4 to 0.8 GB/s, less than 7% of that budget. For a 28,672-token prompt, splitting prefill and decode across two GPUs adds 2.1 to 3.7 seconds to the time to first token. A pinned copy of the same KV bytes takes 0.13 seconds.
The setup
- vLLM v0.30.0 (the CUDA 12.9 build), NIXL 1.4.1, NVIDIA driver 550.144.03.
- Qwen2.5-7B-Instruct in bf16. Its KV cache takes 57,344 bytes per token (28 layers, keys and values, 4 KV heads of 128 values, 2 bytes each).
- Prefill on GPU 4, decode on GPU 5. Both are on the same CPU socket and behind the same PCIe switch, and they cannot copy to each other directly.
- All server settings are vLLM defaults except the handoff configuration and one more: every
server, including the single-GPU reference below, uses the same KV-cache memory layout
(
VLLM_KV_CACHE_LAYOUT=LBHNC, the one the connector forces), so all of them run the same kernels. Servers are bound to the GPUs’ CPU socket and its memory.
I tested the configurations of vLLM’s default connector, NIXL, that apply here. vLLM also ships other connectors (Mooncake, LMCache), which I did not test.
| Name | Configuration |
|---|---|
| pull (default) | NixlConnector, the documented default |
| pull, zero-copy on | the same, with UCX_CUDA_IPC_ENABLE_GET_ZCOPY=on |
| push | NixlPushConnector |
| host buffer | NixlConnector with kv_buffer_device: cpu |
| host buffer over TCP | the same, restricted to UCX_TLS=tcp |
The last one is the configuration reported to work on Intel Arc GPUs, where no direct path exists either (vLLM issue #53796).
Requests go through the proxies in the vLLM tree. For every configuration except push, the proxy sends the request to the prefill server, waits for it, then sends it to the decode server. The push demo proxy sends both at once.
How I measured
Each request carries a prompt of exactly 2,048, 8,192 or 28,672 tokens, sent as token ids so that tokenization plays no part, and asks for 8 output tokens. One request is in flight at a time. Each configuration gets 20 requests per prompt length, and its time for that length in a round is the mean of the 20. The whole set is repeated in five rounds. In every round the single-GPU reference and host buffer over TCP run first, and the other four configurations follow in a fresh random order.
The same prompts are also sent to a single vLLM instance on GPU 4, once normally and once again right after, when the whole prompt is already in the prefix cache. The first gives the time to first token without any handoff. The second gives the cost of the decode side’s own work, which a split setup also pays.
The extra time to first token in a split setup is the handoff plus some fixed costs. To get a bandwidth, I take the difference between the 28,672-token and the 8,192-token prompts: the extra time grows by some amount while the KV cache grows by 1.17 GB, and the ratio is the bandwidth. Fixed costs cancel out. Each configuration gets a low and a high reading, from counting the decode side’s own work as part of the handoff or not.
Checks on every round, all passed:
- the handoff counters on the servers show exactly the expected bytes (tokens x 57,344) for every request;
- the 8 output tokens match the single-instance output on 59 of 60 prompts, the same rate at which the single instance’s prefix-cached run matches its normal run;
- no other process uses GPUs 4 to 7, and other processes take at most 0.3% of the socket’s CPU time;
- the pinned copy between the two GPUs is measured at the start and end of each round and stays between 12.74 and 12.89 GB/s.
Results
| Configuration | Time to first token, 28,672 tokens | Extra over one GPU | Handoff bandwidth |
|---|---|---|---|
| one GPU, no handoff | 3.80 s | ||
| host buffer | 5.89 s | 2.08 s | 0.74-0.80 GB/s |
| pull, zero-copy on | 6.67 s | 2.87 s | 0.60-0.63 GB/s |
| pull (default) | 6.68 s | 2.88 s | 0.59-0.63 GB/s |
| host buffer over TCP | 6.87 s | 3.07 s | 0.51-0.55 GB/s |
| push | 7.51 s | 3.71 s | 0.42-0.45 GB/s |
Times are the median over five rounds of each round’s mean. Each bandwidth range runs from the lowest low reading to the highest high reading over the five rounds; no reading moved by more than 0.025 GB/s between rounds. I use the mean of the 20 requests rather than their median because at 28,672 tokens some configurations’ times fall into two groups (push slows down on every fourth request, see below, and pull is faster on some prompts than on others), and a median of such a set jumps from one group to the other between rounds. The extra time includes the decode side’s own work (0.13 s at this length), which any split setup pays, so it is not all handoff.
The best configuration, the host buffer, reaches 6.2% of the 12.9 GB/s pinned copy. The documented default reaches 4.9%.
What each configuration actually did
I started each configuration once more with UCX’s protocol logging on (UCX_PROTO_INFO=y) and
read which transport carried the KV data:
- Pull and push do not move the data GPU to GPU. UCX cannot open the other GPU’s memory
(
cuIpcOpenMemHandle() failed: peer access is not supported between these two devices), and the transfer runs over the TCP transport instead, with software emulation of the remote read or write. - Pull with zero-copy on removes the log line saying zero-copy is disabled, hits the same failure, and takes the same TCP path. It is a repeat of pull, not a GPU-direct measurement.
- The host buffer moves the data between the two servers’ host memory with Linux cross
memory attach (
cma), not TCP. That step is fast: NIXL reports 1.64 GB moved in about 0.10 seconds, about 16 GB/s. But it accounts for only about 5% of the extra 2.1 seconds. Most of the rest is the copy between each GPU and its host buffer, which v0.30.0 does layer by layer: in the follow-up post, with that copy batched into one (vllm#61056), the extra time grows by 0.21 s instead of 1.44 s from 8,192 to 28,672 tokens. - Host buffer over TCP sends the host-to-host step through TCP as configured.
Push shows one more thing. In push mode only, the prefill server logs “Releasing expired KV blocks … retrieved by 0 remote worker(s) before lease expired” 66 times per round: blocks it pushed are never marked as retrieved, so they are freed only when their 30-second lease runs out. At 28,672 tokens its KV pool holds only about four requests, so every fourth request waits for a lease to expire. This is a bug in v0.30.0: the producer drops the completion of its own writes, so nothing ever marks the blocks as retrieved. It is fixed by vllm#58188, first released in v0.31.0.
Four pairs at once
On an eight-GPU machine you would run several prefill/decode pairs side by side, so I also ran the host-buffer configuration with up to four pairs handing off at the same moment, two per CPU socket.
- With four pairs running, the pair on GPUs 4 and 5 kept 96% to 104% of the bandwidth it had alone, in every round.
- Pairing a prefill GPU with a decode GPU on the other socket, instead of the same socket, made no difference: the ratio stayed between 0.98 and 1.01.
Neither is surprising at these rates. With four pairs copying at once, a pinned copy on the GPU 4 to GPU 5 path still reaches 6.46 GB/s, 8 to 9 times what the handoff uses. The shared PCIe path has plenty of headroom, so the limit is in the handoff software, not in the shared hardware.
What this means
On PCIe GPUs without peer-to-peer, splitting prefill and decode with vLLM v0.30.0’s NixlConnector makes
long prompts slower to start, by seconds, and the reason is not PCIe. A plain pinned copy through
host memory moves the same cache in about a tenth of a second, a factor of about 16 in
bandwidth over the best NixlConnector configuration. Two faster routes exist: v0.30.0’s
OffloadingConnector with its P2P tier (about 3 GB/s here) and the open pull request
vllm#61056 for the host buffer (3.8-5.7 GB/s
here). Neither reaches half of the pinned copy.
These numbers describe the v0.30.0 release.
Reproduce
The benchmark, with every check above built in, is at rockyshi-dev/kv-handoff-bench. Its README has the exact commands for the two-GPU measurement and the four-pair run, and the numbers they give on this machine, round by round.