vllm - 💡(How to fix) Fix [Bug]: In DP mode, waiting request stack in a few DP ranks. [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#36748Fetched 2026-04-08 00:35:07
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
commented ×2subscribed ×2labeled ×1mentioned ×1

Code Example

Your output of `python collect_env.py` here

---

vllm serve --model qwen3-vl-8b-thinking --port 8000 --tensor-parallel-size 1 --data-parallel-size 8 --max-num-seqs 64

---

(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 000: Avg prompt throughput: 16.5 tokens/s, Avg generation throughput: 1157.2 tokens/s, Running: 51 reqs, Waiting: 117 reqs, GPU KV cache usage: 100.0%, Prefix cache hit rate: 70.0%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 001: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 809.3 tokens/s, Running: 31 reqs, Waiting: 108 reqs, GPU KV cache usage: 98.6%, Prefix cache hit rate: 66.0%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 002: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 820.9 tokens/s, Running: 36 reqs, Waiting: 43 reqs, GPU KV cache usage: 99.1%, Prefix cache hit rate: 69.5%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 003: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 861.4 tokens/s, Running: 36 reqs, Waiting: 1 reqs, GPU KV cache usage: 100.0%, Prefix cache hit rate: 72.9%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 004: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 799.9 tokens/s, Running: 32 reqs, Waiting: 0 reqs, GPU KV cache usage: 96.7%, Prefix cache hit rate: 67.8%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 005: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 659.9 tokens/s, Running: 24 reqs, Waiting: 0 reqs, GPU KV cache usage: 84.6%, Prefix cache hit rate: 62.0%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 006: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 656.4 tokens/s, Running: 20 reqs, Waiting: 0 reqs, GPU KV cache usage: 74.1%, Prefix cache hit rate: 56.6%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 007: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 574.5 tokens/s, Running: 13 reqs, Waiting: 0 reqs, GPU KV cache usage: 57.4%, Prefix cache hit rate: 65.2%, MM cache hit rate: 0.0%
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Your output of `python collect_env.py` here
</details>

🐛 Describe the bug

I am using vLLM 0.14.0 with data parallelism on 8×B200 GPUs and started the server with:

vllm serve --model qwen3-vl-8b-thinking --port 8000 --tensor-parallel-size 1 --data-parallel-size 8 --max-num-seqs 64

On the client side, I use a thread pool of size 512 to send requests concurrently. During serving, I noticed that a large number of waiting requests are concentrated on only a few DP ranks, rather than being evenly distributed across all ranks. For example:

(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 000: Avg prompt throughput: 16.5 tokens/s, Avg generation throughput: 1157.2 tokens/s, Running: 51 reqs, Waiting: 117 reqs, GPU KV cache usage: 100.0%, Prefix cache hit rate: 70.0%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 001: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 809.3 tokens/s, Running: 31 reqs, Waiting: 108 reqs, GPU KV cache usage: 98.6%, Prefix cache hit rate: 66.0%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 002: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 820.9 tokens/s, Running: 36 reqs, Waiting: 43 reqs, GPU KV cache usage: 99.1%, Prefix cache hit rate: 69.5%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 003: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 861.4 tokens/s, Running: 36 reqs, Waiting: 1 reqs, GPU KV cache usage: 100.0%, Prefix cache hit rate: 72.9%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 004: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 799.9 tokens/s, Running: 32 reqs, Waiting: 0 reqs, GPU KV cache usage: 96.7%, Prefix cache hit rate: 67.8%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 005: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 659.9 tokens/s, Running: 24 reqs, Waiting: 0 reqs, GPU KV cache usage: 84.6%, Prefix cache hit rate: 62.0%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 006: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 656.4 tokens/s, Running: 20 reqs, Waiting: 0 reqs, GPU KV cache usage: 74.1%, Prefix cache hit rate: 56.6%, MM cache hit rate: 0.0%
(APIServer pid=387731) INFO 03-11 06:16:52 [loggers.py:257] Engine 007: Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 574.5 tokens/s, Running: 13 reqs, Waiting: 0 reqs, GPU KV cache usage: 57.4%, Prefix cache hit rate: 65.2%, MM cache hit rate: 0.0%

I wonder why this happens and how to fix.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

Fix Plan

The fix involves modifying the client-side request distribution to ensure even load balancing across all data parallel ranks.

  • Step 1: Modify Client-Side Request Distribution
    • Implement a round-robin scheduling algorithm to distribute incoming requests across all available DP ranks.
    • Example code snippet in Python:

import threading from itertools import cycle

class RequestDistributor: def init(self, dp_ranks): self.dp_ranks = dp_ranks self.rank_cycle = cycle(dp_ranks)

def get_next_rank(self):
    return next(self.rank_cycle)

Initialize the request distributor with DP ranks

dp_ranks = [f"Engine {i:03d}" for i in range(8)] distributor = RequestDistributor(dp_ranks)

Example usage in a thread pool

def send_request(request): next_rank = distributor.get_next_rank() # Send the request to the selected DP rank print(f"Sending request to {next_rank}")

Create a thread pool with 512 worker threads

with threading.ThreadPoolExecutor(max_workers=512) as executor: # Submit requests to the thread pool for _ in range(1000): executor.submit(send_request, "example_request")


*   **Step 2: Monitor and Adjust**
    *   Continuously monitor the request distribution and throughput of each DP rank.
    *   Adjust the request distribution strategy as needed to maintain optimal load balancing.

### Verification
To verify that the fix worked, monitor the request distribution and throughput of each DP rank. The `Waiting` requests should be evenly distributed across all ranks, and the `Avg prompt throughput` and `Avg generation throughput` should be similar for each rank.

### Extra Tips
*   Ensure that the client-side request distribution is properly synchronized to avoid overloading any single DP rank.
*   Consider implementing a feedback mechanism to adjust the request distribution based on real-time throughput and latency metrics.
*   Refer to the [vLLM documentation](https://docs.vllm.ai/en/latest/) for additional guidance on optimizing data parallelism and load balancing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING