实验 setup: GPU 机器:dash0,是 8*H20 的机器,可以直接 `ssh dash0` 进行连接访问 推理引擎:基于 vllm 0.18.1,self 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/TBT,prefix KVCache hit ratio 目标: 1. 先实现标准的 trace-sampler,将 cluster 规模的原始 trace,sample 到合适当前机器数量的规模来跑,保持一份统一的 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 service,prefill service 能够从本地 GPU/DRAM/别的 GPU 机器上 pull KVCache,提高本地的 prefix KVCache hit ratio,不影响 decoding 的 prefill,就可以交给过去 PD 分离定义中 D-node 来做,提高 KVCache 命中率 6. [TODO] Router 侧状态精确性 ablation:当前 router 自己维护 shadow state(ongoing_tokens, pending_prefill_tokens, cached_blocks 等),与 vLLM 引擎内部真实状态可能存在 gap(尤其是 cache eviction 导致的 APC 偏差)。需要: - 修改 vLLM,让每个 instance 定期把内部状态(waiting queue depth, running batch size, KV cache usage, actual prefix cache hit blocks)写入 Redis - Router 从 Redis 读取精确状态,替代当前的 proxy-side 近似 - 对比 proxy shadow state vs Redis exact state 的 routing 决策差异和最终性能差异 - 量化 gap 大小:哪些指标差距最大?是否影响实际 routing 质量?