Skip to content

[Bugfix][Rollout] Preserve per-request transfer metrics through MultiConnector - #439

Closed
0z5a wants to merge 1 commit into
vllm-project:0z5a-branchfrom
0z5a:fix/multiconnector-request-metrics
Closed

0z5a wants to merge 1 commit into
vllm-project:0z5a-branchfrom
0z5a:fix/multiconnector-request-metrics

Conversation

@0z5a

@0z5a 0z5a commented Sep 18, 2026 •

Copy link
Copy Markdown

Incremental review: Files changed.

Base: 0z5a-branch at 791f101e20db377b28e15f12a00863baaea2605f.

Preserve per-request transfer metrics when MultiConnector wraps NixlConnector. Its worker metadata previously dropped the child's request statistics before scheduler aggregation.

Add the merge to the existing Docker vLLM patch: combine distinct requests and fields, sum matching counters, skip absent child metrics and rebuild each read without mutating child metadata. No new test files are submitted.

Real-class validation in built vllm/vime:latest Result
Before the added patch hunk 8 failed, 2 passed
Patch application Passed
After the hunk 10 passed

Single-L20 prefill/decode experiment:

Connector Remote KV wait (ms) Transfer bytes Worker transfer (ms)
Direct Nixl 63.85 1,835,008 24.34
Wrapped Nixl, unpatched 433.52 Missing Missing
Wrapped Nixl, patched 630.23 1,835,008 581.81

The recovered byte count establishes propagation. These single runs do not establish latency improvement. CI uses a prebuilt image and does not rebuild this Docker patch; the patched-runtime checks above were run separately.

@read-the-docs-community

read-the-docs-community Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements the get_request_metrics method in MultiKVConnectorWorkerMetadata within the vllm-pd-request-metrics.patch file, allowing per-request transfer metrics from child connectors to be merged and forwarded to the scheduler. It also adds a comprehensive set of regression tests in tests/test_multiconnector_request_metrics.py to validate this behavior and registers the new test suite in the Buildkite pipeline. There are no review comments, so I have no feedback to provide.

@0z5a
0z5a force-pushed the fix/multiconnector-request-metrics branch from d635de8 to 5ac0a84 Compare September 18, 2026 20:58
@0z5a
0z5a changed the base branch from 0z5a-branch to main September 19, 2026 01:25
@0z5a
0z5a changed the base branch from main to 0z5a-branch September 19, 2026 06:03
@0z5a
0z5a force-pushed the fix/multiconnector-request-metrics branch from 5ac0a84 to e1638f4 Compare September 24, 2026 05:53
…Connector

The pd-request-metrics patch adds KVConnectorWorkerMetadata.get_request_metrics()
and makes the scheduler accumulate request.kv_transfer_metrics from it. It
implements that method on NixlRequestMetrics and consumes it in
vllm/v1/core/sched/scheduler.py, but not on MultiKVConnectorWorkerMetadata:
the wrapper only overrides aggregate(), so it inherited the no-op default from
KVConnectorWorkerMetadata and returned {} for every request.

With a MultiConnector configured the worker metadata that reaches the scheduler
is always a MultiKVConnectorWorkerMetadata, so every per-request transfer metric
a child connector reported was silently dropped. Verified on the real classes:
before the fix a child reporting kv_transfer_bytes for req-a yielded {} from the
wrapper.

Add get_request_metrics() to the wrapper. It forwards each child's metrics;
None children are skipped, request ids and field names are unioned, and a metric
name claimed by more than one child is not summed: the children are distinct
connector types whose transfers are not known to be disjoint, so the first owner
is kept and the collision is logged rather than silently double counted.

tests/test_multiconnector_request_metrics.py drives the real production classes
(NixlRequestMetrics as the child, MultiKVConnectorWorkerMetadata as the wrapper);
it goes from 8 failed/2 passed to 10 passed. The patch is validated by reverse
applying the previous revision and re-applying this one over the built vLLM tree.

Signed-off-by: 0z5a <0z5a@users.noreply.github.com>
Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
@0z5a
0z5a force-pushed the fix/multiconnector-request-metrics branch from e1638f4 to b03e42b Compare September 24, 2026 07:07
@0z5a
0z5a marked this pull request as draft October 1, 2026 14:31
@0z5a

0z5a commented Oct 6, 2026

Copy link
Copy Markdown
Author

Superseded by #460, now merged into 0z5a-branch. The consolidated implementation and validation are retained there; closing this duplicate PR.

@0z5a 0z5a closed this Oct 6, 2026
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