@@ -12,25 +12,81 @@ under `configs/glm-5.2-p2p/`, series-2 arms under `configs/series-2/`.
1212
1313---
1414
15- ## 1. How the delta is calculated
15+ ## 1. How the EPP delta is calculated (when does the router pull?)
1616
17- ** Protocol.** Every comparison is a paired A/B on identical pods, image, and
18- workload; the only change between arms is the EPP ` --config-file ` (the routing
19- plugin config). Before every measured run: mechanism-engaged gates (prefix
20- index populated, source header firing, ` vllm:external_prefix_cache_hits_total `
21- rising), full pull-mesh warm-up, ` PYTHONHASHSEED ` pinned fleet-wide.
22-
23- ** Formula.** For each metric:
17+ ** The EPP decision.** For every request, the ` p2p-source-producer ` computes a
18+ cached-token delta between the best available KV source and the pod that
19+ scheduling chose:
2420
2521```
26- delta% = (P2P_arm - baseline_arm) / baseline_arm x 100
22+ source_delta = cachedTokens(best peer) - cachedTokens(scheduled pod)
23+ pull fires iff source_delta >= minCachedTokenDelta
2724```
2825
29- Latency metrics (TTFT, request latency): negative delta = improvement.
30- Throughput metrics (req/s, tok/s): positive delta = improvement.
31- Pull activity is verified per run from engine counters
32- (` external_prefix_cache_hits_total ` , ` kv_offload_load_bytes_total ` ), so a
33- quoted delta is always backed by evidence the mechanism actually ran.
26+ The per-pod ` cachedTokens ` comes from the prefix-cache producer — ** precise**
27+ (kv-events-fed per-pod index) or ** approximate** (prompt-hash estimate); the
28+ producer consumes either. After scheduling it compares the best-match peer
29+ against the pod that will compute the prefix (the ` prefill ` profile target
30+ under P/D disaggregation), and only when that peer out-caches it by at least
31+ ` minCachedTokenDelta ` does it attach the KV-source header; the engine then
32+ pulls those blocks from the peer instead of recomputing them. When no peer
33+ clears the threshold, the request proceeds unchanged — the producer is inert.
34+
35+ ** Setting the threshold: recompute vs pull with increasing prefix length.**
36+ ` minCachedTokenDelta ` is not a guess — it is the measured crossover of the
37+ per-miss economics on each model:
38+ single-request prefill latency for a prefix that exists on a peer pod,
39+ recomputed locally vs pulled. Protocol: seed a fresh prefix on one pod, land
40+ the request on a cold pod, measure time-to-first-token both ways (gpt-oss and
41+ Llama: 5-rep medians, warm transfer mesh, unique prefix per rep; Qwen and GLM:
42+ on-rig calibration points).
43+
44+ | Model | KV per token | Prefix tokens | Recompute | P2P pull | Delta |
45+ | ---| ---| ---| ---| ---| ---|
46+ | Llama-3.1-8B | ~ 128 KB | 1,024 | 30 ms | 34 ms | +11% |
47+ | | | 4,096 | 99 ms | 59 ms | ** -41%** |
48+ | | | 8,192 | 236 ms | 88 ms | ** -63%** |
49+ | | | 16,384 | 503 ms | 155 ms | ** -69%** |
50+ | gpt-oss-120b | ~ 41.5 KB | 2,048 | 70.6 ms | 49.0 ms | ** -31%** |
51+ | | | 8,192 | 205.4 ms | 120.1 ms | ** -42%** |
52+ | | | 16,384 | 426.3 ms | 196.2 ms | ** -54%** |
53+ | | | 32,768 | 983.0 ms | 376.3 ms | ** -62%** |
54+ | | | 49,152 | 1,695 ms | 550.5 ms | ** -68%** |
55+ | Qwen3-30B-A3B | (MoE, A3B) | 8,192 | 1,210 ms | 74 ms | ** -94%** |
56+ | GLM-5.2-FP8 | ~ 93 KB | ~ 24,000 | 4,630 ms | 3,910 ms | ** -16%** |
57+
58+ (GLM reference points on the same request: warm local hit 2.30 s; the pull
59+ moves 2.23 GB of KV.)
60+
61+ The pattern is the same on every model: ** below a crossover length recompute
62+ wins (the pull's fixed setup cost dominates); above it the pull wins and the
63+ gap grows with length** , because recompute scales with model FLOPs while the
64+ pull scales with KV bytes. Where the crossover sits depends on the ratio of
65+ prefill speed to KV weight — and that per-model crossover is exactly what the
66+ router's ` minCachedTokenDelta ` is set to, so the fleet only ever pulls where
67+ this table says a pull wins:
68+
69+ | Model | Measured crossover | ` minCachedTokenDelta ` used |
70+ | ---| ---| ---|
71+ | Llama-3.1-8B | ~ 2K tokens | 2,048 |
72+ | gpt-oss-120b | < 2K (pull wins at every measured length) | 2,048 |
73+ | Qwen3-30B-A3B | ~ 760 tokens (pull overhead ~ 30 ms) | 1,024 |
74+ | GLM-5.2-FP8 | heavy KV, shallow gain at 24K | 16,384 (at 2,048, measured pulls cost more than they save) |
75+
76+ Every fleet-level delta in section 2 is built on these per-miss economics:
77+ the router fires a pull only when a peer out-caches the scheduled pod by at
78+ least the threshold, so a "P2P win" is many per-miss wins compounded under
79+ load, never a pull for a miss the table says should be recomputed.
80+
81+ ** Reporting protocol for the results below.** Every quoted result is a paired
82+ A/B on identical pods, image, and workload; the only change between arms is
83+ the EPP ` --config-file ` . Result deltas are reported as
84+ ` delta% = (P2P_arm - baseline_arm) / baseline_arm ` — negative is better for
85+ latency, positive for throughput. Before every measured run: mechanism-engaged
86+ gates (prefix index populated, source header firing,
87+ ` vllm:external_prefix_cache_hits_total ` rising), full pull-mesh warm-up,
88+ ` PYTHONHASHSEED ` pinned fleet-wide; pull counters are read after each run so
89+ a quoted delta is always backed by evidence the mechanism actually ran.
3490
3591** Pairing per model and accelerator:**
3692
@@ -68,21 +124,17 @@ The three delta styles to be aware of:
68124| gpt-oss-120b | 14x H200 | Multi-turn chat | TTFT p99 | 25.4 s | 9.2 s | ** -64%** |
69125| gpt-oss-120b | 16x H200 | Uniform pool (6M-token set) | sustained rate | 9.4 req/s | 16.7 req/s | ** +78%** |
70126| gpt-oss-120b | 16x H200 | Uniform pool @ 12 req/s | req latency p50 | 24.9 s | 2.3 s | ** -91%** |
71- | gpt-oss-120b | 16x H200 | Pull vs recompute, 49K prefix | prefill latency | 1,695 ms | 550 ms | ** -68%** |
72127| Llama-3.1-8B | 4x H200 | Prefix pool 64 x 16K @ 12 req/s | req latency p50 | 12.2 s | 2.1 s | ** -83%** |
73128| Llama-3.1-8B | 4x H200 | Prefix pool, saturation ceiling | achieved rate | 10.3 req/s | 12.6 req/s | ** +22%** |
74129| Llama-3.1-8B | 4x H200 | P/D prefill placement | achieved rate | 11.3 req/s | 14.7 req/s | ** +30%** |
75- | Llama-3.1-8B | 4x H200 | Pull vs recompute, 16K prefix | prefill latency | 503 ms | 155 ms | ** -69%** |
76130| gpt-oss-120b | 16x H200 (8P+8D) | P/D docQA C=192, guide vs guide+P2P stack | TTFT p50 | 11.94 s | 1.16 s | ** -90% (10x)** |
77131| gpt-oss-120b | 16x H200 (8P+8D) | P/D docQA C=192 | TTFT p99 | 106.1 s | 80.0 s | ** -25%** |
78132| gpt-oss-120b | 16x H200 (8P+8D) | P/D docQA C=192 | throughput | 5.68 turns/s | 7.96 turns/s | ** +40%** |
79133| Qwen3-30B-A3B | 6x H200 (2P+4D) | Agentic multi-turn (50K contexts, tool gaps) | TTFT p50 | 5.22 s | 1.09 s | ** -79% (4.8x)** |
80134| Qwen3-30B-A3B | 6x H200 (2P+4D) | Agentic multi-turn | TTFT p95 | 18.94 s | 11.77-14.79 s | ** -22..-38%** |
81135| Qwen3-30B-A3B | 6x H200 (2P+4D) | Agentic multi-turn | throughput (1/duration) | 304 s | 229 s | ** +33%** |
82- | Qwen3-30B-A3B | 6x H200 (2P+4D) | Pull vs recompute, 8K prefix | prefill latency | 1,210 ms | 74 ms | ** -94% (16x)** |
83136| GLM-5.2-FP8 | 32x H200 | Agentic c128, precise routing | TTFT p50 | 3,802 ms | 3,177 ms | ** -16%** |
84137| GLM-5.2-FP8 | 32x H200 | Agentic c128, precise routing | TTFT p90 | 11,755 ms | 9,970 ms | ** -15%** |
85- | GLM-5.2-FP8 | 32x H200 | Pull vs recompute, 24K prefix | TTFT (single req) | 4.63 s | 3.91 s | ** -16%** |
86138
87139---
88140
@@ -248,10 +300,6 @@ recompute is expensive, exactly as the crossover predicts.
248300| Output throughput | 2,016 tok/s | 1,982 tok/s | -2% |
249301| KV pulled cross-engine | ~ 0 | 163 GB (1.77M tokens) | mechanism engaged |
250302
251- Single-request mechanism proof on the same rig (24K-token prefix): cold
252- recompute 4.63 s, cross-engine pull 3.91 s (** -16%** , 2.23 GB of KV moved
253- per pull), warm local hit 2.30 s.
254-
255303** Win:** first demonstration of the pull on a 753B wide-EP P/D deployment.
256304Precise affinity concentrates agentic traffic on cache-holder ranks; the pull
257305lets the picker route to a less-loaded rank and fetch the prefix, recovering
0 commit comments