feat(metrics): add dispatch budget and pool worker-limit gauges (#217) - #290
Merged
Merged
Conversation
shimib
requested review from
RishabhSaini,
ahg-g,
evacchi and
jtechapps
as code owners
June 26, 2026 15:55
This was referenced Jun 26, 2026
Closed
Two new gauges from the metrics tracking issue (llm-d#217): - async_dispatch_budget{queue_id,queue_name,pool_name}: the [0.0-1.0] value returned by each queue's gate, emitted where the flows already compute gate.Budget() to size batches (redis sorted-set processMessages and gcp-pubsub requestWorker). Surfaces why throughput is throttled. - async_pool_worker_limit{pool_name}: the configured worker concurrency limit per pool, set once from the pool config in the runner. Compared against async_inflight_requests it yields worker utilization. Wires both into GetAsyncProcessorCollectors, documents them in the README metrics table, and adds unit tests. Related: llm-d#217 Signed-off-by: Shimi Bandiel <shimib@google.com>
shimib
force-pushed
the
fix/metrics-budget-utilization
branch
from
June 26, 2026 16:25
18f6742 to
318f599
Compare
jtechapps
approved these changes
Jun 26, 2026
shimib
added a commit
to shimib/llm-d-async
that referenced
this pull request
Jun 26, 2026
Cloud Monitoring dashboard gains panels for async_dispatch_budget (gate openness per team), async_gate_decisions_total (by reason / team+reason), and worker utilization (inflight / pool_worker_limit). README notes they require an image newer than v0.7.2. Signed-off-by: Shimi Bandiel <shimib@google.com>
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.
What does this PR do?
Adds two of the unimplemented metrics from #217 — the two whose data is already available at existing hook points:
llm_d_async_async_dispatch_budgetqueue_id,queue_name,pool_name[0.0–1.0]value from each queue's gatellm_d_async_async_pool_worker_limitpool_namegate.Budget()to size batches — redis sorted-setprocessMessagesand gcp-pubsubrequestWorker— so it's pure wiring, no new gate calls. Surfaces why throughput is throttled (gate closed → budget near 0).runner.go; combined with the existingasync_inflight_requestsgauge it gives worker-concurrency utilization (the gap called out in [Feature]: Metrics #217's Execution Layer).Pub/Sub budget labels mirror the existing
QueueBacklogconvention for that backend (queue_name=subscriberID,pool_name=poolID).How was this tested?
go build ./...,make lint→ 0 issuesgo test ./pkg/metrics/... ./pkg/redis/... ./pkg/pubsub/... ./pkg/server/...→ passtestutil.ToFloat64)Notes
async_queue_residence_time_millis(listed ⬜ in the issue) is already implemented (feat: add queue residence time metric #254) — the issue legend is stale.Related Issues
Related: #217