The routing decision
One prompt, three routes
In examples/mooncake-pair.jsonl, the matcher compares block hashes until the first divergence. Only complete 512-token blocks qualify for KV reuse; partial tails are always processed locally.
The two prompts share 12 blocks (6,144 tokens, 768 MiB). Choose a route below to trace which work stays local and which crosses the link.
When a competing copy changes the winner
Adding one independent 768 MiB copy produces 12 CSV-winner changes: 7 outright flips (3 to Wait, 4 to Recompute) + 5 shifts into exact ties (3 W/T, 2 W/R, tie-broken to Wait). Click any cell below to compare Wait, Recompute, and Transfer TTFTs side by side.
Constructed costs per cell (replayed 3 times from fresh state): tail + first decode = 10 ms, cold service = 100 ms, Worker B starts free.
Exact ties are computed from raw nanoseconds (W=T, W=R; CSV tie-break order is Wait < Recompute < Transfer).
Idle link (no competing copy)
Contested link (+1 independent 768 MiB copy)
How compute and bandwidth move the boundary
Using the pinned profiles/a100.csv table instead of hand costs: avoiding 48 prefill chunks (6,144 tokens) saves ms,
against an imposed A backlog of one cold 512-token prefill plus one decode ( ms).
At 12.5 GiB/s, an equal competing copy doubles transfer time from 60 ms to 120 ms. Explore how scaling compute or link bandwidth shifts the decision boundary.
Selected A100 Boundary Comparison
3x3 Sensitivity Matrix (click any cell)
Decision boundaries under an equal-copy assumption, not measured trace goodputs or scheduler queue simulations.
some cells, with 0 extra on-time requests.The partial-copy challenge
Can a partial copy beat both endpoints?
Request 3 arrives at 2 ms with a 2,176-token prompt (4 full 512-token blocks plus a 128-token tail). Worker A holds all 4 blocks behind a 119 ms non-preemptible phase; Worker B holds 0 blocks behind a 40 ms phase.
Parallel-Lane Execution Timeline (selected cut)
Worker B's running phase and the link copy overlap in parallel from arrival (0 ms). Suffix prefill begins at max(40, 20k) ms, yielding TTFT(k) = max(40, 20k) + 10(4 - k) + 10 ms.
Solid markers denote CLI-recorded timestamps (neighbor ID 2 token at +40.000 ms, observed TTFT triangle). Dashed-border spans show derived fixture phase durations from the documented cost model.
U-Shaped Cut Curve: Observed vs. Serial Forecast (k = 0 to 4)
Click any cut bar to switch the parallel-lane diagram. Serial forecasts (hollow blue diamonds) count B's full 41 ms phase rather than its 40 ms residual, predicting 91/81/71/80/90 ms.
Olive bars = observed TTFT (ms). Hollow blue diamonds = serial forecast (91/81/71/80/90 ms).
Request 1076
Where the serial forecast went wrong
Tool/agent Request 1076 arrives with 7,173 tokens (14 full 512-token blocks + 5-token tail) at source tick 179,999 ms (reset clock 89,999 ms, 1x A100 nominal window). At the exact same tick, earlier arrival Request 1061 starts copying 2 different blocks (128 MiB) to Worker B. An A-bound transfer cannot join that batch and shares the 12.5 GiB/s link with it.
A/12), copy 1 block (A/13, budgeted menu only), or copy 2 blocks (A/14, nominal reference).B/14) for the 5-token tail + first decode. Request 1061 already started 128 MiB of independent blocks to B.- Serial backlog dwarfs link delay: Worker A backlog is estimated at 20.749 s, dwarfing both link readiness forecasts (+10 ms nominal vs. +20 ms aware on
A/14). - Observed TTFT is 1.66 s to 4.60 s: The serial backlog proxy ignores decode batching and fractional progress.
- Zero cohort change: All four branches miss the 1,000 ms TTFT target, pass the 100 ms TPOT target, and leave the measured cohort at 133 / 325 on time (0 gained, 0 lost).
All 4 Branches: Serial Forecast vs. Forced Observed TTFT
1. Decision Zoom (-50 ms to +100 ms around Request 1076 arrival)
Forecast readiness marks (hollow blue diamonds) are never receipts (filled olive triangles). Request 935's preceding token (-40.126 ms) and next two emissions (+20.964 ms, +82.088 ms) span crossing gaps of 61.090 ms and 61.123 ms.
2. Macro Lifecycle (0 to 7 seconds after Request 1076 arrival)
Shaded band marks the 0 to 0.1 s decision zoom above. Dashed rust line marks the 1,000 ms TTFT target; all four forced placements finish well after 1.0 s.
The Mooncake traces
Did contention change goodput?
Every panel below preserves separate denominators for Conversation and Tool/agent traces. Filter to inspect one workload or compare both side by side.
Load sweep and the qualified subset
Across all 24 paired primary windows (3 spaced windows × 4 loads × 2 traces), Nominal and Aware ledgers are 100% identical (0.000 req/s difference everywhere). At 1x speed, only 0/274 conversation and 1/845 tool/agent nominal arrivals saw an independent competing copy.
A100 8,192-Token Qualification Scope Limit (Unlimited-History Audit)
Keeping only requests with input + output ≤ 8,192 retains 53.70% of conversation requests but only 14.95% of conversation's potentially reusable prefix tokens (compared to 61.78% for tool/agent). Excluded long contexts are neither donors nor consumers.
All 104 Paired Block Deltas (Aware minus Nominal)
Zero shadow winner flips on nominal views is distinct from paired policy execution; here every single one of the 104 paired blocks also tied at exactly 0.000 req/s (0 wins, 104 ties, 0 losses).
Goodput, forecast error and scoring cost
Twelve single-factor paired contrasts (high minus low, holding the other two factors fixed). None cleared the registered +0.1 req/s practical threshold:
- Scheduler-aware compute delivered the largest gains (+0.049 Conversation / +0.046 req/s Tool/agent at longest).
- Budgeted menu netted +1 / +8 on-time requests (+0.00064 / +0.00513 req/s) and saved 2.375 / 6.188 GiB of cohort receipts (only 3/2,920 and 1/8,238 strict interior cuts).
12 Single-Factor Paired Goodput Contrasts vs. +0.1 req/s Threshold
Inspect all 12 single-factor paired contrasts (goodput deltas, gained/lost counts, receipt GiB)
TTFT Forecast Calibration (Serial vs. Scheduler-Aware)
Evaluated on the same executed serial/longest/nominal action without changing replay state. Tool/agent excludes 35 arrivals with no first token.
Laptop Scoring Cost (Fixed Snapshot, Microseconds)
Show full laptop scoring candidate & phase counts (all 12 policies × visible traces)
Placement regret across six reset arrivals
Six pre-registered reset arrivals forced to each legal local worker, then continued under nominal routing. Lowering the focal arrival's TTFT can still reduce net on-time completions among other measured arrivals (see Tool/agent block 21: 86.881 ms faster focal TTFT cost 10 net other on-time responses).
The A100 grids
When does a partial copy beat every endpoint?
These controlled A100 workloads test where partial KV copies can beat all three endpoints (local reuse A/12, cold recompute B/0, and full copy B/12) and whether an independent wider-menu router captures them.
14-Branch Forced Cut Curve (B/0..B/12 vs. A/12)
Horizontal purple line = A/12 local reuse. Endpoints B/0 (square) and B/12 (diamond) are marked explicitly against the interior minimum and the 1,000 ms TTFT target.
7 Captured Crossover Trade-offs & Slice Summary
Focal TTFT Saved vs. Drain Traffic Saved (7 Changed Cells)
Replacing A/12 spends 128 MiB; replacing B/0 ties drain bytes; replacing B/12 saves 192 to 448 MiB through drain. All 7 faster probes still exceed 1,000 ms TTFT.
Primary Elevated-some Slice vs. Full 54-Cell Grid
Both registered benefit paths and all full-grid safety guards pass (0 rejections, 0 fallbacks, max neighbor p95 regression +2.111 ms ≤ 5 ms limit). Yet on-time goodput stays identical: 78/90 (1.733 req/s) on the primary slice and 243/270 (1.800 req/s) across all 54 cells.
Show all 9 level × overlap slice rows
Designed 288-Run A100 Policy Atlas
Four link rates (0.5, 1, 2, 12.5 GiB/s) × three traffic regimes (no-injection, independent, joinable) × three family ordering seeds (11, 23, 47) × eight policies.
Across 2,592 measured decisions, there were 0 strict interior cuts, 0 fallbacks, and 522 TTFT misses (all responses completed and passed TPOT).
Model & audit
From arrival to the event ledger
The simulator measures replay time on a deterministic event clock. The laptop scoring benchmark separately measures wall-clock CPU time. Neither routing nor estimation ever sees recorded output lengths or future arrivals.
1. Primary reproduction & checks
cargo run --release --locked -- reproduce --config experiments/paper.toml python3 experiments/scripts/check_comparison.py python3 experiments/scripts/check_burst.py python3 experiments/scripts/check_boundary.py
2. Rebuild this interactive demo (isolated, never touches target/paper)
python3 demo/build.py target/demo
Writes a standalone copy to target/demo/index.html from freshly reconciled audit JSONs without modifying tracked paper outputs.
3. Held-out replication, trace matrix, designed atlas, regret, scoring & overlap grids (atomic writes)
mkdir -p target/audit cargo run --release --locked -- run-followup --config experiments/followup-v1.toml > target/audit/replication.pending.json && mv -f target/audit/replication.pending.json target/audit/replication.json cargo run --release --locked -- run-trace-matrix --config experiments/followup-v1.toml > target/audit/trace-matrix.pending.json && mv -f target/audit/trace-matrix.pending.json target/audit/trace-matrix.json cargo run --release --locked -- run-designed --config experiments/followup-v1.toml > target/audit/designed.pending.json && mv -f target/audit/designed.pending.json target/audit/designed.json cargo run --release --locked -- run-placement-regret --config experiments/followup-v1.toml > target/audit/placement-regret.pending.json && mv -f target/audit/placement-regret.pending.json target/audit/placement-regret.json cargo run --release --locked -- bench-scoring --config experiments/followup-v1.toml > target/audit/scoring.pending.json && mv -f target/audit/scoring.pending.json target/audit/scoring.json cargo run --release --locked --example check_overlap -- --forced > target/audit/overlap-forced.pending.json && mv -f target/audit/overlap-forced.pending.json target/audit/overlap-forced.json cargo run --release --locked --example check_overlap -- --source-forced > target/audit/overlap-source-forced.pending.json && mv -f target/audit/overlap-source-forced.pending.json target/audit/overlap-source-forced.json cargo run --release --locked --example check_overlap -- --source-paired > target/audit/overlap-source-paired.pending.json && mv -f target/audit/overlap-source-paired.pending.json target/audit/overlap-source-paired.json
4. Live Q&A: inspect another qualified request ID (e.g. 1061, atomic write)
mkdir -p target/audit target/release/kv-crossover inspect --config experiments/paper.toml \ --trace toolagent --window-start-ms 120000 --load 1 --policy nominal \ --request-id 1061 > target/audit/qa-1061.pending.json \ && mv -f target/audit/qa-1061.pending.json target/audit/qa-1061.json
Offline Exports & Scope Limits
Download reconciled CSV tables and static comparison SVGs directly from the verified payload embedded inside this HTML file (no companion files or server required).
- A100 8,192-token subset: Retains 53.70% of conversation requests and only 14.95% of conversation's unlimited-history reusable prefix tokens (77.63% / 61.78% for tool/agent). Does not predict contention among omitted long prompts.
- Two symmetric single-A100 workers: Fixed 48 GiB KV budget each, 128-token prefill chunks, batch-8 rotating decode, one equal-sharing bidirectional link.
- Coarse source timestamps: Released Mooncake traces have 1,180 distinct ticks spaced ~3 s apart; tied arrivals reflect trace quantization, not sub-millisecond production co-arrival.
- No production telemetry: Wall-clock laptop scoring cost (microseconds on i5-12500H) is kept strictly separate from simulated event-clock service times.
9ddcc7b7c39022123348fcefc28af61f71838772f20b13b996e4d4d0bfaa397c
2f45438502fa9d48c12aea6fb861ca1f9f2fbaeecbb6c41c5525bf03174ea666