⚙️
Domain 3 · AI Operations · 22% of the exam

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.

Lesson 26 of 29~13 min read4 quiz questions5 key terms
Exam objectives this lesson covers
  • 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

StrategyHow it worksStrengthWeakness
FIFOFirst in, first outSimple and fairA big job at the head blocks everyone; GPUs idle
Gang schedulingStart a job only when all the GPUs, CPUs and memory it needs are free togetherDistributed training never starts half-placed and hangsLarge jobs may wait longer
Bin-packingPlace each job on as few nodes as possibleLess network traffic for distributed jobs; keeps whole nodes freeCan create hot spots
Multi-queueSeparate queues (e.g. large ≥3 GPUs, small ≤2 GPUs)Small jobs stop waiting behind large onesNeeds tuning
BackfillRun smaller jobs in idle gaps if they finish before the reserved big job can startRaises utilisation without delaying earlier jobsNeeds 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

04Job scheduling vs container orchestration

Slurm (job scheduler)Kubernetes (orchestrator)
AnalogyAir traffic controller: planes (jobs) to runways (GPU nodes)Smart-city traffic system for always-on services
WorkloadsTraining, HPC, batch data processingInference, microservices, pipelines
ExecutionRuns a job to completionKeeps services running, autoscaling
Scheduling logicPriority queues, fair share, gang, backfillLoad balancing, replica scaling
GPU integrationGRES GPU plugin, CUDA-aware, NCCL/GPUDirectGPU Operator, MIG-aware, DCGM metrics
InterfaceCLI: sbatch, srun, squeueAPI: kubectl, Helm, YAML
Typical usersResearchers, HPC adminsPlatform and DevOps engineers
Lifecycle phaseTrainingInference / serving
A restaurant booking system. FIFO seats parties strictly in arrival order, so a party of twelve waiting for a big table blocks couples behind them. Backfill seats the couples at small tables that will be free before the big table is. Bin-packing puts parties at the fewest tables possible, keeping a large table open.

✦Key terms: flip the cards

What the exam looks for
  • 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.
Common traps
  • 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

Original readingLet’s Explore the Importance of Job Scheduling in a Cloud Environment, Changju Lee (Samsung SDS) ↗

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.

All lessons →
↑