Repository navigation
docs: add GMS verification workaround for device plugin and DRA coexistence #13536
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
Open
changhyeonnam
wants to merge
4
commits into
ai-dynamo:main
Choose a base branch
from
changhyeonnam:docs/gms-dra-coexistence-workaround
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8ebf977
docs: add GMS verification workaround for device plugin and DRA coexi…
changhyeonnam 8bd887e
Merge branch 'main' into docs/gms-dra-coexistence-workaround
changhyeonnam ed7bc49
docs(gms): address review on the DRA coexistence page and catalog the…
changhyeonnam 8528e84
Update examples/backends/vllm/deploy/gms-dra-blocker.yaml
changhyeonnam 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
58 changes: 58 additions & 0 deletions
58
docs/fern/pages/kubernetes/fault-tolerance/gms-dra-coexistence.md
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,58 @@ | ||
| --- | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| title: GMS with Device Plugin and DRA | ||
| subtitle: Verify GPU Memory Service shadow engine failover on clusters where the NVIDIA device plugin and the DRA driver allocate the same GPUs. | ||
| --- | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| This page applies to a Kubernetes cluster that already runs the NVIDIA DRA | ||
| driver, so `resource.k8s.io/v1` is served (Kubernetes 1.34.2 or later, per the | ||
| GPU Operator DRA documentation), and to a GMS deployment from one of the vLLM | ||
| examples: | ||
| [agg_gms.yaml](https://github.com/ai-dynamo/dynamo/blob/main/examples/backends/vllm/deploy/agg_gms.yaml) | ||
| for a single node or | ||
| [gms-failover.yaml](https://github.com/ai-dynamo/dynamo/blob/main/examples/backends/vllm/deploy/gms-failover.yaml) | ||
| for multinode failover. The procedure was verified with Kubernetes v1.35.1, | ||
| NVIDIA DRA driver 0.4.1, and Dynamo 1.4.2. You no longer need it once the DRA | ||
| nodes run without the device plugin, or once the operator adds a device | ||
| selector to the GMS ResourceClaimTemplate. | ||
|
|
||
| ## Verification-only workaround | ||
|
|
||
| > [!WARNING] | ||
| > NVIDIA does not support running the device plugin and the DRA driver on the | ||
| > same node. Neither allocator sees the other's allocations, so the same GPU | ||
| > can be handed to two pods. See the | ||
| > [GPU Operator DRA documentation](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/dra-intro-install.html): | ||
| > a cluster uses either `GPUCluster` for DRA or `ClusterPolicy` for the device | ||
| > plugin, not both. | ||
|
|
||
| The supported configuration is to run the DRA driver on nodes where the device | ||
| plugin is disabled. If you cannot separate the nodes yet and only want to verify | ||
| Shadow Engine Failover, a blocker ResourceClaim works as a verification-only | ||
| stopgap: on a node with both allocators, the DRA scheduler can place the GMS | ||
| claim on a GPU the device plugin already handed out, and the engine fails at | ||
| startup with `Free memory on device ... is less than desired GPU memory | ||
| utilization`. Reserving those GPUs with the blocker before deploying GMS steers | ||
| the claim to free devices. It does not make the node layout supported, and it | ||
| protects one direction only: the device plugin keeps advertising every GPU on | ||
| the node, so hold off new `nvidia.com/gpu` workloads on that node while the | ||
| GMS claim is live, or a new pod can land on the GPU DRA just gave to GMS. Apply | ||
| [gms-dra-blocker.yaml](https://github.com/ai-dynamo/dynamo/blob/main/examples/backends/vllm/deploy/gms-dra-blocker.yaml) | ||
| with the CEL expression and the request `count` adjusted to the occupied device | ||
| UUIDs on your node (list them with `nvidia-smi -L`, or map DRA device names to | ||
| UUIDs from the ResourceSlices as shown in the manifest comments), then | ||
| deploy the GMS example as usual and confirm which GPU each claim received: | ||
|
|
||
| ```bash | ||
| kubectl get resourceclaims -n <namespace> -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range .status.allocation.devices.results[*]}{.device}{" "}{end}{"\n"}{end}' | ||
| ``` | ||
|
|
||
| The GMS claims must not list any GPU you put in the blocker. The blocker pod | ||
| holds the devices in the DRA ledger without starting any CUDA process, so the | ||
| occupied GPUs keep serving their existing workloads. Delete the blocker Pod and ResourceClaim when the | ||
| verification is done. The ResourceClaim spec is immutable, so when the set of | ||
| occupied GPUs changes, delete both objects and apply the manifest again with | ||
| the updated UUIDs. |
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,64 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Blocker claim for verifying GMS on clusters where the NVIDIA device plugin | ||
| # also serves nvidia.com/gpu workloads. The DRA scheduler cannot see | ||
| # device-plugin allocations, so it can place the GMS claim on a GPU that is | ||
| # already fully occupied. Reserving the occupied devices with this claim before | ||
| # deploying a GMS workload steers the generated claims onto free devices. | ||
|
changhyeonnam marked this conversation as resolved.
Resolved
|
||
| # | ||
| # Devices are selected by GPU UUID. List the UUIDs with `nvidia-smi -L` on the | ||
| # node, or map DRA device names to UUIDs from the v1 ResourceSlices (the shape | ||
| # below is resource.k8s.io/v1; querying the version explicitly fails loudly on | ||
| # clusters that do not serve it): | ||
| # kubectl get resourceslices.v1.resource.k8s.io -o jsonpath='{range .items[*].spec.devices[*]}{.name}{" "}{.attributes.uuid.string}{"\n"}{end}' | ||
| # The ResourceClaim spec is immutable: to change the UUIDs or count later, | ||
| # delete both objects and apply the manifest again. | ||
| # Replace the UUIDs and count below with the occupied GPUs on your node, then: | ||
| # kubectl apply -n <namespace> -f gms-dra-blocker.yaml | ||
| # The busybox pod holds the devices in the DRA ledger without starting any CUDA | ||
| # process, so the occupied GPUs keep serving their existing workloads. | ||
| apiVersion: resource.k8s.io/v1 | ||
| kind: ResourceClaim | ||
| metadata: | ||
| name: gms-dra-blocker | ||
| spec: | ||
| devices: | ||
| requests: | ||
| - name: blocked | ||
| exactly: | ||
| deviceClassName: gpu.nvidia.com | ||
| allocationMode: ExactCount | ||
| count: 2 | ||
| selectors: | ||
| # Block the already-occupied GPUs. Replace with your node's UUIDs | ||
| # (one per occupied device) so GMS claims land on free GPUs. | ||
| - cel: | ||
| expression: >- | ||
| device.attributes["gpu.nvidia.com"].uuid == "GPU-00000000-0000-0000-0000-000000000000" || | ||
| device.attributes["gpu.nvidia.com"].uuid == "GPU-11111111-1111-1111-1111-111111111111" | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: gms-dra-blocker | ||
| spec: | ||
| restartPolicy: Never | ||
| resourceClaims: | ||
| - name: blocker | ||
| resourceClaimName: gms-dra-blocker | ||
| containers: | ||
| - name: hold | ||
| image: busybox:1.36 | ||
| command: ["sleep", "infinity"] | ||
| # Guaranteed QoS keeps the holder off the node-pressure eviction list; | ||
| # evicting the only consumer would release the claim's reservation. | ||
| resources: | ||
| requests: | ||
| cpu: 10m | ||
| memory: 16Mi | ||
| limits: | ||
| cpu: 10m | ||
| memory: 16Mi | ||
| claims: | ||
| - name: blocker | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
Oops, something went wrong.
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.