Repository navigation
[core] Warn about worker gRPC threads on high-CPU nodes - #65637
Merged
Conversation
Signed-off-by: OneSizeFitsQuorum <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a warning mechanism when Ray is run on high-CPU nodes (with more than 32 CPUs) without configuring the RAY_worker_num_grpc_internal_threads environment variable. It includes the implementation of GetWorkerGrpcThreadsWarning in the worker pool, integration into the Raylet main entry point, corresponding unit tests, and comprehensive documentation explaining how to configure and troubleshoot worker gRPC threads. There are no review comments, and I have no feedback to provide.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 952504a. Configure here.
Signed-off-by: OneSizeFitsQuorum <[email protected]>
MortalHappiness
requested changes
Aug 21, 2026
Signed-off-by: OneSizeFitsQuorum <[email protected]>
MortalHappiness
approved these changes
Aug 24, 2026
…cussion-remaining-grpc-t
richardliaw
approved these changes
Aug 31, 2026
richardliaw
enabled auto-merge (squash)
August 31, 2026 17:06
OneSizeFitsQuorum
deleted the
OneSizeFitsQuorum/core-data-coreworker-discussion-remaining-grpc-t
branch
September 1, 2026 01:52
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…65637) ## Description Each Ray worker process has its own gRPC runtime, so high-worker-density nodes can accumulate a large number of gRPC threads. Maintainers decided not to change the default `worker_num_grpc_internal_threads` value because that could be breaking. This PR implements the non-breaking follow-up requested in ray-project#64834: - Log a raylet warning when the node has more than 16 detected CPUs and `RAY_worker_num_grpc_internal_threads` is not set to a positive value. - Document how to configure the worker gRPC thread setting on Ray nodes. - Add a dedicated troubleshooting guide for inspecting worker threads, distinguishing a separately loaded Python `grpcio` runtime, and checking process and thread limits. - Add unit coverage for the threshold boundary, warning text, and explicit-configuration behavior. The worker gRPC thread default and runtime sizing behavior are unchanged. ## Related issues Related to ray-project#64834. ## Additional information ### Duplicate-work check I reviewed the issue discussion and searched open PRs by issue number and worker gRPC warning/documentation keywords before opening this PR. The only related open PR is ray-project#64898, which covers CPU-limit-based default selection and its tests. It does not implement the maintainer-requested warning or documentation, and this PR deliberately leaves the default unchanged. ### Testing - `bazel build //src/ray/raylet:raylet` — passed. - `bazel test //src/ray/raylet/tests:worker_pool_test --test_output=errors` — passed (1/1 test target). - `pre-commit run` with pre-commit 3.5.0 — passed, including cpplint, clang-format, semgrep, and core C++ inclusion checks. - `python doc/test_no_new_rst.py --base master --remote origin --commit HEAD` — passed. - MyST front matter, code fences, toctree entry, and cross-reference consistency check — passed. - `git diff --check` — passed. ### AI assistance AI assistance was used to trace the relevant code path, draft the implementation, tests, and documentation, and run validation. The human submitter reviewed every changed line and understands and can defend the change end-to-end. --------- Signed-off-by: OneSizeFitsQuorum <[email protected]> Co-authored-by: Douglas Strodtman <[email protected]>
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.

Description
Each Ray worker process has its own gRPC runtime, so high-worker-density nodes can accumulate a large number of gRPC threads. Maintainers decided not to change the default
worker_num_grpc_internal_threadsvalue because that could be breaking.This PR implements the non-breaking follow-up requested in #64834:
RAY_worker_num_grpc_internal_threadsis not set to a positive value.grpcioruntime, and checking process and thread limits.The worker gRPC thread default and runtime sizing behavior are unchanged.
Related issues
Related to #64834.
Additional information
Duplicate-work check
I reviewed the issue discussion and searched open PRs by issue number and worker gRPC warning/documentation keywords before opening this PR. The only related open PR is #64898, which covers CPU-limit-based default selection and its tests. It does not implement the maintainer-requested warning or documentation, and this PR deliberately leaves the default unchanged.
Testing
bazel build //src/ray/raylet:raylet— passed.bazel test //src/ray/raylet/tests:worker_pool_test --test_output=errors— passed (1/1 test target).pre-commit runwith pre-commit 3.5.0 — passed, including cpplint, clang-format, semgrep, and core C++ inclusion checks.python doc/test_no_new_rst.py --base master --remote origin --commit HEAD— passed.git diff --check— passed.AI assistance
AI assistance was used to trace the relevant code path, draft the implementation, tests, and documentation, and run validation. The human submitter reviewed every changed line and understands and can defend the change end-to-end.