Cross-Data-Center KVCache Transfer: 54% Higher Throughput for a 1T Model

    This article explains how to make disaggregated prefill and decode work across data centers. It introduces KV throughput (Φkv) as a metric for the transfer bottleneck, shows why hybrid attention reduces KVCache volume, and outlines a system design based on selective offloading and bandwidth-aware scheduling. In an internal test with a 1T-parameter hybrid model, the combined approach improved throughput by 54% and reduced P90 TTFT by 64%. You will also find the boundaries of this approach and practical deployment recommendations.

    1. The Starting Point: PD Disaggregation Puts Bandwidth in the Spotlight

    Large-scale LLM inference has converged on a common understanding: the Prefill stage is compute-intensive and consumes compute capacity, while the Decode stage is memory-intensive and consumes memory bandwidth and capacity. Splitting the two into separate resource pools (PD disaggregation) allows each to scale independently according to its own bottleneck, yielding significantly better overall resource utilization than homogeneous deployment.

    But splitting comes at a cost: the KVCache produced by Prefill must be moved to the Decode side. When this transfer path is confined to a single RDMA network domain, PD disaggregation degrades into something that is “logically separated but physically coupled”—the hardware ratio between Prefill and Decode becomes fixed and cannot adapt dynamically to traffic patterns (long input/long output, interactive/batch). The first wall to cross-data-center deployment is bandwidth.

    1.1 Quantifying the Bottleneck with KV Throughput

    A practical metric is KV throughput Φkv: the volume of KVCache data produced by the Prefill side per unit time (Gbps). It is driven by three factors: model architecture (whether each layer retains the full historical KV), input length, and Prefill concurrency.

    Internal measurements from a 32K-input scenario illustrate the range. A traditional dense-attention model produces roughly 60 Gbps of Φkv per instance, while a hybrid attention model that alternates sliding-window and grouped-query layers produces only about 4.66 Gbps—a difference of roughly 13x. 60 Gbps far exceeds the usable capacity of ordinary cross-data-center Ethernet, whereas 4.66 Gbps falls within an engineerable range.

    This 13x gap is the technical pivot of this article: the feasibility of cross-data-center PD is first a model architecture problem, not a scheduling problem.

    1.2 Why Dense Attention Is Inherently Expensive

    In dense attention, the Key/Value of every historical token must be retained, so KVCache size grows linearly with context length and Prefill produces proportionally more data as it advances. Hybrid attention replaces most layers with linear-complexity or fixed-window layers: sliding-window layers keep only the KV within the window, linear/state-space layers substitute a fixed-size state for stacked history, and only a few full-attention layers (such as MLA- or GQA-style layers) handle precise long-range retrieval.

    The layer ratio is a key design variable. Representative configurations in the industry put full-attention layers at roughly 1/4 to 1/8 of the total (for example, 3:1, 5:1, or 7:1 ratios). The more the model leans toward linear layers, the lower Φkv becomes, but the ability to preserve long-range dependencies relies more heavily on the design quality of the remaining full-attention layers.

    2. Architecture Side: Hybrid Attention Opens the Cross-Domain Window

    By pushing Φkv into a range that ordinary Ethernet can carry, hybrid attention turns cross-data-center transfer from “impossible” into “a matter of engineering cost.” But it is a necessary condition, not a sufficient one.

    Even if Φkv drops to single-digit Gbps, the total transfer volume under long-context workloads remains substantial. Context lengths also vary widely across requests, so offloading all Prefill work would cause bandwidth congestion and leave the Decode side idle waiting. System-level support is therefore required.

    3. System Side: Selective Offloading and Bandwidth-Aware Scheduling

    3.1 Prefill-as-a-Service: Turning Prefill into an Independent Service

    The core idea is to selectively offload long-context Prefill to an independent high-compute cluster, then transfer the resulting KVCache back over ordinary Ethernet to the local PD cluster for Decode. This creates three resource pools:

    • High-compute Prefill pool: optimized for token output per unit time, using machine types with high compute and lower memory;
    • Network layer: ordinary Ethernet is sufficient, but it must be bandwidth-aware;
    • Local Decode pool: optimized for memory capacity and memory bandwidth, decoupled from the high-compute pool and scaled independently.

    Decoupling brings a direct benefit: the ratio can be adjusted dynamically—compress the Prefill pool and expand the Decode pool when interactive traffic peaks during the day, and reverse the adjustment for long-document batch processing at night.

    3.2 Selective Offloading: Not Every Request Is Worth Sending Cross-Domain

    Offloading decisions should be based on a benefit/cost ratio, expressed by the following illustrative logic:

    1. def should_offload(req, link, cluster):
    2. kv_bytes = estimate_kv_bytes(req.input_len, req.model_cfg)
    3. transfer_ms = kv_bytes / link.available_bw
    4. # Offload when local queuing is too long, or local compute
    5. # cannot finish Prefill within the SLO
    6. local_prefill_ms = cluster.local_queue_delay(req) + req.est_prefill_ms
    7. gain = local_prefill_ms - (req.est_prefill_ms_remote + transfer_ms)
    8. return gain > 0 and link.available_bw > kv_bytes / req.slo_budget

    In practice, offloading is usually limited to requests with “long input + severe local Prefill queuing.” Short requests stay local to avoid making the network the new bottleneck.

    3.3 Bandwidth-Aware Scheduling and Transfer Optimization

    • Bandwidth awareness: the scheduler tracks available link bandwidth in real time and applies admission control and rate limiting to prevent bursts of Prefill from saturating the link;
    • Layered transfer: KV from full-attention layers is prioritized and transferred in a layer-by-layer pipeline, so the Decode side can start computing the first layer while transfer is still in progress. This overlaps computation with transfer and directly reduces P90 TTFT;
    • Compression and quantization: low-bit quantization or sparsification of the returned KV further reduces Φkv, but its impact on output quality must be evaluated;
    • Failure and fallback: if the link becomes congested or the cross-domain cluster is unavailable, Prefill falls back to local execution to preserve availability.

    4. Results and Boundaries

    In internal tests with a 1T-parameter hybrid model, this combined approach improved throughput by 54% and reduced P90 TTFT by 64% compared with homogeneous PD deployment. The gains stack from three sources: hybrid attention reduces transfer volume, decoupling improves flexibility in resource ratios, and pipeline overlap reduces tail latency.

    The boundaries are equally clear: as the paper states, reducing KVCache on the model side alone is far from enough—it requires the coordination of “model architecture optimization + selective offloading + bandwidth-aware scheduling.” If the model still uses dense attention, or if scheduling lacks admission control, cross-domain deployment will turn a bandwidth problem into a tail-latency problem.

    5. Deployment Recommendations

    1. Measure Φkv before considering cross-domain deployment: measure Φkv with the target model and the real input-length distribution, then compare it against the available bandwidth of ordinary Ethernet. Feasibility requires the two to be within an order of magnitude of each other.
    2. Prefer hybrid attention models, and pay attention to the full-attention layer ratio and evaluations on long-range tasks.
    3. Build bandwidth observability: feed link metrics into the monitoring and alerting system as an input to scheduling.
    4. Start conservatively with offloading, roll it out gradually, and keep a local fallback path.
    5. Use P90/P99 TTFT rather than the average as the core SLO acceptance metric.

    For cloud users, this architecture maps to a combination of general capabilities: a container platform to host heterogeneous resource pools, object storage and message queues to carry asynchronous KVCache and task flows, and monitoring, alerting, and logging services to provide observability of bandwidth and tail latency. Baidu AI Cloud offers general product categories in heterogeneous inference resource pooling and full-link observability, which can serve as a reference foundation for architecture selection.