Home Knowledge Base HPC Job Scheduling (SLURM, PBS)

HPC Job Scheduling (SLURM, PBS) is the cluster resource management and workload scheduling system that allocates compute nodes, GPUs, memory, and time to user-submitted batch jobs — enabling fair, efficient sharing of expensive HPC and AI training clusters among hundreds of users by queuing jobs, enforcing resource limits, managing priorities, and automating node allocation, with SLURM being the dominant scheduler powering most of the world's top supercomputers and AI training clusters.

Why Job Schedulers Are Needed

Major Schedulers

SchedulerFull NamePrevalenceKey Strength
SLURMSimple Linux Utility for Resource Mgmt~65% of Top500Scalability, GPU support
PBS ProPortable Batch System~15%Enterprise features
LSFIBM Spectrum LSF~10%Commercial support
HTCondorHigh-Throughput Condor~5%Cycle scavenging
KubernetesContainer orchestrationGrowingCloud-native, elastic

SLURM Job Submission

#!/bin/bash
#SBATCH --job-name=train_llm
#SBATCH --partition=gpu
#SBATCH --nodes=4
#SBATCH --ntasks-per-node=8
#SBATCH --gpus-per-node=8
#SBATCH --cpus-per-task=12
#SBATCH --mem=1024G
#SBATCH --time=72:00:00
#SBATCH --output=train_%j.log

module load cuda/12.2 nccl/2.18
srun torchrun --nproc_per_node=8 --nnodes=4 train.py
# Submit job
sbatch train_job.sh

# Check queue
squeue -u $USER

# Cancel job
scancel 12345

# Check cluster status
sinfo

SLURM Architecture

Scheduling Policies

PolicyHowBest For
FIFOFirst come, first servedSimple, small clusters
Fair-shareHistorical usage determines priorityMulti-group fairness
BackfillSmall jobs fill gaps around large jobsImprove utilization
PreemptionHigh-priority jobs evict lowerUrgent workloads
Gang schedulingTime-share nodes among jobsOversubscription

GPU Scheduling with SLURM

AI Training Cluster Patterns

HPC job scheduling is the operating system of supercomputing — SLURM and similar schedulers transform a collection of individual compute nodes into a coherent, shared computing resource that can run thousands of concurrent jobs while ensuring fair access, efficient utilization, and the multi-node coordination essential for training modern AI models that span hundreds of GPUs.

slurm schedulerhpc job schedulerpbs torquejob scheduling hpcresource manager cluster

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.