-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
[Docs] Factor out troubleshooting to its own guide; add section for Ray Observability #21578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9bba814
[Docs] Factor out troubleshooting to its own guide; add section for R…
crypdick 8e168d7
cleaned up kubernetes section
crypdick 1b93f64
cells. interlinked.
crypdick b62396a
rm duplicated section
crypdick bad3249
combined redundant information about enabling gpudirect rdma. added e…
crypdick 391a8ec
lint
crypdick bddc395
drop ray obs detail. how to use the toolkit in real scenarios for fut…
crypdick 5aff50b
add header before link to distributed troubleshooting guide
crypdick f243c6d
Move the network comms guide back to the distributed serving guide
crypdick e7404c8
Move ray observability section to bottom
crypdick 17c5112
Promote admonitions into sections, and create link to run_cluster.sh
crypdick 0682416
markdownlint
crypdick 4a3f696
Merge branch 'main' into docs/refactor
crypdick 22a9222
unindent paragraph, and link to general troubleshooting guide
crypdick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # Troubleshooting distributed deployments | ||
|
|
||
| ## Ray observability | ||
|
|
||
| Debugging a distributed system can be challenging due to the large scale and complexity. Ray provides a suite of tools to help monitor, debug, and optimize Ray applications and clusters. For more information about Ray observability, visit the [official Ray observability docs](https://docs.ray.io/en/latest/ray-observability/index.html). For more information about debugging Ray applications, visit the [Ray Debugging Guide](https://docs.ray.io/en/latest/ray-observability/user-guides/debug-apps/index.html). For information about troubleshooting Kubernetes clusters, see the | ||
| [official KubeRay troubleshooting guide](https://docs.ray.io/en/latest/serve/advanced-guides/multi-node-gpu-troubleshooting.html). | ||
crypdick marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Optimizing network communication for tensor parallelism | ||
|
|
||
| Efficient tensor parallelism requires fast inter-node communication, preferably through high-speed network adapters such as InfiniBand. | ||
| To set up the cluster to use InfiniBand, append additional arguments like `--privileged -e NCCL_IB_HCA=mlx5` to the | ||
| <gh-file:examples/online_serving/run_cluster.sh> helper script. | ||
| Contact your system administrator for more information about the required flags. | ||
|
|
||
| ## Enabling GPUDirect RDMA | ||
|
|
||
| GPUDirect RDMA (Remote Direct Memory Access) is an NVIDIA technology that allows network adapters to directly access GPU memory, bypassing the CPU and system memory. This direct access reduces latency and CPU overhead, which is beneficial for large data transfers between GPUs across nodes. | ||
|
|
||
| To enable GPUDirect RDMA with vLLM, configure the following settings: | ||
|
|
||
| - `IPC_LOCK` security context: add the `IPC_LOCK` capability to the container's security context to lock memory pages and prevent swapping to disk. | ||
| - Shared memory with `/dev/shm`: mount `/dev/shm` in the pod spec to provide shared memory for interprocess communication (IPC). | ||
|
|
||
| If you use Docker, set up the container as follows: | ||
|
|
||
| ```bash | ||
| docker run --gpus all \ | ||
| --ipc=host \ | ||
| --shm-size=16G \ | ||
| -v /dev/shm:/dev/shm \ | ||
| vllm/vllm-openai | ||
| ``` | ||
|
|
||
| If you use Kubernetes, set up the pod spec as follows: | ||
|
|
||
| ```yaml | ||
| ... | ||
| spec: | ||
| containers: | ||
| - name: vllm | ||
| image: vllm/vllm-openai | ||
| securityContext: | ||
| capabilities: | ||
| add: ["IPC_LOCK"] | ||
| volumeMounts: | ||
| - mountPath: /dev/shm | ||
| name: dshm | ||
| resources: | ||
| limits: | ||
| nvidia.com/gpu: 8 | ||
| requests: | ||
| nvidia.com/gpu: 8 | ||
| volumes: | ||
| - name: dshm | ||
| emptyDir: | ||
| medium: Memory | ||
| ... | ||
| ``` | ||
crypdick marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| !!! tip "Confirm GPUDirect RDMA operation" | ||
| To confirm your InfiniBand card is using GPUDirect RDMA, run vLLM with detailed NCCL logs: `NCCL_DEBUG=TRACE vllm serve ...`. | ||
|
|
||
| Then look for the NCCL version and the network used. | ||
|
|
||
| - If you find `[send] via NET/IB/GDRDMA` in the logs, then NCCL is using InfiniBand with GPUDirect RDMA, which *is* efficient. | ||
| - If you find `[send] via NET/Socket` in the logs, NCCL used a raw TCP socket, which *is not* efficient for cross-node tensor parallelism. | ||
|
|
||
| !!! tip "Verify inter-node GPU communication" | ||
| After you start the Ray cluster, verify GPU-to-GPU communication across nodes. Proper configuration can be non-trivial. For more information, see [troubleshooting script][troubleshooting-incorrect-hardware-driver]. If you need additional environment variables for communication configuration, append them to <gh-file:examples/online_serving/run_cluster.sh>, for example `-e NCCL_SOCKET_IFNAME=eth0`. Setting environment variables during cluster creation is recommended because the variables propagate to all nodes. In contrast, setting environment variables in the shell affects only the local node. For more information, see <gh-issue:6803>. | ||
|
|
||
| !!! tip | ||
| The error message `Error: No available node types can fulfill resource request` can appear even when the cluster has enough GPUs. The issue often occurs when nodes have multiple IP addresses and vLLM can't select the correct one. Ensure that vLLM and Ray use the same IP address by setting `VLLM_HOST_IP` in `run_cluster.sh` (with a different value on each node). Use `ray status` and `ray list nodes` to verify the chosen IP address. For more information, see <gh-issue:7815>. | ||
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.
Uh oh!
There was an error while loading. Please reload this page.