Gang scheduling
Gang scheduling is a timeout-based implementation of All-or-nothing scheduling in Alauda Build of Kueue.
Gang scheduling ensures that a group or gang of related jobs only start when all required resources are available. Alauda Build of Kueue enables gang scheduling by suspending jobs until the Alauda Container Platform cluster can guarantee the capacity to start and execute all of the related jobs in the gang together.
Gang scheduling is important if you are working with expensive, limited resources, such as GPUs. Gang scheduling can prevent jobs from claiming but not using GPUs, which can improve GPU utilization and can reduce running costs. Gang scheduling can also help to prevent issues like resource segmentation and deadlocking.
Configuring gang scheduling
The gang scheduling is enabled by default. As a cluster administrator, you can enable/disable the gang scheduling or update the timeout by modifying the deployment form params of the Alauda Build of Kueue cluster plugin.
The timeout (waitForPodsReady.timeout) is an optional parameter, defaulting to 5 minutes.
When the timeout expires for an admitted Workload, and the workload's pods are not all scheduled yet (i.e., the Workload condition remains PodsReady=False), then the Workload's admission is cancelled, the corresponding job is suspended and the Workload is re-queued.
Verification
Prerequisites
- The Alauda Container Platform Web CLI has communication with your cluster.
- You have installed the Alauda Build of Hami.
- Assuming your cluster only has one GPU card for the Hami virtualization.
Procedure
-
Verify that the Gang scheduling policy configuration is effective.
You should get results similar to:
-
Create the assets by running the following command:
-
Create the following file with the job manifest:
-
With only one GPU card, you can see one running pod and two pending pods.
After a 5-minute wait, all pods were eventually evicted.