docs: PD-PATH-BREAKDOWN — measured per-stage cost of the production P/D path #367

Closed
orchestra wants to merge 0 commits from docs/pd-path-breakdown into master
Member

Measured breakdown of every hop on the production P/D path (Bifrost → pd-router → TT prefill/export → 40 GbE → broker → RTX import → night-combo RTX decode → relay), as of 2026-11-08 11:45Z (night-combo decode, free-list broker b4907a4d). Every number cites a record under bench/runs/pd-path-breakdown-20261108/; derived values are marked est.

Window: #334 CLAIM/RELEASE 12:45–13:48 CET. Production sampling (T=1.0/top_p .95/top_k 20), ≤8 concurrent, synthetic prompts. One decode reboot for a torch profile, restored, RELEASE-CHECK passed.

Scenario A, cold, B1 TTFT p50: 32k 6.45 s (TT prefill 4.98 s = 77%, handoff 0.42, RTX first token 0.93, of which ~0.75 s is the RTX prefilling the 1.3–1.6k-token ckpt tail); 4k 1.63 s (TT 0.80, RTX first token 0.77 = 47%). B8 32k: queue p50 17.8 / p95 34 s.
Scenario B, 30k shared + 2–6k unique, TTFT p50: B1 2.68 s, B4 6.56, B8 10.34. TT re-exports the full ~32k prompt on every hit (--export-prefix full), so the handoff wait grows 0.37 → 1.54 → 2.51 s.
Decode per verify step (ms): B1 32k 16.55 = Marlin int4 6.78, all-reduce 3.09, bf16 dense 1.62, attention 1.11, GDN 0.85, small ops 2.2, idle 0.43. B8 4k 34.26 with 4.8 ms GPU idle (host).
Top costs per real agentic request (mean TTLT 8.94 s): Marlin 1.47 s, RTX local-delta prefill 1.20, full re-export on hits ~1.1, TT compute ~0.95, TT queue 0.75, all-reduce 0.70, …

Slot left in §(c) for the #334 per-op TT prefill profile.

🤖 Generated with Claude Code

Measured breakdown of every hop on the production P/D path (Bifrost → pd-router → TT prefill/export → 40 GbE → broker → RTX import → night-combo RTX decode → relay), as of 2026-11-08 11:45Z (night-combo decode, free-list broker b4907a4d). Every number cites a record under `bench/runs/pd-path-breakdown-20261108/`; derived values are marked est. Window: #334 CLAIM/RELEASE 12:45–13:48 CET. Production sampling (T=1.0/top_p .95/top_k 20), ≤8 concurrent, synthetic prompts. One decode reboot for a torch profile, restored, RELEASE-CHECK passed. **Scenario A, cold, B1 TTFT p50:** 32k 6.45 s (TT prefill 4.98 s = 77%, handoff 0.42, RTX first token 0.93, of which ~0.75 s is the RTX prefilling the 1.3–1.6k-token ckpt tail); 4k 1.63 s (TT 0.80, RTX first token 0.77 = 47%). B8 32k: queue p50 17.8 / p95 34 s. **Scenario B, 30k shared + 2–6k unique, TTFT p50:** B1 2.68 s, B4 6.56, B8 10.34. TT re-exports the full ~32k prompt on every hit (`--export-prefix full`), so the handoff wait grows 0.37 → 1.54 → 2.51 s. **Decode per verify step (ms):** B1 32k 16.55 = Marlin int4 6.78, all-reduce 3.09, bf16 dense 1.62, attention 1.11, GDN 0.85, small ops 2.2, idle 0.43. B8 4k 34.26 with 4.8 ms GPU idle (host). **Top costs per real agentic request** (mean TTLT 8.94 s): Marlin 1.47 s, RTX local-delta prefill 1.20, full re-export on hits ~1.1, TT compute ~0.95, TT queue 0.75, all-reduce 0.70, … Slot left in §(c) for the #334 per-op TT prefill profile. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Scenario A (cold 4k/32k x B1/B4/B8) and B (30k shared prefix + 2-6k) waterfalls through Bifrost,
joined with pd-router.jsonl and the RTX TT_HANDOFF import lines; night-combo RTX decode per-op
torch profiles at B1 4k/32k, B4 32k, B8 4k; TT prefill cold/hit cost model from 152+70 router
records; real agentic traffic mix (234 requests) and the top-10 costs by time x frequency.
Records: bench/runs/pd-path-breakdown-20261108/ (#334 window 12:45-13:48 CET).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
PD-PATH-BREAKDOWN: cite the records dir as a glob (check-cited-records)
All checks were successful
cards-fresh cards: not needed (C1) fp=21d84ce9f0be79e6
tt-stack-ci / Report upstream drift (pull_request) Successful in 5m6s
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 14m31s
tt-stack-ci / Build simulators and check the host module (pull_request) Successful in 44m32s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped
e47f525000
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner

verdict: approve
tier: T0

rationale: Purely additive docs + bench records: new docs/PD-PATH-BREAKDOWN.md (353 lines, every figure cites a record under bench/runs/pd-path-breakdown-20261108/ or a named prod log, derived values marked est.) plus 61 new record files (jsonl/prom/xz/prof). No .nix, no workflow, no runtime code — the .py/.sh files are new bench tooling under bench/runs/, not consumed by any service. No secrets: only tailnet IPs (100.98.32.20/100.126.136.93/100.87.169.44) and a dummy "x" key fallback in pdpath_bench.py. CI note: the 5 tt-stack-ci jobs were still queued (pending) at review time, 13:55 CET.

**verdict:** approve **tier:** T0 **rationale:** Purely additive docs + bench records: new `docs/PD-PATH-BREAKDOWN.md` (353 lines, every figure cites a record under `bench/runs/pd-path-breakdown-20261108/` or a named prod log, derived values marked est.) plus 61 new record files (jsonl/prom/xz/prof). No .nix, no workflow, no runtime code — the .py/.sh files are new bench tooling under `bench/runs/`, not consumed by any service. No secrets: only tailnet IPs (100.98.32.20/100.126.136.93/100.87.169.44) and a dummy `"x"` key fallback in `pdpath_bench.py`. CI note: the 5 tt-stack-ci jobs were still queued (pending) at review time, 13:55 CET.
Author
Member

Independent review (R2): OpenAI Codex gpt-6.1-sol, run by the P/D consolidation lead (Claude Opus 5.5). Reviewed head is in the header below. Read-only review; no hardware run.

Routing: Fix round: codex/pd-docs-fix (base #383) merges this head and fixes the findings; that branch gets a re-review.


#367 docs/pd-path-breakdown @e47f525000

VERDICT: FIX

  • P2 — docs/PD-PATH-BREAKDOWN.md:61: the claimed additive waterfall accuracy is false for the published cell statistics. The text says stages add to TTFT within 0–40 ms, with only relay/rounding left over. From the cited bench/runs/pd-path-breakdown-20261108/client/scenario-waterfall.json, summing the non-overlapping stage p50s gives agentic B1 2.9101 s against TTFT 2.6829 s (−227.2 ms residual); B4 6.2222 against 6.56195 (+339.75 ms); B8 10.0734 against 10.33665 (+263.25 ms). Cold 32k B8 also differs by 123.6 ms. These are marginal quantiles across different requests: quantiles do not add, and this is not a measurement of relay latency. Minimal fix: qualify the 0–40 ms statement as a per-request identity if demonstrated, explicitly say cell quantiles are non-additive, and make the same correction to the residual interpretation at line 308. If an additive waterfall is desired, use means or one identified request.
  • P2 — docs/PD-PATH-BREAKDOWN.md:244: the older adaptive-path measurements have no reviewable committed record. The row asserts 16 tt-direct requests at TTFT 1.12 s / TG 43 (min 35), and six tt-resubmit requests at 3.10 s / TG 47, from 04:45–04:51Z. Its only source is a remote pd-router.jsonl; the committed router excerpt begins at 06:15Z, and there is no LEDGER ID or committed record path for these older numbers. Minimal fix: commit the small relevant excerpt/summary with exact config and cite it, or remove the quantitative row until it is available.

Evidence audit: reran the committed tools/analyze.py against client/phase1.jsonl, the decompressed committed router excerpt and RTX serve excerpt. Its entire regenerated JSON equals the committed scenario-waterfall.json, with no unmatched requests. The cold/agentic cell counts, TTFT/TG values and stage quantiles match those records; the statistical interpretation above is the defect. Real-traffic shares/counts and timings match router/real-traffic-summary.json and real-traffic-means.json (62 TT exports, 160 local deltas, 234 total; TTFT mean 5.36 s, TTLT 8.935 s). The cold fit uses fit_robust, correctly: 0.350858 s, 6616.957 tok/s, n=152; the unfiltered fit differs and is not what the prose quotes. Hit-extra fit 0.32428 s / 82264.84 tok/s, n=70, and size-bin medians match. Decode op/step values match prof/decode-step-table.json; the 294.66/271.53 ms S3 profile and class shares match prefill-s3-profile-table-20261020.jsonl. Estimates are generally marked, and the older/dva profile scope is disclosed. Raw CUPTI traces remain remote, so the op extraction cannot be independently rerun here.

Test merge: clean, tree 2427c2593596705f653775f4bf54774d96f4ca7d. python3 scripts/check-cited-records.py: PASS, 175 docs scanned.

**Independent review (R2): OpenAI Codex gpt-6.1-sol, run by the P/D consolidation lead (Claude Opus 5.5).** Reviewed head is in the header below. Read-only review; no hardware run. **Routing:** Fix round: codex/pd-docs-fix (base #383) merges this head and fixes the findings; that branch gets a re-review. --- ## #367 docs/pd-path-breakdown @e47f52500044d6db038652f8cd8a0b1f27705b42 VERDICT: FIX - **P2 — `docs/PD-PATH-BREAKDOWN.md:61`: the claimed additive waterfall accuracy is false for the published cell statistics.** The text says stages add to TTFT within 0–40 ms, with only relay/rounding left over. From the cited `bench/runs/pd-path-breakdown-20261108/client/scenario-waterfall.json`, summing the non-overlapping stage p50s gives agentic B1 **2.9101 s** against TTFT **2.6829 s** (−227.2 ms residual); B4 **6.2222** against **6.56195** (+339.75 ms); B8 **10.0734** against **10.33665** (+263.25 ms). Cold 32k B8 also differs by 123.6 ms. These are marginal quantiles across different requests: quantiles do not add, and this is not a measurement of relay latency. **Minimal fix:** qualify the 0–40 ms statement as a per-request identity if demonstrated, explicitly say cell quantiles are non-additive, and make the same correction to the residual interpretation at line 308. If an additive waterfall is desired, use means or one identified request. - **P2 — `docs/PD-PATH-BREAKDOWN.md:244`: the older adaptive-path measurements have no reviewable committed record.** The row asserts 16 tt-direct requests at TTFT 1.12 s / TG 43 (min 35), and six tt-resubmit requests at 3.10 s / TG 47, from 04:45–04:51Z. Its only source is a remote `pd-router.jsonl`; the committed router excerpt begins at 06:15Z, and there is no LEDGER ID or committed record path for these older numbers. **Minimal fix:** commit the small relevant excerpt/summary with exact config and cite it, or remove the quantitative row until it is available. Evidence audit: reran the committed `tools/analyze.py` against `client/phase1.jsonl`, the decompressed committed router excerpt and RTX serve excerpt. Its entire regenerated JSON equals the committed `scenario-waterfall.json`, with no unmatched requests. The cold/agentic cell counts, TTFT/TG values and stage quantiles match those records; the statistical interpretation above is the defect. Real-traffic shares/counts and timings match `router/real-traffic-summary.json` and `real-traffic-means.json` (62 TT exports, 160 local deltas, 234 total; TTFT mean 5.36 s, TTLT 8.935 s). The cold fit uses **`fit_robust`**, correctly: 0.350858 s, 6616.957 tok/s, n=152; the unfiltered `fit` differs and is not what the prose quotes. Hit-extra fit 0.32428 s / 82264.84 tok/s, n=70, and size-bin medians match. Decode op/step values match `prof/decode-step-table.json`; the 294.66/271.53 ms S3 profile and class shares match `prefill-s3-profile-table-20261020.jsonl`. Estimates are generally marked, and the older/dva profile scope is disclosed. Raw CUPTI traces remain remote, so the op extraction cannot be independently rerun here. Test merge: clean, tree `2427c2593596705f653775f4bf54774d96f4ca7d`. `python3 scripts/check-cited-records.py`: **PASS**, 175 docs scanned.
Author
Member

Closing the leftover: docs/PD-PATH-BREAKDOWN.md + its records are on master (e47f5250 + 5e515846 '#367 review fixes (R2)'); three-way diff vs master is empty — verified 2026-11-18.

Closing the leftover: docs/PD-PATH-BREAKDOWN.md + its records are on master (e47f5250 + 5e515846 '#367 review fixes (R2)'); three-way diff vs master is empty — verified 2026-11-18.
orchestra closed this pull request 2026-11-18 13:02:42 +01:00
Owner

agent-gateway closeout (closed): cleared agent:* labels.
Hermes kanban card (if any) is left for Hermes to archive/complete.

agent-gateway closeout (closed): cleared `agent:*` labels. Hermes kanban card (if any) is left for Hermes to archive/complete.
All checks were successful
cards-fresh cards: not needed (C1) fp=21d84ce9f0be79e6
tt-stack-ci / Report upstream drift (pull_request) Successful in 5m6s
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 14m31s
tt-stack-ci / Build simulators and check the host module (pull_request) Successful in 44m32s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitpartner/tt-stack!367
No description provided.