Skip to content

[Perf] Improve disaggregated prefill router performance#440

Merged
YuhanLiu11 merged 10 commits into
vllm-project:mainfrom
YuhanLiu11:localdev/fix_PD
Jun 2, 2025
Merged

[Perf] Improve disaggregated prefill router performance#440
YuhanLiu11 merged 10 commits into
vllm-project:mainfrom
YuhanLiu11:localdev/fix_PD

Conversation

@YuhanLiu11

@YuhanLiu11 YuhanLiu11 commented May 20, 2025

Copy link
Copy Markdown
Collaborator

This PR improves the router performance of disaggregated prefill. This PR creates the prefill_client and decode_client and sends the request accordingly to these clients.
This PR also makes the P and D instances able to use NVLink across GPUs.

BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE


  • Make sure the code changes pass the pre-commit checks.
  • Sign-off your commit by using -s when doing git commit
  • Try to classify PRs for easy understanding of the type of changes, such as [Bugfix], [Feat], and [CI].
Detailed Checklist (Click to Expand)

Thank you for your contribution to production-stack! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.

PR Title and Classification

Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

  • [Bugfix] for bug fixes.
  • [CI/Build] for build or continuous integration improvements.
  • [Doc] for documentation fixes and improvements.
  • [Feat] for new features in the cluster (e.g., autoscaling, disaggregated prefill, etc.).
  • [Router] for changes to the vllm_router (e.g., routing algorithm, router observability, etc.).
  • [Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.

Code Quality

The PR need to meet the following code quality standards:

  • Pass all linter checks. Please use pre-commit to format your code. See README.md for installation.
  • The code need to be well-documented to ensure future contributors can easily understand the code.
  • Please include sufficient tests to ensure the change is stay correct and robust. This includes both unit tests and integration tests.

DCO and Signed-off-by

When contributing changes to this project, you must agree to the DCO. Commits must include a Signed-off-by: header which certifies agreement with the terms of the DCO.

Using -s with git commit will automatically add this header.

What to Expect for the Reviews

We aim to address all PRs in a timely manner. If no one reviews your PR within 5 days, please @-mention one of YuhanLiu11
, Shaoting-Feng or ApostaC.


async def route_disaggregated_prefill_request(
request: Request,
endpoint: str,

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.

It seems like endpoint argument is not used at the moment (so I think it can be removed safely).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed this! (endpoint is actually needed)

@YuhanLiu11 YuhanLiu11 force-pushed the localdev/fix_PD branch 2 times, most recently from 5b7ee09 to 7bd7b45 Compare May 31, 2025 04:24
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
@YuhanLiu11 YuhanLiu11 merged commit 2f91528 into vllm-project:main Jun 2, 2025
11 checks passed
JustinDuy pushed a commit to JustinDuy/production-stack-1 that referenced this pull request Jun 13, 2025
…#440)

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fixing app.py missing arg

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Update helm chart template

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Remove doc for now

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

---------

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Comment on lines +71 to +74
securityContext:
capabilities:
add:
- SYS_PTRACE

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey @YuhanLiu11 - the vllm deployment already has a securityContext defined on lines 163-166 of this file. I'm seeing errors with this chart in my deployment now because of mapping key "securityContext" already defined

davidgao7 pushed a commit to davidgao7/production-stack that referenced this pull request Jun 26, 2025
…#440)

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fixing app.py missing arg

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Update helm chart template

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Remove doc for now

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

---------

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: David Gao <davidgao313@outlook.com>
Senne-Mennes pushed a commit to Senne-Mennes/production-stack that referenced this pull request Oct 22, 2025
…#440)

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fixing app.py missing arg

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Update helm chart template

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Remove doc for now

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

---------

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
Signed-off-by: senne.mennes@capgemini.com <senne.mennes@capgemini.com>
emanuelecassese pushed a commit to emanuelecassese/production-stack that referenced this pull request Jan 30, 2026
…#440)

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fixing app.py missing arg

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Update helm chart template

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Remove doc for now

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

---------

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
BadLord1st pushed a commit to BadLord1st/vllm-production-stack that referenced this pull request Feb 1, 2026
…#440)

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Improving router perf

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fix tests

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* fixing app.py missing arg

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* check existence of prefill/decode model labels

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Update helm chart template

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

* Remove doc for now

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>

---------

Signed-off-by: YuhanLiu11 <yliu738@wisc.edu>
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.

4 participants