Job scheduling strategies for GPU clusters
FIFO, gang, bin-packing, multi-queue and backfill scheduling, how to measure GPU efficiency, and when to use Slurm versus Kubernetes.
- Describe AI cluster orchestration and job scheduling essentials.
- Articulate the key measures and criteria related to monitoring GPUs.
A job scheduler decides who gets which GPUs, and when. The Samsung SDS article starts from a simple problem: a job that needs 4 GPUs cannot start on a server with only 2 free, and a 4-GPU job placed on an 8-GPU server leaves 4 GPUs idle unless something else fits beside it. Scheduling policy decides how much of an expensive cluster sits idle.
Try the three policies on the same queue, in arrival order: job A (4 GPUs), job B (8 GPUs, a whole node), then jobs C and D (2 GPUs each).
01The strategies
| Strategy | How it works | Strength | Weakness |
|---|---|---|---|
| FIFO | First in, first out | Simple and fair | A big job at the head blocks everyone; GPUs idle |
| Gang scheduling | Start a job only when all the GPUs, CPUs and memory it needs are free together | Distributed training never starts half-placed and hangs | Large jobs may wait longer |
| Bin-packing | Place each job on as few nodes as possible | Less network traffic for distributed jobs; keeps whole nodes free | Can create hot spots |
| Multi-queue | Separate queues (e.g. large ≥3 GPUs, small ≤2 GPUs) | Small jobs stop waiting behind large ones | Needs tuning |
| Backfill | Run smaller jobs in idle gaps if they finish before the reserved big job can start | Raises utilisation without delaying earlier jobs | Needs good runtime estimates |
Samsung reports that splitting the queue cut average waiting time from about 32.3 hours under FIFO to 5.8 hours, and raised GPU efficiency by about 20%.
02Measuring it: GPU usage efficiency
The article’s metric is simple: GPU efficiency = time GPUs were actively used ÷ total GPU time available. Example: 100 GPUs over 100 hours = 10,000 GPU-hours. If 40 GPUs sat idle for 50 hours (2,000 GPU-hours), efficiency is 8,000 / 10,000 = 80%. Track it with DCGM data per job, user and queue.
03Other scheduler features you should know
- Priorities and preemption: urgent or production work can pause lower-priority jobs (which should checkpoint).
- Quotas and fair share: each team gets a guaranteed share, and can borrow idle capacity.
- Topology awareness: place a job’s GPUs on nodes under the same switch to cut network hops.
- Health awareness: skip nodes that DCGM marks unhealthy.
04Job scheduling vs container orchestration
| Slurm (job scheduler) | Kubernetes (orchestrator) | |
|---|---|---|
| Analogy | Air traffic controller: planes (jobs) to runways (GPU nodes) | Smart-city traffic system for always-on services |
| Workloads | Training, HPC, batch data processing | Inference, microservices, pipelines |
| Execution | Runs a job to completion | Keeps services running, autoscaling |
| Scheduling logic | Priority queues, fair share, gang, backfill | Load balancing, replica scaling |
| GPU integration | GRES GPU plugin, CUDA-aware, NCCL/GPUDirect | GPU Operator, MIG-aware, DCGM metrics |
| Interface | CLI: sbatch, srun, squeue | API: kubectl, Helm, YAML |
| Typical users | Researchers, HPC admins | Platform and DevOps engineers |
| Lifecycle phase | Training | Inference / serving |
✦Key terms: flip the cards
- Know FIFO, gang, bin-packing, multi-queue and backfill, and what each fixes.
- GPU efficiency = used GPU time ÷ available GPU time.
- Slurm for training batch jobs; Kubernetes for inference services.
- Gang scheduling can make big jobs wait longer; it prevents partial starts, not waiting.
- Backfill must not delay the reserved large job.
?Quick quiz
1. Which strategy prevents a distributed training job from starting with only some of its GPUs?
Why: Gang scheduling starts all parts together or not at all.
2. 100 GPUs for 100 hours; idle total 2,000 GPU-hours. Efficiency?
Why: (10,000 - 2,000) / 10,000 = 80%.
3. Which strategy fills idle gaps with small jobs without delaying earlier jobs?
Why: Backfill uses gaps while respecting reservations.
4. Long-running multi-node training jobs with priority queues best fit:
Why: Slurm is the batch job scheduler for training.
Score: 0 / 4
This lesson explains the reading in plain language and adds the exam context around it. Read the original too: it is short, and seeing the vendor wording helps on exam day.