At NVIDIA, we take pride in tackling complex infrastructure challenges with precision and innovation. When Volcano faced GPU underutilization in their NVIDIA DGX Cloud-provisioned Kubernetes cluster, we stepped in to deliver a solution that not only met but exceeded expectations.
By combining advanced scheduling techniques with a deep understanding of distributed workloads, we achieved around 90% GPU occupancy, well above the contractual target of 80%. Here’s a detailed look at the problem, our approach, and the results.
The DGX Cloud Kubernetes cluster consisted of thousands of GPUs, each equipped with multiple NVIDIA L40S GPUs. The cluster supported diverse workloads:
Despite the availability of robust hardware, the cluster suffered from GPU fragmentation, where nodes were left partially occupied and unusable for larger jobs. This inefficiency was compounded by the default behavior of the Volcano Scheduler, which used a gang scheduling algorithm.
Without intervention, we risked breaching the contractual agreement to maintain at least 80% GPU occupancy. This would result in reduced cluster capacity as unused resources were reclaimed for other teams.
The implementation of this solution required overcoming two primary obstacles:
To address these challenges, we implemented an enhanced scheduling strategy by integrating a bin-packing algorithm into the Volcano Scheduler. This approach focused on consolidating workloads to maximize node utilization while leaving other nodes entirely free for larger jobs.
Our approach to resolving GPU fragmentation involved three key components:
These points were enabled using the following Volcano Scheduler configuration, enabling efficient workload placement and prioritizing node utilization.
volcano-scheduler.conf: | actions: "enqueue, allocate, backfill" tiers: -plugins: -name: priority -name: gang enablePreemptable: false -name: conformance -plugins: -name: drf -name: predicates -name: proportion -name: nodeorder -name: binpack arguments: binpack.weight: 10 binpack.cpu: 2 binpack.memory: 2 binpack.resources: "nvidia.com/gpu" binpack.resources.nvidia.com/gpu: 8 binpack.score.gpu.weight: 10 -plugins: -name: overcommit -name: rescheduling |
To illustrate the effectiveness of our solution, let’s consider the following scenario:
Two nodes—Node A with two GPUs occupied and Node B, which is free—receive a new workload requiring two GPUs.

The workload is placed randomly, for example, on Node B, leaving both nodes partially occupied.

As a result, the cluster contained more partially occupied nodes than completely free nodes. Figure 3 shows that only 18 nodes with all four GPUs were accessible, however there were around 115 nodes with three free GPUs, which cannot be used for a training job that requires four GPUs per node.

The impact of this fragmentation becomes even more apparent when we examine the distribution of partially occupied nodes.

The workload is placed on Node A, fully using its four GPUs while leaving Node B completely free for future, large-scale jobs.

Figure 5 shows that Node A and B, with partially occupied GPUs, receives a new workload requiring two GPUs and places them on Node B using the default gang scheduling mechanism, lowering the capacity on both nodes.
As a result, the cluster had more free nodes than occupied nodes. Figure 6 shows that there are 214 nodes with all four GPUs available, which a training job requiring four GPUs can easily use.

Figure 7 shows that there are approximately nine nodes with three free GPUs.

This strategic placement significantly reduced fragmentation and improved resource availability for large training jobs.
The integration of bin-packing into the Volcano Scheduler transformed the GPU cluster’s performance:
Finally, as a result, the whole cluster occupancy averaged out at roughly 90%, which was much beyond the Resource Governance team’s criterion of 80%.

This post highlighted how thoughtful scheduling strategies can resolve pervasive challenges in multi-node multi-GPU clusters.
Sageconnect is a reliable provider of IT network system integration and solutions for global enterprise customers.
Copyright © 2024 starsurge mellanox network. Powered by starsurgemellanox network.