Support for NIXL push mode#187
Open
iyastreb wants to merge 3 commits into
Open
Conversation
Signed-off-by: Ilia Yastrebov <iyastrebov@nvidia.com>
bfe7f2f to
c2352c9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2352c9fca
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
7712df5 to
0d96c0d
Compare
Signed-off-by: Ilia Yastrebov <iyastrebov@nvidia.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.
Purpose
Recently NIXL push mode was added to vLLM, before that only NIXL pull existed (RDMA READ).
vllm-project/vllm#35264
vllm-project/vllm#36923
vllm-router used to work with NIXL pull mode (sequential), and in this mode new PUSH mode is slower than PULL mode, which is unexpected. It happens because of the extra message (see RFC)
Scenario 1: D registers before P finishes (overlap)
D sends REGISTER_BLOCKS_MSG to P's scheduler via ZMQ side channel
P stores the registration data
When P finishes the request (request_finished), it finds the stored registration
P enqueues to the push dispatcher thread, which sends a PUSH_TRIGGER_MSG via ZMQ TCP to all TP workers
Scenario 2: P finishes before D registers (push message D->P)
P finishes the request and stores block IDs in _finished_request_blocks
When D's REGISTER_BLOCKS_MSG arrives at P's listener thread, it enqueues to the push dispatcher
The dispatcher fuzzy-matches the registration to the finished request and sends the push trigger
The key insight is that vllm-router (sequential) always goes with scenario 2 for push mode, meaning extra message from D to P, which is why PUSH performance drops compared to PULL.
The fix is to make router parallel for push mode:
process_concurrent_two_stagefires prefill and decode with a single call — both HTTP requests leave the router at the same time, and neither waits for the other.Impl details:
--kv-connector nixltransfer_mode:push:I think we can commit tiny PR to vLLM to automatically add this option for Push connector
Test Plan
Tested with benchmark
Test Result
Essential Elements of an Effective PR Description Checklist