The Necessity of Prefill-Decode Separation and the Reality of Bottlenecks
Large language model (LLM) inference is divided into two distinct stages: prefill and decode. Prefill processes the input prompt to generate a key-value (KV) cache, while decode references this cache to generate tokens one by one. The two stages have different computational, memory, and scalability characteristics, prompting vLLM to support prefill-decode (P-D) disaggregation by separating them into distinct engine instances. This structure increases resource utilization and throughput but leaves a transfer challenge that requires moving the KV cache from the prefill instance to the decode instance.
The existing vLLM transferred KV blocks using a pull method through the NVIDIA Inference Xfer Library (NIXL) connector. After prefill completion, the router transmits metadata, and the decode side allocates the target blocks, sequentially pulling data with NIXL READ. This adjustment and setup phase is executed serially after prefill and before decode, becoming the root cause of the increased time-to-first-token (TTFT) critical path.
Push-Based Transfer: Eliminating Adjustment Logic from the Critical Path
To address this bottleneck, AWS designed a push-based NIXL connector. The key is to overlap the work of the producer (prefill) and the consumer (decode). If the decode instance pre-registers the target blocks while the prefill operation is ongoing, it can push the KV blocks immediately after prefill completion without a separate adjustment phase. The threading model also separates the transfer thread, eliminating transfer wait time from the decode's first token generation path.
The validation environment consists of a 1P1D (one prefill, one decode) configuration connected to Amazon EC2 P5en instances via the AWS Elastic Fabric Adapter (EFA). EFA provides GPUDirect RDMA and Neuron Direct RDMA on supported instances, enabling direct transfers between GPU or AWS Trn1 device memory without going through host memory. This functionality was originally developed and validated on Trn1 clusters and has contributed to vLLM as an accelerator-neutral feature.
Bidirectional KV Transfer: Eliminating Recalculation Waste in Multi-Turn Agent Workloads
Multi-turn agent workloads accumulate conversation history, system instructions, tool results, and model responses, increasing context with each turn. In the existing unidirectional transfer structure, the decode node retains the KV cache of both the prompt and generated tokens when facing the next turn. The prefill node cannot access this cache, necessitating recalculation of the KV projection of previous response tokens, and since the session state resides only in decode, the probability of cache eviction on the prefill side increases. In the event of a pull cache miss, the entire history must be recalculated from the system instructions, causing a surge in TTFT.
Bidirectional KV transfer is a mechanism where the decode node returns pre-computed KV to the next turn prefill node. The configurable KV recompute threshold controls whether to reuse the KV, alleviating the two previously mentioned scenarios of computational redundancy simultaneously. This also operates on the NIXL and EFA RDMA infrastructure and has contributed to vLLM in an accelerator-neutral manner after validation on Trn1.
Performance Data Indicating Substantial Improvement Effects
The benchmarks for both technologies were conducted in the same EC2 P5en + EFA 1P1D environment. While there are variations depending on the model and workload, the key figures are as follows:
| Technology | Model | TTFT Improvement | TPOT Improvement |
|---|---|---|---|
| Push-Based Transfer | Qwen3-32B | Up to 3 times improvement | Up to 30% improvement |
| Bidirectional Transfer | Qwen3-32B | Up to 1.6 times reduction | — |
| Bidirectional Transfer | zai-org/GLM-5-FP8 | Up to 3.3 times reduction | — |
The push mode captured both the TTFT of single requests and the decode throughput (TPOT), while bidirectional transfer demonstrated TTFT reduction in multi-turn scenarios with increasing context. It is significant that both results were validated on Trn1 and then ported to GPU (P5en) for reproduction.
Architectural Implications: Enhancing the Completeness of Disaggregated Inference
Push-based transfer targets the delay critical path of single turns, while bidirectional transfer addresses the cumulative recalculation costs of multi-turns. Both share a design philosophy of pushing adjustment overhead outside the critical path on a common infrastructure stack of NIXL, EFA, and RDMA. This suggests that for P-D disaggregation to convert theoretical advantages into practical performance, asynchronous and overlapping design of the transfer layer is essential.
Reproduction Guide and Operational Considerations
Both blogs provide benchmark reproduction scripts and configuration examples. The push mode is applied by specifying `kv_transfer_config` with `kv_connector: 'NIXL'` and `kv_buffer_device: 'cuda'`, and activating `push_mode: true`. Bidirectional transfer requires adding the `return_kv_blocks` field to the router metadata flow and controlling the recompute threshold on the prefill side with `kv_recompute_threshold`. Operationally, selecting EFA-supported instances, verifying RDMA network topology, and tuning KV block size and buffer pre-allocation must be prioritized.
"Push mode improves TTFT and TPOT by removing adjustment and setup phases from the critical path in prefill-decode separated inference." — AWS Machine Learning Blog
"Bidirectional KV cache transfer allows prefill and decode nodes to reuse previously computed context across multiple turns, enhancing accelerator utilization and maintaining responsive TTFT." — AWS Machine Learning Blog