Skip to content

metrics: an opt-in histogram of how long a request queued - #2158

Merged
ashhart merged 2 commits into
mainfrom
lead/phase-metrics
Nov 6, 2026
Merged

ashhart merged 2 commits into
mainfrom
lead/phase-metrics

Conversation

@ashhart

@ashhart ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Part of #2139.

The lane host already measures each request's queue wait and prints it per request, but never exported it. With TENSORFOLD_PHASE_METRICS=1, /metrics adds one histogram with no labels (13 buckets), so the series count is fixed.

Unset, nothing is observed and /metrics is byte for byte main's, which a host test checks. Replies don't change either way. It's still a draft until an on/off overhead run shows no slowdown.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

The overhead run is clean. On an M5 Ultra, on the 27B, with TENSORFOLD_PHASE_METRICS=1 against the base, alternating builds at 1 and 4 streams on chat and code, greedy and sampled: every cell is within -0.2% to +0.8%, for example 182.9 -> 183.1 and 179.1 -> 180.2 tok/s at 4 streams. Off stays byte-identical by its host test.

@ashhart
ashhart marked this pull request as ready for review November 4, 2026 20:57
@ashhart
ashhart force-pushed the lead/phase-metrics branch 2 times, most recently from 3e8a507 to 6c6a21a Compare November 6, 2026 08:36
@ashhart

ashhart commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

/atc exchange 34357c94605343665dafc68767a08e1bdb2a27f6f2c9631b8cd57306cf18a98a

…TRICS=1)

Each finished request's wait from submission to admission, which the lane
host already measures (Stats.queued_seconds), is observed into one more
histogram, rendered as tensorfold:request_queue_seconds and under vLLM's
name request_queue_time_seconds. No label is added: the families are as
bounded as the existing request histograms.

Unset, nothing is observed and /metrics is byte for byte as before; replies
never change either way. A host test checks both: the on body, less its two
queue families, equals the off body.

Refs #2139.
@ashhart
ashhart force-pushed the lead/phase-metrics branch from d592dfd to beef497 Compare November 6, 2026 21:17
@ashhart
ashhart merged commit c70d67b into main Nov 6, 2026
0 of 7 checks passed
@ashhart
ashhart deleted the lead/phase-metrics branch November 10, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant