GPU scheduling, also called GPU job scheduling, is the process of deciding which workloads receive which graphics processing units, on which nodes and at what time. In AI infrastructure, a GPU scheduler turns a pool of expensive accelerators into a shared, policy-governed resource for model training, fine-tuning, batch inference and online serving.
Good scheduling matters because GPUs are the dominant cost of AI compute. A cluster that leaves accelerators idle, fragments them across nodes or places communication-heavy jobs on poorly connected hardware wastes money and slows research, even when every individual GPU is fast.
How a GPU scheduler places work
A GPU scheduler matches job requests to available devices in a repeated cycle. Each job declares how many GPUs it needs, often with constraints such as GPU model, memory size or interconnect. The scheduler maintains an inventory of free devices, applies queueing and priority policies, selects a placement and then binds the job to specific GPUs through the cluster manager.
Distributed training adds a decisive requirement: gang scheduling. A job that needs 64 GPUs must start on all 64 at once, because a partial allocation cannot make progress and only blocks capacity. Schedulers therefore reserve or wait for a complete set and avoid deadlocks between partially placed jobs.
The table below lists the main decisions a scheduler makes for each job.
| Decision | Question answered | Typical inputs |
|---|---|---|
| Admission | May this job enter the queue now | Team quota, budget, priority class |
| Ordering | Which waiting job runs next | Priority, fair share, wait time |
| Placement | Which nodes and GPUs to use | Topology, free memory, GPU type |
| Sharing | Can several jobs use one GPU | MIG profiles, time slicing, MPS |
| Preemption | Should a running job be stopped | Priority gap, checkpoint support |
Topology-aware placement
Topology-aware placement puts communicating GPUs as close together as possible. Inside a server, GPUs linked by NVLink or NVSwitch exchange data far faster than GPUs that talk through PCIe and host memory. Across servers, jobs benefit from staying within one network switch domain or one rack-scale system.
Placement quality directly affects collective communication such as all-reduce in data parallelism and the frequent exchanges in tensor parallelism. A scheduler that ignores topology can cut training throughput by a large margin, so experienced operators treat interconnect locality as a first-class constraint, not an optimization afterthought.
Topology awareness also reduces fragmentation. If small jobs scatter across many servers, no server keeps a complete set of eight free GPUs for a large tensor-parallel job. Bin-packing small jobs onto as few servers as possible preserves whole nodes for demanding workloads.
| Placement level | Interconnect | Best suited for |
|---|---|---|
| Same GPU partition | Shared device memory | Small inference models |
| Same server | NVLink or NVSwitch | Tensor parallelism |
| Same rack or switch | High-bandwidth fabric | Pipeline and data parallelism |
| Across racks | Multi-tier network | Data parallelism with tolerant overlap |
Sharing policies and GPU partitioning
Not every workload needs a full accelerator, so schedulers support fractional GPU allocation. The main techniques differ in how strongly they isolate tenants and how much overhead they add.
| Technique | Isolation | Trade-off |
|---|---|---|
| Multi-Instance GPU (MIG) | Hardware partitions of memory and compute | Fixed profiles, less flexibility |
| Time slicing | None for memory, turns at compute | Easy setup, noisy neighbors |
| Multi-Process Service (MPS) | Partial, shared context | Good throughput, weak fault isolation |
| Whole-GPU allocation | Full device per job | Simple, often underused |
At the cluster level, fair-share scheduling balances usage among teams over time, while hierarchical quotas guarantee each group a minimum and allow borrowing of idle capacity. Borrowed capacity is usually preemptible, so jobs that use it should write regular checkpoints.
Common schedulers in AI infrastructure
Most AI teams build on either an HPC batch scheduler or Kubernetes extended for batch work. Slurm dominates traditional supercomputing and many research clusters, while Kubernetes is common where training and model serving share one platform. Add-ons such as Kueue and Volcano bring queueing and gang scheduling to Kubernetes, and commercial orchestration layers add fractional GPUs and quota dashboards.
- Slurm: generic resource requests, partitions, fair-share and backfill, strong for large synchronous training.
- Kubernetes with a device plugin: exposes GPUs as countable resources, strong for services and autoscaling.
- Kueue and Volcano: job queues, gang admission and quota management on Kubernetes.
- Ray: application-level scheduling of tasks and actors with fractional GPU requests.
The choice depends on the dominant workload mix. Long synchronous training favors batch semantics and backfill, whereas latency-sensitive inference favors autoscaling and service abstractions.
Pitfalls and how to avoid them
Most scheduling problems show up as low GPU utilization or long queue times rather than as obvious errors. The following table pairs frequent symptoms with their causes and remedies.
| Symptom | Likely cause | Remedy |
|---|---|---|
| Large jobs wait for days | Fragmentation across nodes | Bin packing and reservation windows |
| Training slower than expected | Poor topology placement | Topology-aware constraints |
| Idle GPUs with full queue | Rigid quotas without borrowing | Hierarchical quotas with preemption |
| Lost work after preemption | No checkpointing | Frequent distributed checkpoints |
| Unstable inference latency | Noisy neighbors on shared GPU | MIG or dedicated devices |
A further mistake is measuring success only by allocation rate. A GPU that is allocated but waiting on data loading still produces nothing, so mature teams also track goodput and model FLOPs utilization alongside queue metrics.
Operators should also plan for hardware failures at scale. In clusters with thousands of GPUs, a node fault during a long training run is routine rather than exceptional. Schedulers that support automatic requeue and elastic restarts let a job resume from its last checkpoint on healthy nodes, while health checks that drain faulty servers before placement prevent repeated crashes on the same defective hardware.
Explained without jargon
Think of a busy restaurant with a limited number of tables. Some groups are large and must sit together. Others need only one seat. A good host decides who sits where and when. Nobody should wait while tables stand empty.
GPU scheduling does the same job for computer chips that train and run AI. It decides who gets which chips and when. Good scheduling keeps expensive hardware busy and work moving.
A typical use case
A research lab runs a cluster of 256 GPUs in 32 servers with eight GPUs each. Three teams share it: one trains a large language model on 128 GPUs, one runs dozens of small experiments, and one serves an internal chatbot that must answer within two seconds.
The platform team configures hierarchical quotas that guarantee each group a share and let idle capacity be borrowed. The large training job uses gang scheduling and is placed on 16 complete servers within one switch domain. Small experiments receive MIG slices, and the chatbot gets dedicated GPUs with a high priority class. Average utilization rises from about 45 percent to over 75 percent, and median queue time for experiments falls from hours to minutes.