Not All Prefills Are Equal: PPD Disaggregation for Multi-turn LLM Serving

framework 2603.13358
servingdisaggregationmulti-turnschedulingKV-cache

Not All Prefills Are Equal: PPD Disaggregation for Multi-turn LLM Serving #

Zongze Li, Jingyu Liu, Zhen Xu, Yineng Zhang, Tahseen Rabbani, Ce Zhang | 2025-03 | https://arxiv.org/abs/2603.13358 Category: framework | Tags: serving, disaggregation, multi-turn, scheduling, KV-cache Read: 2026-05-25

§1 TL;DR #

Multi-turn PD disaggregation wastes 99% of prefill compute re-processing cached history. PPD observes append-prefill causes only 2% TPOT degradation (vs. 48% for full prefill) and dynamically routes Turn 2+ requests to decode nodes via an offline-profiled scoring function, cutting Turn 2+ TTFT by 48–73% while maintaining TPOT.

§2 核心三问 #

Q1 痛点: 多轮对话下PD分离架构的根本低效

标准PD disaggregation的单向KV传输协议(P→D, 无反向通道)导致多轮对话每一轮都必须:(1) 在P节点重新计算整个历史KV cache(含上轮response),占multi-turn prefill成本的99%;(2) 重复将KV cache通过网络传回D节点,饱和带宽引发高延迟甚至服务降级。在2P_2D配置下,传统PD在12个QPS中有9个出现服务崩溃。

Q2 方法: PPD — 基于干扰差异的动态路由

核心洞察:append-prefill(仅处理新增$m$个token,复用已缓存KV)与full prefill的decode干扰相差一个数量级(2% vs. 48% TPOT degradation at batch 200)。PPD将routing decision形式化为优化问题:

$$S(\psi;\,\pi,\mathbf{w}) = w_{\text{ttft}}\,\Delta_{\text{ttft}} - w_{\text{tpot}}\,\Delta_{\text{tpot}}$$

$S > 0$ 时Turn 2+请求在D节点本地执行append-prefill,否则走传统PD路径。算法分两阶段:Phase 1离线对工作负载网格逐点profiling建表;Phase 2在线将请求映射到最近网格点,<1ms返回decision。传统PD是PPD的特例($x \equiv 0$)。

核心技术壁垒:将"append-prefill干扰极低"这一微架构观察与"无静态策略全面占优"的系统级发现连接成一个可操作的per-request routing decision——通过offline profiling将高维工作负载空间离散化为lookup table,以零运行时开销实现动态最优。

Q3 结果

§3 架构 / 方法图 #

Figure 3: PPD dynamic routing architecture — Replica vs PD vs PPD

Paper's Figure 3, verbatim (caption: "Dynamic routing of append-prefill with PPD").

PPD架构的关键在于引入了PPD Router模块。Turn 1请求仍走传统PD路径(P节点处理full prefill → KV transfer → D节点decode),但Turn 2+请求由Router基于当前workload估计、user SLO权重、node配置三因素决策:路由到P(走PD path)或在D节点本地执行append-prefill(复用已缓存KV)。PD和Replica均为PPD的特例。

sequenceDiagram participant Client participant Router as PPD Router participant P as Prefill Node participant D as Decode Node Note over Client,D: Turn 1 (always PD path) Client->>Router: request (turn=1) Router->>P: full prefill P->>D: KV transfer D->>Client: token stream Note over Client,D: Turn 2+ (dynamic decision) Client->>Router: request (turn≥2) Router->>Router: lookup S(ψ;π,w) alt S > 0 (route locally) Router->>D: append-prefill (cached KV) D->>Client: token stream else S ≤ 0 (route to P) Router->>P: full prefill P->>D: KV transfer D->>Client: token stream end

System Scope #

§4 作者证明 #

Notation Table #

SymbolMeaning
$x$fraction of Turn 2+ AP routed to decode (hardware-level) or per-request binary decision
$\pi$node assignment (e.g., 1P_3D = 1 prefill + 3 decode GPUs)
$\phi$user-defined SLO distribution
$\psi$workload descriptor (QPS, input/output lengths, turns)
$\mathbf{w} = (w_{\text{ttft}}, w_{\text{tpot}})$operator-specified SLO weights
$\Delta_{\text{ttft}}$relative TTFT improvement of local vs. PD path
$\Delta_{\text{tpot}}$relative TPOT degradation of local vs. PD path
$S(\psi;\pi,\mathbf{w})$benefit score; positive → route locally
$\mathcal{J}(x;\pi,\phi)$expected SLO under routing fraction $x$

方程物理意义 #

Objective function:

$$\mathcal{J}(x;\pi,\phi) := \mathbb{E}_{\psi, \text{SLO} \sim \phi}[\text{SLO}(P_\pi(1-x), D_\pi(x), \psi)]$$

物理意义:在node assignment $\pi$下,routing fraction $x$的期望SLO表现。$P_\pi(1-x)$表示prefill节点处理$(1-x)$比例的AP,$D_\pi(x)$表示decode节点处理$x$比例。PPD求解 $\arg\max_x \mathcal{J}$。

Scoring function (Eq. 1):

$$S(\psi;\,\pi,\mathbf{w}) = w_{\text{ttft}}\,\Delta_{\text{ttft}} - w_{\text{tpot}}\,\Delta_{\text{tpot}}$$

物理意义:正值意味着local处理的TTFT增益(乘以operator权重)超过TPOT损失。减号反映两者的trade-off方向:TTFT改善是增益,TPOT劣化是代价。$w_{\text{tpot}}$越大对TPOT越敏感,更倾向走PD path。

6项检查 #

  1. Monotonicity: $\Delta_{\text{ttft}}$在P-scarce配置下单调增加(P节点越少TTFT越大),$\Delta_{\text{tpot}}$在decode-heavy负载下增加。$S$不单调——这正是需要per-request decision的原因。
  2. 边界行为: $x=0$ 退化为PD; $x=1$ 退化为Full AP-to-D。PPD的optimum在内部时取决于workload profile。
  3. First-order verification: Table 1中1P_3D高QPS下TTFT改善-73.3%,与§6.2报告的"48–73%"一致。
  4. Convexity: 隐含为非凸(no single static dominates),故exhaustive grid search而非gradient-based。
  5. Dimensional consistency: $S$无量纲(两个相对变化量的加权差);$\mathcal{J}$量纲取决于SLO metric(ms for latency, tok/s for throughput)。
  6. Sensitivity: 权重$(w_{\text{ttft}}, w_{\text{tpot}})$直接控制Pareto frontier上的operating point,Figure 6验证了从0%到95% D-local的单调滑动。
  7. §5 实验与数据 #

    干扰分析:Full Prefill vs. Append Prefill #

    Figure 2: Prefill-decode interference measurement

    Paper's Figure 2, verbatim (caption: "Prefill-decode interference. Decode TPOT degradation when co-locating with one full-prefill vs. one append-prefill operation (both processing 1,024 tokens)").

    这是PPD的基础性实证。在H100上Llama-3.1-8B,full prefill在batch 200处造成+48% TPOT degradation,而append-prefill仅+2%——量级差距验证了"decode节点可安全处理Turn 2+ AP"的核心假设。绿色线(append-prefill)几乎与蓝色基线(decode-only)重合。

    Pareto Frontiers #

    Figure 1: P99 TTFT vs. TPS Pareto frontiers under long-context workload

    Paper's Figure 1, verbatim (caption: "99th-percentile (P99) TTFT vs. Tokens-per-Second (TPS) Pareto frontiers under a long-context workload (10k input, 100 output tokens, 5 turns) at three load levels").

    三个QPS面板清晰展示:D-local capable配置(蓝色)始终dominate orange baselines(PD/Replica),PPD "Best"标注点精准落在Pareto frontier最优区域。随QPS升高,baselines的TTFT爆炸式增长(log scale X轴),而D-local capable维持稳定。

    稳定性与延迟 #

    Figure 4: PPD improves stability and reduces latency

    Paper's Figure 4, verbatim (caption: "PPD improves stability and reduces latency. Average query latency vs. QPS for three configurations on ShareGPT and WildChat datasets").

    最striking的发现:传统PD下2P_2D和3P_1D大量× markers(服务崩溃),而PPD的solid lines始终稳定。1P_3D配置中PPD减少15–25%平均延迟。这证明PPD不仅优化性能,更重要的是将"不可用"配置变为"可用"。

    网络鲁棒性 #

    Figure 5: PPD advantage grows as network slows

    Paper's Figure 5, verbatim (caption: "PPD's advantage grows monotonically as the simulated network slows").

    Left panel: PD的TTFT随网络变慢从143.7ms增至170.6ms (+18.7%),PPD保持flat ~51ms——因为local execution零网络依赖。Right panel: end-to-end latency差距从NVLink的3028→2968ms扩大到100GbE的3169→2983ms。

    TTFT-TPOT Trade-off Frontier #

    Figure 6: Weight-based TTFT-TPOT trade-off frontier

    Paper's Figure 6, verbatim (caption: "w_tpot traces a monotonic frontier between TTFT and TPOT. Turn 2+ latency on 1P_3D under prefill-heavy workloads").

    Operator通过$w_{\text{tpot}}$控制在frontier上的position:$w_{\text{tpot}}=1$(balanced)路由95% locally获得-96% TTFT / +7% TPOT;$w_{\text{tpot}}=6$路由20% locally获得-40% TTFT / +2% TPOT。灰色band是achievable region,验证了连续可控性。

    Key Tables #

    Table 1: Turn 2 TTFT improvement switching from x=0 to x=1

    Paper's Table 1: TTFT improvement grows with load for P-scarce configs (1P: -57.8% to -73.3%) and diminishes when P is abundant (3P: -24.9% to -44.3%).

    Table 3: Per-metric winner counts across 27 test points

    Paper's Table 3: PPD是唯一同时在TPOT(12/27)、TTFT(14/27)、SR(27/27)三维竞争的策略。$x=0$赢TPOT 10/27但TTFT 0/27且SR仅4/27;$x=1$赢TTFT 13/27但TPOT仅5/27。

    §6 论证链 #

    StepClaimEvidenceMechanism
    1Full prefill与append-prefill的decode干扰差距一个数量级Figure 2: 48% vs. 2% at batch 200Append-prefill复杂度$O(m(n+m))$ vs. full的$O(n^2)$;当$m \ll n$时计算量差$n/m$倍
    2无单一静态$x$在所有SLO/workload组合中占优Table 2: Replica赢TTFT 63.3%场景,$x=0$赢TPOT 38.3%,$x=1$赢throughput 27%不同workload profile的prefill/decode比例不同,最优routing fraction随之变化
    3Per-request dynamic routing可以逼近Pareto frontierFigure 1: "Best" markers落在D-local capable frontier最优点Offline profiling覆盖workload grid,online lookup在<1ms内选择最优$x$
    4PPD将不稳定配置变为100%成功率Figure 4: 2P_2D从9/12崩溃→0崩溃减少~75% KV transfer volume(3.1平均turns → 仅Turn 1需要传输),解除网络瓶颈
    5PPD优势与网络无关且随网络变慢单调增长Figure 5: TTFT advantage从64%→70%Local execution无网络组件;PD的TTFT中KV transfer延迟占比随带宽降低增加

    §7 实现 cross-reference #

    PPD原型实现在vLLM disaggregated serving infrastructure之上,复用vLLM的:

    • KV transfer protocol(P→D cache传输)
    • Prefix cache(用于识别cached KV entries)
    • Session management(确保Turn 2+请求路由到持有KV cache的同一D节点)

    具体实现细节在Appendix B描述但未提供源码或commit hash。

    [实现未公开] — 论文未开源代码,无file:line引用。

    关键实现细节 #

    1. Discretization thresholds: lookup table沿三轴离散化——accumulated context length ($n_{\text{ctx}}$), input/output ratio ($n_{\text{in}}/n_{\text{out}}$), system QPS ($q$)。网格粒度未明确,但decision time <1ms暗示table规模适中。
      1. Session affinity: Turn 2+请求必须路由到持有上轮KV cache的那个特定D节点,而非任意D节点。这要求scheduler维护session→node映射表。如果该D节点故障或过载,fallback回PD path($x=0$)。
      2. §8 Scheduling & Resource Management #

        Routing granularity: per-request(非per-token或per-layer)。每个Turn 2+请求作为原子单元决策一次routing。

        Preemption: 未提及。一旦请求被路由到D节点local执行或送往P节点,无cancel/restart机制。

        Admission control: 通过scoring function隐式实现。当系统过载时$\Delta_{\text{tpot}}$增大,$S$趋负,更多请求走PD path——自适应降级。极端过载时PPD退化为标准PD($x=0$)。

        Fairness: 无per-tenant保证。所有Turn 2+请求使用相同scoring function和权重。

        KV cache management:

        • 分配单元:未具体说明(继承vLLM的paged allocation)
        • 碎片化:D节点持有multi-turn KV cache增长问题由vLLM page table管理
        • Eviction:未讨论。长会话可能导致D节点KV memory耗尽,此时应fallback到PD path
        • Swap:未提及CPU/disk offload

        §9 Workload Characterization #

        Workload regimePPDPD ($x=0$)Why
        Short prompts, long output (decode-heavy)TTFT↓68%, TPOT≈TPOT slightly betterAP很短→local执行几乎零干扰;但decode-heavy使D节点batch大,AP额外负载可感知
        Long prompts, short output (prefill-heavy)TTFT↓96%, TPOT↑7–12%TPOT betterAP处理长new-prompt仍有计算成本,但TTFT gains巨大因避免了10K+ token KV transfer
        Balanced I/O, high concurrencyTTFT↓65%, stability↑Service degradationKV transfer饱和网络导致PD崩溃;PPD消除~75%传输量
        Turn 1 dominant (few multi-turn)≈PD≈PPDTurn 1两者行为一致;PPD退化为PD无额外收益也无损失
        Slow network (100GbE)TTFT advantage grows to 70%TTFT degrades +18.7%PPD local path零网络依赖;PD的KV transfer成为瓶颈

        PPD loses on: prefill-heavy workloads where TPOT matters more than TTFT(operator需要调高$w_{\text{tpot}}$来保护decode quality)。

        §10 Evaluation #

        Baselines:

        • vLLM disaggregated serving(standard PD, $x=0$)
        • Replica mode (4R)
        • Static $x=1$ (Full AP-to-D)
        • Hybrid R+P/D configurations (7 configs, generally underperform)

        Baseline fairness: 所有configurations使用相同硬件(4×H100),相同model(Llama-3.1-8B),相同vLLM codebase。未提及specific commit hash。

        Metric definitions:

        • TTFT: time-to-first-token (Turn 2+ specifically)
        • TPOT: time-per-output-token (average)
        • TPS: tokens-per-second (output throughput)
        • SR: success rate (≥95% completing without timeout)
        • Query latency: end-to-end per-conversation

        Datasets: ShareGPT (user-shared ChatGPT conversations), WildChat (in-the-wild conversations with varied patterns)

        §11 API & Usability #

        User-facing API: 继承vLLM的OpenAI-compatible API。PPD对用户完全透明——无需修改client代码。

        Config surface: 两个核心参数:$w_{\text{ttft}}$和$w_{\text{tpot}}$(operator权重)。Node assignment $\pi$是部署时决定。Offline profiling phase需要workload grid benchmark(one-time cost)。

        Migration cost (vLLM → PPD):

        • 需要vLLM disaggregated serving基础设施
        • 添加PPD routing module(scheduler integration)
        • 运行一次offline profiling生成lookup table
        • 配置operator权重
        • 无model修改、无custom ops、无kernel变更

        §12 Adoption & Ecosystem #

        • Upstream status: 未合并到vLLM/SGLang主线。论文为学术工作,prototype基于vLLM。
        • Production deployment: 未声明production use。
        • Downstream requirements: 需要disaggregated serving mode(vLLM已支持)+ prefix cache + session affinity。不引入新的parallelism constraint。
        • Concurrent work: AMPD(He et al., 2026)使用online queue-delay estimation而非offline table。

        §13 Deployment Context #

        • Serving stage: both prefill and decode; routing decision at request admission layer
        • Concurrency regime: 全范围有效;低QPS时PPD≈$x=1$,高QPS时PPD动态调整保护TPOT
        • Hardware affinity: 在H100验证。HBM bandwidth越大→KV transfer越快→PD的缺点减弱→PPD优势缩小;反之网络越慢(跨节点部署)PPD优势越大
        • Ecosystem integration: 基于vLLM disaggregated serving。Integration是scheduler-level patch(routing module),非fork
        • Migration path: vLLM用户启用disaggregated serving → 添加PPD router → 运行offline profiling → 设置SLO weights → 上线

        §12 Software → Hardware reverse implication: 不触发。PPD是纯软件request-routing策略,不涉及persistent megakernel、chiplet affinity、cache-scope control等硬件亲和设计。