feat(bench): add --dp-rank-roundrobin for explicit DP-rank routing - #2696
Closed
rebel-joonhyunglee wants to merge 1 commit into
Closed
feat(bench): add --dp-rank-roundrobin for explicit DP-rank routing#2696rebel-joonhyunglee wants to merge 1 commit into
rebel-joonhyunglee wants to merge 1 commit into
Conversation
Add an opt-in `--dp-rank-roundrobin N` flag to benchmark_serving.py that pins request i to data-parallel rank i % N via the `X-data-parallel-rank` HTTP header, bypassing the server-side DP balancer. Under injection=inf, vLLM's internal balancer can dispatch requests unevenly across DP ranks, leaving some engines idle while others queue, which depresses output TPS on high-DP configs. This flag lets a benchmark measure the ideal round-robin routing baseline as an A/B against the default balancer, with no server/SDK change. - RequestFuncInput gains an `extra_headers` field, merged into the request headers by the OpenAI completions and chat-completions request funcs. - benchmark() assigns the header per request when the flag is set.
Collaborator
|
We are phasing out single turn in favor of agentic bench so probably won't accept this contribution |
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
Adds an opt-in
--dp-rank-roundrobin Nflag tobenchmark_serving.py. When set, requestiis pinned to data-parallel ranki % Nvia theX-data-parallel-rankHTTP header, bypassing vLLM's server-side DP load balancer.Why
Under
injection=inf(request-rate unbounded), vLLM's internal DP balancer can dispatch requests unevenly across ranks — some engines sit idle while others queue — which depresses output TPS on high-DP configs (observed on DP8). This flag measures the ideal round-robin routing baseline as a clean A/B against the default balancer, with no server or SDK change (theX-data-parallel-rankheader is already honored by vLLM v0.18+).Judging signal for the A/B: with the flag on,
mean_ttft / median(p50) ttftcollapses toward ~1 and output TPS rises, indicating the default-balancer TPS gap was a routing artifact rather than a hardware limit.Changes
backend_request_func.py:RequestFuncInputgains anextra_headersfield; the OpenAI completions and chat-completions request funcs merge it into request headers.benchmark_serving.py:--dp-rank-roundrobinarg;benchmark()assigns the header per request when set. DefaultNone→ no behavior change.Compatibility
Off by default; no change to existing runs. Header is a no-op on servers that don't read it.