Cross-Datacenter KVCache Transfer: A Practical Path to 54% Higher Throughput for a 1T Model

    This article examines how Prefill-as-a-Service enables cross-datacenter KVCache transfer for long-context LLM inference. It explains why long-context workloads make prefill compute-heavy and decode bandwidth-bound, why KVCache compression alone is insufficient, and how selective offloading plus bandwidth-aware scheduling make remote prefill worthwhile. Based on a reported test with a 1T-parameter MoE model, it covers the 54% throughput gain, 64% P90 TTFT reduction, the conditions under which the approach holds, and its practical limits.

    1. The Starting Problem: Long-Context Inference Pulls Compute and Memory in Opposite Directions

    As large model inference enters the long-context era, one fact becomes increasingly clear: the cost structure of a single request has been rewritten. In short requests, the prefill stage processes a limited number of tokens, and time to first token (TTFT) is driven mainly by model weight loading and a small number of matrix multiplications. In contexts of hundreds of thousands or even millions of tokens, however, prefill must complete massive attention computation at once, and compute consumption grows roughly linearly or even faster. The decode stage then degrades into a token-by-token memory bandwidth exercise.

    This “heavy at the front, light at the back” workload pattern has directly driven the now-common industry paradigm of PD disaggregation (Prefill-Decode Disaggregation): prefill and decode are split into separate resource pools, with the former configured for high compute and the latter for large memory and high bandwidth, each scaling according to its own bottleneck. The benefits are clear: higher resource utilization and the ability to route requests with different SLO levels separately.

    But splitting introduces an unavoidable physical constraint: the KVCache produced during prefill must be handed to the decode side. The size of the KVCache is strongly related to context length, number of layers, number of attention heads, per-head dimension, and whether KV is shared. In long-context scenarios it can easily reach hundreds of megabytes to several gigabytes. When prefill and decode sit within the same cluster, traffic runs over high-speed interconnects and transfer overhead can be amortized. Once it crosses nodes, racks, or even datacenters, ordinary Ethernet bandwidth becomes the new bottleneck and can consume all the compute savings that prefill separation was meant to deliver.

    2. The Core Idea: Turn Prefill into a Remotely Callable Service

    A recent technical paper proposes a “Prefill-as-a-Service” architecture as a systematic answer to this tension. Its basic form is:

    • The local side keeps a PD cluster that receives requests, performs decoding, and streams tokens back;
    • When a request’s context is extremely long and local prefill compute is tight, the prefill task for that request is selectively offloaded to a remote high-compute cluster;
    • After the remote side finishes prefill, it returns the KVCache to the local site over ordinary Ethernet;
    • The local PD cluster receives the KVCache and immediately enters decode, which appears to the user as a normal first-token response.

    The key word here is “selective.” Not every request is worth offloading across domains; offloading is a net gain only when the time saved by remote prefill exceeds the time added by returning the KVCache. This turns the question from “can it be transferred” into “when is it worth transferring, to whom, and how much.”

    In a reported measurement on an internal 1T-parameter mixture-of-experts (MoE) model, the paper reports a 54% overall throughput improvement and a 64% reduction in P90 TTFT compared with a homogeneous PD deployment. It is worth stressing that this gain does not come from a single point optimization. The paper itself candidly acknowledges that relying on model-side KVCache compression alone is far from enough; what actually makes cross-datacenter deployment viable is the combination of model architecture optimization with system-side selective offloading and bandwidth-aware scheduling.

    3. Why Compressing KVCache Alone Is Not Enough

    A common industry intuition is that if bandwidth is insufficient, the KVCache should simply be made smaller. Quantization, sparsification, low-rank projection, and cross-layer sharing are indeed effective, but each has boundaries:

    1. Accuracy and long-tail risk: Aggressive quantization tends to accumulate error on long-context, retrieval-heavy tasks, and P90 or even P99 metrics often degrade earlier than the mean.
    2. Coupling between compression ratio and computation: Some compression methods require inverse transforms or reordering on the decode side, shifting network pressure into compute pressure and offsetting the gains.
    3. Architecture-level constraints: The size of the KVCache is fundamentally determined by model structure. If attention head dimension is large, KV is not shared, and there are many layers, the room for compression is naturally limited.

    A more realistic path, therefore, is “reduce the load in the architecture first, then schedule at the system level”: the model side lowers per-token KV occupancy through a more reasonable attention structure, and the system side then uses selective offloading and bandwidth-aware scheduling to place the remaining transfer pressure at the most suitable time and on the most suitable path.

    4. The Two Pillars on the System Side

    4.1 Selective Offloading: Admission Control Based on a Benefit Model

    A practical decision logic can be abstracted as:

    1. benefit = T_prefill_local_est - T_prefill_remote_est
    2. cost = Size(KVCache) / EffectiveBandwidth + T_handshake + T_queue_remote
    3. offload condition: benefit > cost * safety_factor

    Here EffectiveBandwidth is not the nominal link bandwidth, but the usable bandwidth after subtracting congestion, cross-domain queuing, and protocol overhead; safety_factor guards against estimation error and bursty traffic. In engineering practice, additional constraints are usually layered on top: local prefill queue length, remote cluster utilization, request SLO level, and context length thresholds. The value of this logic is that it turns “cross-domain” from an architectural posture into an account that can be settled at any time.

    4.2 Bandwidth-Aware Scheduling: Overlapping Transfer with Computation

    The thing cross-domain transfer fears most is serial waiting. Viable optimization directions include:

    • Layered pipelining: Split the KVCache by Transformer layer and transfer while computing, so the first layer starts returning as soon as it is computed and the decode side is ready layer by layer;
    • Path selection: Dynamically choose among multiple available links based on real-time bandwidth and congestion, avoiding a situation where all long-tail requests pile onto the same path;
    • Priority queues: Interactive requests go first, while offline batch requests yield;
    • Backpressure and degradation: When bandwidth stays tight, automatically fall back to local prefill or reduce the offload ratio so that P90 is not broken.

    Illustrative scheduling pseudocode:

    1. def should_offload(req, local_cluster, remote_cluster, link):
    2. kv_size = estimate_kv_size(req.context_len, req.model_cfg)
    3. t_local = local_cluster.estimate_prefill(req)
    4. t_remote = remote_cluster.estimate_prefill(req) + kv_size / link.effective_bw()
    5. return t_local - t_remote > SAFETY_FACTOR * (kv_size / link.effective_bw())

    5. Why a 1T-Parameter MoE Model Is the Key Validation Scenario

    Choosing a trillion-parameter-scale MoE model for validation is highly representative. On one hand, the activation sparsity of MoE makes prefill compute demand more concentrated, so the marginal benefit of offloading is more pronounced. On the other hand, a large model has many layers and a large KVCache, putting pressure on bandwidth and scheduling that is closer to the real upper limit. The 54% throughput gain and 64% drop in P90 TTFT essentially demonstrate one thing: once prefill becomes an elastically schedulable service, cluster compute configuration no longer has to be held hostage by the worst-case long-context request.

    6. Does This Path Work: Conclusions and Boundaries

    From an engineering perspective, this path is “conditionally viable”:

    • Conditions for it to hold: model-side KV occupancy has already been optimized to a reasonable range; the link offers predictable effective bandwidth; the scheduler has real-time utilization awareness and degradation capability; and the business can tolerate queuing jitter for a very small number of requests.
    • Scenarios where it does not hold: extremely low and highly jittery link bandwidth, generally short context lengths, or SLOs that are extremely sensitive to P99 and allow no fallback at all.

    What deserves more attention is not a single percentage but a shift in architectural paradigm: prefill changes from “computation that must be completed locally” into “a service capability that can be purchased on demand,” and KVCache changes from an “internal intermediate state” into a “data asset that can flow across domains.” When deployed in the cloud, this kind of architecture typically relies on a container platform to host elastic compute pools, object storage or a distributed cache to hold temporary persistence of the KVCache, a monitoring and alerting system to observe link utilization and the P90 long tail, and a message queue to decouple request admission from remote execution. For engineering teams, the real barrier is not “whether it can be transferred over,” but “whether this cross-domain account can be settled correctly on an ongoing basis.”