Skip to content

[Bugfix] Account for local DP workers in startup thread allocation - #52385

Merged
njhill merged 4 commits into
vllm-project:mainfrom
cr-zhao:fix-dp-startup-omp-threads
Aug 17, 2026
Merged

njhill merged 4 commits into
vllm-project:mainfrom
cr-zhao:fix-dp-startup-omp-threads

Conversation

@cr-zhao

@cr-zhao cr-zhao commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Purpose

Fixes #52330.

MultiprocExecutor sized each worker's startup thread pool using only the
workers within one engine. With multiple local data-parallel engines, every
engine therefore claimed the node's full CPU budget, oversubscribing CPU
threads and severely slowing weight loading.

This change:

  • includes data_parallel_size_local when counting workers that share the
    node's startup CPU budget;
  • preserves the existing behavior for tensor-parallel-only deployments and
    headless configurations where the local DP size is zero;
  • adds a regression test covering local DP, TP-only, and zero-local-DP cases.

This is not a duplicate of an existing PR. Before submitting, I checked open
PRs referencing #52330 and searched open PRs for the affected data-parallel
startup/OMP thread-management area; no matching implementation was open.

Test Plan

  • Run the targeted executor regression test on Linux CI.
  • Validate startup with multiple colocated DP engines, ideally using the
    issue's DP=4 block-quantized checkpoint reproduction on B200 hardware.
  • Run Python lint, formatting, syntax, and diff whitespace checks locally.

Test Result

  • Ruff check on both changed files: passed.
  • Ruff format check on both changed files: passed.
  • .venv/bin/python -m compileall -q vllm/v1/executor/multiproc_executor.py tests/distributed/test_multiproc_executor.py: passed.
  • git diff --check: passed.
  • Targeted pytest was not run locally because the available host is macOS
    arm64 and its existing .venv does not contain PyTorch or pytest. The test
    avoids creating GPU workers, but importing the vLLM executor still requires
    PyTorch. Linux CI and hardware validation are required.

AI assistance was used to investigate the issue, implement the change, and
draft the regression test and PR description. The human submitter reviewed the
changes and is responsible for the contribution.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Co-authored-by: OpenAI Codex <codex@openai.com>

Signed-off-by: real-cpu <zhaochenrui757@gmail.com>
@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment /ci run whenever CI signals are needed.

Once the PR is approved or has the ready label, the PR author can also use /ci run, /ci retry, or /ci cancel. New commits do not start CI automatically.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

@mergify mergify Bot added the bug Something isn't working label Aug 14, 2026
@cr-zhao
cr-zhao marked this pull request as ready for review August 14, 2026 19:32
@cr-zhao
cr-zhao requested a review from njhill as a code owner August 14, 2026 19:32

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@njhill njhill left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @cr-zhao

@njhill njhill added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 15, 2026
@njhill

njhill commented Aug 15, 2026

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

@cr-zhao, CI is now available for this PR.

  • /ci run starts a CI build.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /ci cancel cancels scheduled or running CI builds for this PR branch.

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83996 for commit d79b910f0722.

@cr-zhao

cr-zhao commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 1 failed job(s) for retry in Buildkite CI #83996.

@cr-zhao

cr-zhao commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 1 failed job(s) for retry in Buildkite CI #83996.

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84104 for commit 8ef6e3e21b78, running 1 failed step(s) from Buildkite CI #83996.

@cr-zhao

cr-zhao commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84105 for commit 8ef6e3e21b78.

@cr-zhao

cr-zhao commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84109 for commit 7948476cb3c2.

@cr-zhao

cr-zhao commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 1 failed job(s) for retry in Buildkite CI #84109.

@cr-zhao

cr-zhao commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @njhill, thanks for the review! All ci checks have passed, and the PR is now ready to merge.

@njhill
njhill merged commit 3fc2893 into vllm-project:main Aug 17, 2026
86 checks passed
zufangzhu pushed a commit to zufangzhu/vllm that referenced this pull request Aug 24, 2026
…llm-project#52385)

Signed-off-by: real-cpu <zhaochenrui757@gmail.com>
Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

2 participants