Repository navigation
Expose accumulated batched PD producer timings - #250
Closed
gspark-etri wants to merge 1 commit into
Closed
gspark-etri wants to merge 1 commit into
gspark-etri wants to merge 1 commit into
Conversation
This was referenced Oct 23, 2026
gspark-etri
added a commit
that referenced
this pull request
Oct 30, 2026
…#246, #249) (#282) From feat/249-pd-stage-metrics (#239, #247, #250): SubprocessPrefillWorker failure settling, producer readiness gating /ready and admission, producer stage-duration metrics; only the /ready hunk of llmd.py. Fixes on top: - SubprocessPrefillWorker.close() closes stdin and waits for a clean exit before SIGTERM, then SIGKILL (prefill_server exits on stdin EOF; SIGTERM first skipped SDK cleanup that releases the device). - ProcessPrefillWorker.ready: a dead child now fails readiness and admission is rejected with 503 instead of quarantining the batcher. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Landed on optimus-rm via #282. Closing; the branch is archived locally (experiment records and evidence included). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Batched PD performs real KV handoffs but the single-stage transfer histogram remains unobserved. Existing producer duration totals were internal, preventing stage attribution in #248.
Changes
Export
airm_pd_producer_seconds_total{stage="prefill"|"transfer"}from existing accumulated batcher stats. Missing keys are omitted; repeated scrapes do not add observations. No scheduler or transfer change.Verification
A real tiny Torch producer/batcher regression fails before the fix at the absent metric. Controlled worker-reported durations verify totals0.5/0.25seconds after two handoffs, stable repeated scrapes and missing-key compatibility. Focused suite34passed, one existing flex-attention warning. Full CPU suite:467passed,17skipped,135subtests,1existing warning in145.94seconds; CUDA hidden. Ruff and diff check clean.
Compatibility and limits
Additive metrics. Totals cover admitted handoffs, excluding failed/cancelled work never admitted. Timing meanings depend on the worker: Torch prefill includes KV gathering and transfer excludes decoder KV installation. Default-zero reports from uninstrumented workers do not prove free physical transfers. Totals are not request latency, histograms or evidence of overlap.
Related Issue
Closes #249. Supports #248 and #47. Stacked on #247; maintainer review/merge required.