Files
agentic-kvc/TODO.md
Gahow Wang 05592e6adc Agentic workload PD separation analysis with trace-driven benchmarks
Systematic study of prefill-decode disaggregation for agentic LLM workloads
using production GLM-5.1 coder trace (2.1M requests, 71B input tokens).

Key findings:
- Cache-aware routing improves TPOT p90 by 15% and APC from 20.8% to 44.7%
  without PD separation, matching PD-Sep's decode isolation benefit
- PD separation adds +72% TTFT overhead (KV transfer) with no TPOT gain
  when using the same cache-aware scheduler
- Prefill remains compute-bound even at 95% KV cache reuse (AI >1000x
  vs decode AI <2), but absolute FLOPs drop 71% from cache hits
- For agentic MoE workloads, cache-aware routing > PD separation

Infrastructure:
- Trace sampler preserving session structure + hash_ids for prefix sharing
- Async trace replayer with streaming TTFT/TPOT/E2E measurement
- Unified cache-aware + token-level load-balanced global scheduler proxy
  supporting both PD-colocated and PD-disaggregated (Mooncake/RDMA) modes
- vLLM 0.18.1 scheduler patch for KV transfer abort race condition
- Roofline analysis tool for prefill/decode compute characterization

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 21:21:57 +08:00

1.3 KiB
Raw Blame History

实验 setup

GPU 机器dash0是 8*H20 的机器,可以直接 ssh dash0 进行连接访问

推理引擎:基于 vllm 0.18.1self build支持后续 patch 放在 git 中维护

模型:~/models/Qwen/Qwen3-Coder-30B-A3B-Instruct

推理 trace原始完整 2h trace 在 dash0 的 ~/ali-trace/trace-glm5.1-formatted/051315-051317.jsonl

性能指标:每个请求的 TTFT/TPOT/E2E/TBTprefix KVCache hit ratio

目标:

  1. 先实现标准的 trace-sampler将 cluster 规模的原始 tracesample 到合适当前机器数量的规模来跑,保持一份统一的 sample 后的 trace file 作为输入
  2. 实现标准的 trace replayer保证能够体现线上流量的流量到来特征KVCache 重用特征等
  3. 跑通 PD 分离,确认 PD 分离能够比普通的 PD 混合一起跑的性能要好,给出两者详细的性能对比以及原因分析
  4. 判断 trace 的 pattern是否有必要 PD 完全混合或者 PD 分离
  5. 参考本地的 ~/phd/agentic-pd-hybrid,判断是否能够实现一套 prefill-as-a-service 的架构,把重的 prefill 交给 prefill serviceprefill service 能够从本地 GPU/DRAM/别的 GPU 机器上 pull KVCache提高本地的 prefix KVCache hit ratio不影响 decoding 的 prefill就可以交给过去 PD 分离定义中 D-node 来做,提高 KVCache 命中率