Topic: ml-infra-and-orchestration

The machinery around a training run, as a map: what a GPU cluster is, how a job gets all its machines at once (Slurm, Kubernetes, Ray), how its processes start and meet, what fails at scale and how runs survive it, where data and checkpoints live, and what the GPU-hours buy, with nine child pages for the depth. The same small training job runs on real Slurm, Kubernetes and Ray clusters in containers on an Apple M1 Pro in every lab tab; published cluster numbers are kept apart. Data as of October 2026. Reading: 29 min, plus 10 in closed details.

0. The map

The idea. A synchronous training job is one program spread over hundreds or thousands of GPUs that moves only when every piece is present. So the infrastructure around it does four things: give the whole job its machines at once, start and connect one process per GPU, restart all of them from a checkpoint when any one fails, and meter what the GPU-hours bought. Slurm, Kubernetes and Ray split those duties differently; the duties stay the same.

Fig. 1 is the page: the life of one training job on this topic's own Slurm lab cluster, each part lit where it acts, with the section here and the child page whose own figure teaches it. Kubernetes and Ray do the same duties under other names, given in each step.

  1. The map: one job, one cluster. alice submits to a controller, which hands out the GPUs of three nodes; the job reads and writes a shared volume; meters count what it used and a tracker records what it made. Drawn: the lab's Slurm cluster (a controller and nodes c1 to c3 with four fake GPUs each, containers on an M1 Pro) running the running example, 2 nodes of 2 ranks; the meter and tracker boxes are illustrative. Each step lights one part and links the child page that owns it.
  2. The cluster: GPUs in nodes, nodes on networks. A typical node holds 8 GPUs joined by NVLink (the lab's nodes have four fake ones); nodes are joined by a scale-out fabric, and storage and the controller sit on the network, not in the node. Per direction an H100's NVLink carries about 450 GB/s against 50 GB/s for one 400 Gb/s card (section 1). Owner: Cluster anatomy, whose Fig. 1 climbs the staircase from one GPU to the Llama 3 cluster and Fig. 2 lays one job over the four networks.
  3. Submit and wait: a scheduler queues the job. The job file asks for nodes, GPUs and a time limit; the controller puts it in a queue with everyone else's and decides who goes next by priority, backfill and fairshare (section 2). Slurm: sbatch to slurmctld. Kubernetes: a JobSet in a Kueue queue. Ray: a job on a running Ray cluster. Owners: Slurm from zero, whose hero follows one job through this same lab cluster from its log and whose backfill figure steps the main loop and the backfill loop; Kubernetes for ML, whose control loop follows one Job object. Tool: Scheduling lab.
  4. Get machines: all or nothing. The scheduler starts the job only when every GPU it asked for is free together (gang scheduling): here 2 nodes with gpu:2 each, while c3 stays free. Slurm gives one allocation from slurmctld; Kubernetes needs Kueue to admit a JobSet whole; Ray reserves a placement group. Without it, Kubernetes placed half of each of three jobs and held 12 of 12 GPUs with no step run (section 2). Owner: Kubernetes for ML, whose all-or-none figure replays that deadlock and its fix; Ray's Fig. 4 shows the placement group behind Ray Train.
  5. Start and meet: one process per GPU. A launcher starts the processes; they find each other (rendezvous) and build the communicator the gradients travel on. Slurm: srun then torchrun, meeting at rank 0's store on c1:29500. Kubernetes: a pod per node, pod 0's DNS name. Ray: Ray Train sets it all. Submit to the first finished step, medians of 5: 7.5 s on Slurm, 5.8 s on Kubernetes, 10.0 s on Ray measured (section 4). Owner: Launching distributed training, whose Fig. 1 times every link of this launch and Fig. 3 finds the one stuck rank in a hang. Tool: Launch lab.
  6. Train: read data, all-reduce gradients. Steps run; data streams in from shared storage and every step all-reduces the gradients across both nodes. The same code gave the same global loss bit for bit on all three systems (step 200: 2.2638769149780273, section 3). PyTorch's side (DDP, FSDP2, c10d) is Distributed PyTorch.
  7. Checkpoint: the state, written out. Every so often every rank writes its part of a checkpoint at once; here rank 0 writes 1,386,049 bytes every 50 steps. At 70B parameters a checkpoint is about 0.98 TB, about 16 GB/s of writes for one minute (section 6). Owners: Storage and data movement, whose Fig. 4 writes one checkpoint four ways and Fig. 1 stripes a file over four servers; Cluster anatomy's Fig. 4 draws the storage tiers; Fault tolerance at scale's Fig. 1 saves and restores with four strategies. Tool: Storage lab.
  8. Fail and resume: routine at scale. A GPU, link or host dies; every rank stops at the next collective; the bad node is taken out and the job restarts from the last checkpoint. Measured here: c2 killed, Slurm set it DOWN at 32 s, requeued the job, restarted it on c1 and c3 at 162 s and it resumed from step 100 at 166 s, redoing 20 steps measured. Kubernetes: JobSet restart, cordon and taint. Ray: Ray Train restores the worker group (section 5). Owner: Fault tolerance at scale, whose Fig. 2 loses a node, shrinks and grows back; Ray's Fig. 3 follows six fates when a node is lost. Tool: Failure lab.
  9. Account: what the hours bought. Meters set paid GPU-hours against useful work: idle allocations, restarts, checkpoint stalls and slow steps all appear as losses, and they multiply: 90% goodput at 40% MFU uses 36% of what was paid for derived (section 7). Owner: Observability and cost, whose Fig. 1 reads one H100 with three meters, Fig. 2 splits the allocated seconds and Fig. 3 charges them to accounts. Tool: Cost lab.
  10. Record: the platform around every job. Around every step sits the platform that records which code, data and run made which model: an experiment tracker, a workflow engine, a model registry (section 8). Owner: ML platforms and workflows, whose Fig. 1 follows a champion model's chain layer by layer and Fig. 2 runs a workflow on its datastore. Across all of them, the Tool map.

A map, not a mechanism: each step lights the part one child page owns. Below, each section ends at the child page that owns its subject, and the lab tabs run the same job through all three systems. The cluster drawn is the lab's; the queue's other jobs, the meter and the tracker are illustrative, the numbers are measured or derived as labelled.

You need: what data parallelism is and why every rank must join each gradient all-reduce (Distributed Training). Nothing on the cluster side is assumed.

New terms on this page (16)
node, cluster
one server (typically 8 GPUs); many nodes joined by networks, shared storage and control machines
rank, world size
one training process, normally one per GPU; how many there are
GPU-hour
one GPU for one hour: the unit of cost and of quota
scheduler, allocation
the program that queues jobs and hands out machines; the machines one job holds
gang scheduling
start every process of a job together or none of them
backfill
start a later, smaller job in idle nodes if it ends before the waiting big job could start
fairshare
priority that falls for teams that used more than their share recently
preemption
evicting a running job for a more important one
pod, Kueue, JobSet
Kubernetes' unit of containers; its job-queueing add-on; its "group of pods as one job" object
placement group
Ray's reservation of several bundles of resources at once
launcher
starts one process per GPU and tells each its rank (torchrun, srun, Ray Train)
rendezvous, TCPStore
how the processes meet; the small key-value server they meet at
process group
the communicator collectives run on (gloo on CPUs, NCCL on NVIDIA GPUs)
MTBF
mean time between failures, of a part or of a whole job
drain, cordon
Slurm's and Kubernetes' ways of keeping new work off a node
goodput, MFU
the share of paid time that made progress; the share of the chip's peak that progress used

The running example. one small PyTorch training job: a character-level GPT (2 layers, 2 heads, width 64, 112,577 parameters) on TinyShakespeare, trained with DDP over gloo (the CPU stand-in for NCCL) as 4 ranks on 2 "nodes" of 2, for 200 deterministic steps, checkpointing every 50 steps (1.4 MB each) and resuming exactly from the last one. It is packaged once as a container image and submitted the way each system expects: sbatch on a Slurm cluster in containers, a JobSet admitted by Kueue on a kind Kubernetes cluster, and Ray Train on a Ray cluster in containers (definitions in the root's src/data/). Every lab tab submits that one job, so its queueing, launch, failures, checkpoints and cost compare across the three systems. The clusters are real Slurm, Kubernetes and Ray software in containers on an Apple M1 Pro: what the systems do (which job runs where and when, what a failure does, the logs, the environment) is real; how fast is laptop speed, not data-centre speed.

Labels: measured here in October 2026; published by an operator about its own cluster or run; vendor a company about what it sells; independent no stake; derived with the formula shown; simulated by a small model of the mechanism; unconfirmed no primary source found.

1. What a training cluster is

A node is one server: typically 8 GPUs, two CPUs, local NVMe disks and one network card per GPU (Meta trained Llama 3 405B on servers of eight GPUs and two CPUs, up to 16K H100s in all, Llama 3 §3.3.1 published). A cluster is many nodes plus four things that make them one machine:

  • Two networks for GPUs. Inside a node, GPUs talk over NVLink (the scale-up domain); between nodes, over a scale-out fabric, InfiniBand or Ethernet with RDMA (RoCE), usually one 400 Gb/s card per GPU. Per direction an H100's NVLink is about 9 times one such card (450 against 50 GB/s), which is why tensor parallelism stays inside a node and data parallelism crosses nodes (Interconnects and scaling owns these numbers).
  • A front-end network (ordinary Ethernet) for logins, the scheduler, container images, data and checkpoints, unless storage has its own fabric.
  • Shared storage that every node sees: a parallel file system or object storage (section 6).
  • Control nodes: login nodes where users submit, and the controller or head node that tracks every node and job (Slurm's slurmctld, Kubernetes' API server and scheduler, Ray's head node). What each runs, and how one job lands on the machines step by step, is Cluster anatomy, section 3 (its job stepper).

Two units recur everywhere: the GPU-hour (cost and quota) and the rank (one process, normally one per GPU; a job on 128 nodes of 8 GPUs has 1,024 ranks).

Go deeper: Cluster anatomy: nodes, GPUs, networks and storage tiers: the node part by part (section 1), scale-up racks (2), the four networks, control nodes and a job's path (3, its Fig. 2), rack to cluster and placement (4, Fig. 3), the staircase from one GPU to a cluster (Fig. 1), with its Cluster explorer and Sizing calculator tabs. Topic: hardware for GPUs and networks.
An HGX B200 eight-GPU baseboard on a table: eight tall black heatsinks in two rows of four, each over one GPU
One node's GPUs: eight on one board. The board also carries the NVLink switch chips that join them (the scale-up domain); CPUs, memory, network cards and disks sit elsewhere in the same chassis. This is an HGX B200, the H100 board's successor.Photo: Pokiiri, Nvidia DGX-B200-HGX, CC BY-SA 4.0, resized.
Rows of server racks in a large data hall, each row enclosed under a transparent roof over the cold aisle
A cluster: racks in rows, rows in a hall. Fill the racks with such nodes and join them with switches, and the scheduler's job is to hand out pieces of this room. (CERN's general-purpose hall, 2010, not a GPU cluster.)Photo: Hugovanmeijeren, Cern datacenter, CC BY-SA 3.0, resized.

2. How a job gets machines: one vocabulary for every scheduler

There are more jobs than GPUs, and a distributed job is useless until it holds all its GPUs at once. A scheduler (also workload manager or batch system) keeps a queue of requests (8 nodes of 8 GPUs for 12 hours) and a policy that decides which starts next and where. Every system in this topic combines the same seven ideas; section 3 shows how each expresses them.

  • FIFO with priorities. First in, first out, ordered by a priority number; one big job at the head blocks everything behind it while nodes idle (head-of-line blocking).
  • Backfill. A later, smaller job may use idle nodes if it ends before the big job could have started anyway, which the scheduler knows only from each job's time limit (Slurm's --time). EASY backfill protects only the first waiting job's reserved start; conservative backfill protects every waiting job.
  • Fairshare. Each team has a share; recent usage above it lowers the team's priority, and past usage decays (a half-life of days to weeks).
  • Preemption. A more important job evicts a running one, which is killed or requeued; cheap only if the victim checkpoints (section 5).
  • Gang scheduling. All of a job's processes start together or none do (measured below).
  • Topology-aware placement. A job's nodes go under as few switches as possible, because collectives across distant switches are slower.
  • Quotas and borrowing. Teams own a guaranteed amount; idle quota is lent and reclaimed (by preemption) when the owner needs it.

Gang scheduling, measured. On the topic's kind cluster (12 fake GPUs on three workers), three JobSets of 2 pods × 4 fake GPUs went to the default Kubernetes scheduler, which places pods one at a time: it placed the first pod of each job and left a1, b1 and c1 Pending ("3 Insufficient example.com/gpu"). Each running pod waits at its rendezvous for a partner that cannot be placed: 12 of 12 GPUs held for 246 s with no training step, until the lab gave up. Through Kueue, which admits a job only when all of it fits, the same three ran one after another; the waiting ones held nothing and showed a policy message instead of a deadlock: "insufficient unused quota for example.com/gpu in flavor default-flavor, 4 more needed". The cost is that 8-GPU jobs fill at most 67% of a 12-GPU quota measured, 16 October 2026. OpenAI hit the same deadlock at scale: "Kubernetes might schedule only half of each experiment's pods, leading to a deadlock where neither experiment can make progress", fixed with a gang-scheduling plugin (OpenAI, Jan 2021) published. The run is replayed event by event in the Scheduling lab, section 5; the same input with Kubernetes' native PodGroup is Kubernetes for ML's all-or-none figure (its section 7).

Backfill on real Slurm. The Scheduling lab ran one eight-job queue on the topic's Slurm cluster with backfill off and on: the queue drained at 16:48 against 14:48, utilisation of the 8 GPUs rose from 71% to 80%, and the mean wait fell from 8:09 to 3:06 (minutes:seconds) measured. The price is honest time limits: a job that asks for three times what it needs looks too long for any gap and is never backfilled. How Slurm's main loop and backfill loop decide, step by step, is Slurm from zero, section 6 (its backfill figure).

Go deeper: the Scheduling lab runs each idea on the three systems with one workload (FIFO and backfill, at scale, fairshare, preemption, the gang deadlock and its fix, quotas and borrowing, placement, and every pending message). Child pages: Slurm from zero (priority, section 7; preemption and requeue, section 8; its Why pending? decoder) and Kubernetes for ML (the scheduler, section 3; gang options, section 7; Kueue, section 8).

3. Slurm, Kubernetes and Ray: one comparison

Three systems hand out machines for training, from three worlds. Slurm comes from supercomputing: you ask for an allocation (whole nodes, for a time limit) with sbatch, a central slurmctld runs the queue with priorities, backfill and fairshare built in, and srun starts your processes on every node through a slurmd on each. Kubernetes comes from running web services: everything is a container in a pod, controllers keep declared YAML true, and kube-scheduler places pods one at a time on nodes that advertise GPUs through a device plugin (nvidia.com/gpu: 8); batch behaviour comes from add-ons (Kueue for queues, quotas and whole-job admission, JobSet for a group of pods as one job, Volcano, the Kubeflow Trainer). Ray comes from distributed Python: a runtime, not a cluster scheduler, with a head node holding cluster state (the GCS), a raylet per node scheduling tasks and actors, a shared-memory object store, and Ray Train to start a worker group; it usually runs on Kubernetes through KubeRay and leaves team quotas to the layer below (Kueue can admit Ray jobs: Kueue docs).

SlurmKubernetes (+ Kueue, JobSet)Ray
Unit you submita batch script asking for nodes and a time limita YAML object (Job, JobSet, TrainJob) with a container imagea Python script (a Ray job) on a running Ray cluster
Gang schedulingbuilt in (an allocation)not in the default scheduler (1.37: native PodGroups behind a beta gate, off); Kueue or Volcano add itplacement groups reserve all bundles at once
Queues, fairshare, quotasbuilt in (partitions, accounts, QOS, multifactor priority)Kueue: ClusterQueues, cohorts that lend and borrow, preemptionnone across teams; from the layer below
Environmentthe node's software, or containers via an add-onalways containersa Python environment per job (runtime env), often in containers
When a node diesjob killed; requeue if asked; node set to DRAIN or DOWNpods fail; JobSet or Job restarts per its policy; node cordoned or taintedRay Train restarts the worker group from the last checkpoint (if configured)
Strongest atbig synchronous jobs on fixed bare-metal clusters, many users, simple mental modelone platform for training, serving and pipelines; cloud elasticity; ecosystemjobs that are many programs at once: RL with rollouts, data pipelines, hyperparameter search
Weakest atservices, elasticity, container-native workflowsbatch semantics need several add-ons; more moving parts to debugcluster-wide fairness and quotas; another runtime to operate

How each system expresses each scheduling idea of section 2 (backfill, fairshare, preemption, gang, quotas, placement) is one table in the Scheduling lab, section 8.

The training code is identical in all three, and so is the result: the global loss agreed bit for bit at all 21 logged steps on Slurm, Kubernetes and Ray (step 200: 2.2638769149780273) measured (src/data/runs/compare.json). Only who starts the processes and how they learn each other's address changed: c1 from Slurm's node list, a pod DNS name from JobSet, an IP chosen by Ray. That difference is section 4.

The same training job, submitted three ways: the real job files and what each system printed
#!/bin/bash
# The running example on Slurm: 2 nodes x 2 ranks. One torchrun per node (srun starts them), c10d rendezvous
# on the first node of the allocation. Submit as a lab user: su alice -c "sbatch /shared/jobs/train.sbatch"
# Extra arguments go to train.py, e.g. sbatch train.sbatch --steps 400 --step-sleep-ms 50. RUN names the output dirs.
#SBATCH --job-name=mi-train
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=2
#SBATCH --gres=gpu:2
#SBATCH --time=00:10:00
#SBATCH --output=/shared/out/%x-%j.out
#SBATCH --requeue
set -euo pipefail
export MASTER_ADDR=$(scontrol show hostnames "$SLURM_JOB_NODELIST" | head -n1)
export MASTER_PORT=29500
RUN=${RUN:-slurm-$SLURM_JOB_ID}
echo "job $SLURM_JOB_ID nodes $SLURM_JOB_NODELIST master $MASTER_ADDR:$MASTER_PORT restart ${SLURM_RESTART_COUNT:-0}"
srun --kill-on-bad-exit=1 torchrun --nnodes="$SLURM_NNODES" --nproc-per-node=2 \
  --rdzv-backend=c10d --rdzv-endpoint="$MASTER_ADDR:$MASTER_PORT" --rdzv-id="$SLURM_JOB_ID" \
  /opt/mi/train.py --ckpt-dir "/shared/ckpt/$RUN" --log-dir "/shared/logs/$RUN" "$@"
job 1 nodes c[1-2] master c1:29500 restart 0

$ sacct (one line per job)
JobID|JobName|User|Account|Partition|State|ExitCode|Submit|Eligible|Start|End|Elapsed|NodeList|AllocTRES|TotalCPU|MaxRSS|
1|mi-train|alice|teama|batch|COMPLETED|0:0|2026-10-16T01:10:20|2026-10-16T01:10:20|2026-10-16T01:10:21|2026-10-16T01:10:31|00:00:10|c[1-2]|billing=5,cpu=4,gres/gpu=4,node=2|00:31.938||

rank 0 at start: host c1, world 4, local_rank 0
env {
 "master_addr": "c1",
 "master_port": "35789",
 "group_rank": "0",
 "local_world_size": "2",
 "torchelastic_restart_count": "0",
 "slurm_job_id": "1",
 "slurm_procid": "0",
 "slurm_nodeid": "0"
}
rank 0 at the end: step 200, global loss 2.2638769149780273

src/data/slurm/train.sbatch, submitted with sbatch on Slurm 24.11.5 (the Debian 13 package; upstream is at 26.05.5) in containers (3 nodes, fake GPUs counted but not used). Output: the script's first line, sacct's record, and what rank 0 logged. torchrun's c10d rendezvous met at port 29500, then gave the workers a fresh store port, hence master_port 35789.

Who runs what at frontier scale (dated evidence)

There is no census of training clusters; the honest evidence is what operators say about their own runs. The largest labs mostly run their own schedulers or heavily extended Kubernetes; Slurm dominates supercomputers and the GPU clouds that rent clusters for training; Ray sits on top as a runtime, notably for reinforcement learning.

WhoWhat they runSource
Meta (Llama 3)MAST, Meta's own global training scheduler, which also decides which data centre a job runs inpublished Llama 3, Jul 2024; MAST, OSDI 2024
Google (Gemini)TPU SuperPods driven by JAX and Pathways, "a single Python process to orchestrate the entire training run"published Gemini report §3, Dec 2023
OpenAIKubernetes clusters of up to 7,500 nodes, one pod per node, MPI inside the job, a gang-scheduling plugin; and Ray, "to train our largest models"published OpenAI, Jan 2021; Ray quote from a 2022 talk as reported by Anyscale, which sells Ray vendor (Anyscale)
DeepSeekHAI Platform, its own time-sharing scheduler that interrupts jobs and resumes them from checkpointspublished Fire-Flyer AI-HPC, Aug 2024
Ai2 (OLMo 2)Beaker, "a custom workload management system", containerised, across its own and Google Cloud clusterspublished OLMo 2 §6, Dec 2024
SupercomputersSlurm on "more than half" of the top 10 and top 100 TOP500 systems; NVIDIA bought Slurm's developer SchedMD in December 2025 and says Slurm stays open sourcevendor NVIDIA, Dec 2025
GPU cloudsrated on both managed Slurm and managed Kubernetes, with separate checklists for each, including Slurm running on Kubernetes (Slinky)independent SemiAnalysis ClusterMAX 2.0, Nov 2025
RL frameworksOpenRLHF: "the first RLHF framework built on Ray + vLLM"; verl is the open version of HybridFlow, whose "centralized single controller is built on top of Ray"project's own (OpenRLHF README; HybridFlow paper, EuroSys 2025; verl)
Go deeper: Slurm from zero (the daemons, a job's life, steps, limits, both scheduler loops, priority, preemption, containers, the multi-node job file), Kubernetes for ML (the control loop, Jobs, the scheduler, device plugins and DRA, RDMA in a pod, gangs, Kueue, JobSet, operators, serving objects) and Ray (tasks, actors, objects, ownership, placement groups, failures, Data, Train, Serve, KubeRay). The Tool map dates every scheduler, launcher and platform.

4. Launching a distributed job and finding peers

The scheduler hands over nodes; the training script needs one process per GPU, each knowing who it is and how to reach the others. Four numbers say who a process is: its rank (0 to W−1), the world size W, its local rank (its index on its node, which picks its GPU) and its node's index. A launcher starts the processes and hands them those numbers as environment variables (RANK, WORLD_SIZE, LOCAL_RANK): torchrun runs once per node and starts and restarts its workers; Slurm's srun starts tasks on every node and sets SLURM_PROCID and the node list; a Kubernetes indexed Job or JobSet gives each pod an index and, through a headless service, a stable DNS name; Ray Train starts worker actors and sets everything itself.

Rendezvous is how they meet: everyone is told one address, MASTER_ADDR:MASTER_PORT, where PyTorch's TCPStore (the "c10d store") collects each rank's details, and nobody proceeds until all W have arrived. Then init_process_group builds the process group that collectives run on: gloo on CPUs (this page's running example), NCCL on NVIDIA GPUs, which shares a unique id through the same store and then builds its own rings and trees. A launch that goes wrong almost always hangs rather than crashes, because the ranks that arrived wait for the ones that did not; how long they wait is set by timeouts, not by the fault.

The same job started three ways: the start-up chain is a few seconds, a missing node costs up to fifteen minutes

SlurmKubernetes (JobSet)Ray Train
Who starts the processessrun starts one torchrun per nodeone pod per node, each running torchrunRay Train's controller starts worker actors
How they find rank 0first host of $SLURM_JOB_NODELIST; torchrun's dynamic (c10d) rendezvouspod 0's DNS name through the headless service; static rendezvousRay picks rank 0's IP and a free port, then env://
Submit to first finished step (median of 5)7.5 s5.8 s10.0 s
One node never arrivessilence, then at 602 s a bare RendezvousTimeoutErrorat 903 s: DistStoreError: Timed out after 901 seconds waiting for clients. 1/2 clients joined.never fails: "worker group startup timed out after 60.0 seconds", retried every 60 s (13 attempts in about 12 minutes, stopped by hand)
Timeout that decides itc10d rendezvous, 600 sstatic rendezvous, 900 s as torchrun fills it inworker-group start, 60 s, with retries

The running example, 2 nodes × 2 ranks, the image already on every node measured on Apple M1 Pro, Docker Desktop VM, shared machine, 16 October 2026. Every waiting process held its CPUs (and fake GPUs) the whole time. On a real cluster, pulling a multi-gigabyte image to every node is often the longest stage, and at thousands of GPUs the whole chain is paid again on every restart (section 5). Defaults in torch 2.14.1: 30 minutes for a gloo process group and 10 for NCCL (ProcessGroupNCCL.hpp line 159).

Where the seconds went, stage by stage (medians of five runs)

By stage (medians, which need not add up to the median total): Slurm 0.7 s from sbatch to the batch script, 1.3 s for torchrun to import, 1.1 s of c10d rendezvous (the dynamic backend polls once a second), 2.5 s to spawn the workers and import torch, 0.01 s for init_process_group, 2.0 s for data, model and the DDP wrapper; Kubernetes 0.9 s for Kueue admission, scheduling and container start, 1.9 s of torchrun imports, 0.03 s of static rendezvous, 1.1 s of worker start, 1.3 s of data, model and DDP; Ray 1.6 s for the driver to import Ray, then 4.4 s for Ray Train's controller, placement group and worker processes, 0.9 s until the worker actors were ready, 0.3 s for the process group and 2.0 s for data, model and DDP. Pulling the image is not in these numbers; on a real cluster a multi-gigabyte image pulled to every node is often the longest stage, which is why images are cached on nodes.

Each system's timeline stage by stage, the real environment each one hands a process, and every broken launch with its real symptom are the Launch lab. The mechanisms behind them belong to one child: torchrun's agent and its exit codes, the rendezvous state machine, NCCL's start-up, every timeout on one axis, and how to find the one rank that is different in a hang.

Go deeper: Launching distributed training: torchrun, rendezvous, NCCL and hangs: one launch on two nodes timed link by link (Fig. 1), the agent (section 3), static and dynamic rendezvous replayed on the same arrivals (section 4), NCCL's start-up (section 6), timeouts (section 7), hang debugging (section 8, Fig. 3), its Launcher variables tab. PyTorch's side (c10d, DDP, FSDP2, the flight recorder) is Distributed PyTorch.

5. Failures and how runs survive them

A synchronous job is a chain as strong as its weakest GPU: when one GPU, cable, switch, host or process fails, every rank stops at the next collective. Parts fail rarely, but a big job holds many of them. Meta's Llama 3 405B pre-training had 419 unexpected interruptions in 54 days on up to 16,384 H100s, about 78% of them confirmed or suspected hardware, and still kept "higher than 90% effective training time" (Llama 3 §3.3.4, Table 5) published: one stop every 3.1 hours derived: 54 × 24 / 419. If each GPU (with its share of host and network) fails independently, a job's mean time between failures (MTBF) falls as 1/N:

Checkpoint and restart is the base defence: every so often all ranks save model, optimiser, data-loader and random-number state (a checkpoint); after a failure the job restarts from the last one, losing the work since then plus the restart time, and paying for every write even when nothing fails. How often to write is a trade-off with a classic answer (Young's interval, about √(2 · C · MTBF) for a write time C), derived with its exact form and a simulator on Power, cooling, reliability, section 6. Each other defence removes one part of the lost time:

  • Make checkpoints cheap. Asynchronous checkpointing copies state to host memory in seconds and writes it out while training continues; DeepSeek checkpoints "typically every 5 minutes" (Fire-Flyer §VII-A); Google kept "redundant in-memory copies of the model state" for Gemini Ultra and raised the largest job's goodput "from 85% to 97%" (Gemini §3) published.
  • Make restarts fast. Hot spares (Gemini held back TPU cubes "for hot standbys and rolling maintenance"), images cached on nodes, restarting only the failed part where the framework allows.
  • Keep bad nodes out. A health check runs before or between jobs; a failing node is drained (Slurm) or cordoned and tainted (Kubernetes) so nothing new lands on it. Ai2's Beaker "cordons the associated host and reschedules the workload" (OLMo 2 §6.3); OpenAI's nodes join with a "preflight" taint that only passing GPU tests remove.
  • Shrink instead of stopping. Elastic training continues on fewer workers, which changes the global batch or the data order unless the code compensates; most large pre-training restarts at full size.
  • Watch for slow, not just dead. A straggler (a hot, throttled GPU, a flapping link) slows every synchronous step to its pace without failing anything.

Ten times the GPUs, a tenth of the time between stops

1,000 GPUs51 h
16,384 GPUs (Llama 3)3.1 h
100,000 GPUs30 min

derived: MTBF = 3.1 h × 16,384 / N, Llama 3's rate scaled with GPU count (roughly but not exactly true: some causes are per job or per switch). Bars on a linear scale. Meta's 2026 report on a recurring job of about 32K GPUs counts 678 interruptions with GPU HBM3 memory now the largest cause, 2.3 interruptions per 1,000 servers per day and 95 to 97% effective training time (arXiv 2602.00277) published; Fault tolerance at scale, section 1, sets the two tables side by side and checks the paper's own "every 18 minutes at 100K GPUs" against its rate.

The same failures on three systems: the crash is seen at once, the policy decides the rest

SlurmKubernetes (JobSet)Ray Train
A rank crashes (exit code 13)job FAILED; --requeue does not cover a program error. torchrun --max-restarts retries inside the job, but failed twice with default settings; with TORCH_DISABLE_SHARE_RDZV_TCP_STORE=1 it resumed in 3.4 sfails unless failurePolicy.maxRestarts > 0; with retries every pod was recreated and the run resumed in 10.3 sfails unless FailureConfig(max_failures) > 0; with retries a new worker group resumed in 10.2 s
A machine is lostnode DOWN after 32.1 s of missed heartbeats, job requeued and restarted on the spare node: resumed after 166 s, no person involveda silent node blocked the restart: the pod on it never finished terminating, and the default 300 s eviction did not help; an operator's out-of-service taint freed it at 445 snode declared dead after 30 s; the worker group needs four slots and only two existed, so it waited until the node came back

The running example, checkpointing every 50 steps and failing after step 120: every resumed run restarted from step 100 and redid 20 steps measured, 16 October 2026. All twelve runs, replayable step by step from their logs, are the Failure lab, with the words each system uses for detection, retries and health checks.

Go deeper: Fault tolerance at scale: failures, checkpoint/restart and elastic training owns the subject: published failure tables (section 1 and its Failure taxonomies tab), detection timers (section 3), checkpointing strategies (section 4, its Fig. 1), recovery designs (sections 5 and 9; losing a node and shrinking is its Fig. 2), restore traps (6), silent data corruption (7), stragglers (8), goodput (9). The checkpoint interval and the hardware causes (Xid errors, ECC) are Power, cooling, reliability, sections 5 and 6.

6. Storage: where data and checkpoints live

The tiers, fastest and smallest first: GPU memory; the node's RAM; its local NVMe disks (fast, but gone with the node); a parallel file system shared by all nodes (Lustre, IBM Storage Scale, WEKA, VAST, DeepSeek's 3FS), which spreads each file over many servers so thousands of clients can read and write at once; and object storage (S3, Google Cloud Storage, or an S3-compatible store on premises), cheapest and nearly limitless but slower per request and with no in-place edits. NFS is fine for home directories and code and a common bottleneck for anything else. The tiers of one scalable unit are drawn in Cluster anatomy's Fig. 4.

Training does two very different kinds of I/O. Reading data is a steady stream of large reads, easy to hide behind compute with prefetching (formats, shards and streaming loaders are Storage and loading at scale's). Writing a checkpoint is a burst: every rank writes at the same moment while the GPUs wait. With mixed-precision Adam a checkpoint holds about 14 bytes per parameter, so a 70B model's is about 0.98 TB and writing it in a minute needs about 16 GB/s of aggregate write bandwidth derived. Three habits follow: shard (every rank writes its own piece, as PyTorch's Distributed Checkpoint does), stage (copy to host RAM or local NVMe in seconds and upload in the background) and keep files big (millions of small files overload the metadata servers long before the bandwidth runs out).

The same checkpoint on four tiers: the storage, not the file, sets the stall

Mac's own SSD0.20 s
Docker volume0.39 s
S3 store (SeaweedFS)2.61 s
Shared host folder7.31 s

A 304 MB checkpoint written with fsync, medians of 4 to 5 measured on Apple M1 Pro, Docker Desktop VM and native, shared machine. On the slow folder, asynchronous checkpointing cut the time training stood still per checkpoint from 1.81 s to 78 ms. The running example's own 1.39 MB checkpoint (1,386,049 bytes: fp32 weights plus AdamW's two moments) took a median 4.3 ms on a Docker volume (Slurm) and 155 ms on the host folder kind shares into the VM: 36 times slower, same file. Every tier, with the calculator from this laptop to 16,384 GPUs, is the Storage lab.

A demonstration rack holding, from the top, two 100 Gb Ethernet network switches, one all-flash storage system and five DGX-1 GPU servers
Shared storage is a box on the network, not a disk in the node. Top to bottom: two 100 Gb Ethernet switches, one all-flash storage system, five DGX-1 GPU servers. Every checkpoint byte a GPU server writes crosses those switches to that box, so the box's aggregate bandwidth, not its capacity, is what a checkpoint burst meets. (A 2018 NetApp demonstration rack.)Photo: Qdrddr, NetApp ONTAP AI, CC BY-SA 4.0, cropped and resized.
Storage that operators built for the checkpoint burst (published)

A 405B model's checkpoint at the same 14 bytes per parameter is about 5.7 TB, about 94 GB/s to write in one minute derived. What operators built:

  • Meta's Tectonic for Llama 3: 240 PB on 7,500 SSD servers, 2 TB/s sustained and 7 TB/s peak, built for checkpoint bursts of 1 MB to 4 GB per GPU (Llama 3 §3.3.1).
  • DeepSeek's 3FS: 8 TB/s of aggregate reads across its cluster (Fire-Flyer §VI-B).
  • Ai2: a WEKA cluster measured at 761 Gbps read/write with 64 clients on one cluster, and Google Cloud Storage "up to 1 GB/s per VM" on the other (OLMo 2 §6.1).

All published by the operators about their own systems. The 14 bytes are an assumption (bf16 weights 2, fp32 master weights 4, Adam's two moments 4 and 4); layouts vary.

Go deeper: Storage and data movement: parallel file systems, object storage and checkpoint I/O: the storage ladder (its hero), how Lustre stripes a file (section 2, its Fig. 1), the metadata storms (section 4), object storage semantics (5), caches (6), staging and checkpoint paths with the measured synchronous against asynchronous write (7, and Fig. 4, one checkpoint written four ways), checkpoints as byte ranges (8), sizing storage for a cluster (9), and its Sizing calculator. File systems from the kernel side (page cache, fsync) are Storage and file systems.

7. Cost and meters: where the GPU-hours go

A run is paid in GPU-hours whatever happens inside them. Follow one paid GPU-hour down to useful arithmetic and every section of this page reappears as a loss, each measured by a different meter:

  1. Paid but not allocated: GPUs given to no job (fragmentation, a big job waiting for enough nodes, gaps backfill could not fill). The ratio allocated over paid is scheduling efficiency, read from the scheduler's own accounting.
  2. Allocated but not training: image pulls, rendezvous, checkpoint loads, restarts, steps redone since the last checkpoint, time blocked writing checkpoints. What remains is goodput, the share of time that became kept progress (Llama 3's "effective training time", Gemini's 85% to 97%).
  3. Training but not using the chip: communication, memory traffic and small kernels keep the step below peak. MFU (model FLOPs utilisation) is the model's useful FLOPs per second over the chip's peak; Llama 3 405B ran at 38 to 43% BF16 MFU (Llama 3 Table 4) published. How to count it is Performance math's.

Scheduling efficiency on the three local clusters failed three different ways measured: Slurm's eight-job queue kept 71% of its 8 GPUs' time allocated under FIFO and 80% with backfill; Kubernetes without gang admission held all 12 GPUs for 246 s with no step run, while Kueue fixed that and could fill at most 67% of the quota with 8-GPU jobs (section 2); Ray's placement groups waited holding nothing. The Cost lab turns those losses, failures and checkpoints into money with a run-cost calculator whose every assumption is sourced; the cost of a GPU-hour and of a training token by purchase model is Observability and cost, section 10 (its chart).

Losses multiply: 90% goodput at 40% MFU uses 36% of what was paid for

Paid GPU-hour100%
Kept progress (goodput 90%)90%
Useful FLOPs (MFU 40%)36%

derived: 0.9 × 0.4 = 0.36, round numbers near Llama 3's published goodput and MFU, assuming every paid hour was allocated. Each meter reads only its own loss: nvidia-smi's "utilisation" counts any kernel running, so a GPU spinning inside a collective, waiting for a slow peer, reads busy; what each GPU counter really counts is Observability and cost, section 2.

Go deeper: Observability and cost: GPU metrics, goodput, utilisation and capacity planning: the meters from the bill to the training log (its hero; one H100 read by three meters is its Fig. 1), the GPU counters (section 2), where the allocated seconds went (Fig. 2), MFU logging (4), goodput metering (5), Prometheus exporters and their cost (6), alerts on hangs and stragglers (7), scheduling efficiency (8), chargeback (9), cost per GPU-hour and per token (10), with its Cluster dashboard and Capacity planner. Goodput's definitions are Fault tolerance at scale, section 9; general metrics, logs and traces are Observability.

8. ML platforms: the loop around the jobs

A scheduler runs one job; a team runs thousands and must know which code, data and settings produced which checkpoint, which checkpoint became which model, and how to rerun any of it. Three kinds of tool do this, usually on top of Slurm or Kubernetes rather than instead of them: experiment tracking (every run's configuration, metrics and artefacts in one searchable place: MLflow, Weights & Biases), workflow or pipeline engines (a graph of steps such as prepare, train, evaluate, register, with retries and caching: Airflow, Kubeflow Pipelines, Flyte, Metaflow, Prefect, Dagster) and model registries (named, versioned models with lineage and an alias such as "champion"). A training team's minimum is a tracker and a registry; a pipeline engine pays off once the same multi-step process runs often enough that doing it by hand causes mistakes. Managed clouds bundle all three with the cluster.

Go deeper: ML platforms and workflows: pipelines, experiment tracking and model registry: workflows and resume (sections 2 and 3), the engines compared (4), tracking (5), the registry and aliases (6), lineage (7), reproducing a run bit for bit (8), feature stores (9), managed platforms, SageMaker training jobs against HyperPod (10), and its Tool chooser. Who bought or shut down which tracker is in the Tool map.

9. Choosing

The scheduler matters less than people argue: every large operator extends whatever it chose with health checks, fast restarts and storage sized for checkpoints (section 3's dated evidence). Choose by what else the cluster must do and who will use it.

Your situationStart withWhy
A fixed bare-metal GPU cluster, mostly big training runs, researchers used to HPCSlurm (managed by the provider, or Slurm on Kubernetes)queues, backfill, fairshare and gang allocation out of the box; one script per job; the least to debug
A platform team already running Kubernetes for serving and pipelines, or elastic cloud capacityKubernetes with Kueue and JobSet (and the Kubeflow Trainer)one control plane for every workload; quotas and borrowing across teams; containers everywhere
A job made of many cooperating programs: RL with rollout workers and inference engines, data processing, hyperparameter searchRay, on Kubernetes through KubeRaytasks, actors and an object store make the program itself distributed; Kubernetes and Kueue still handle teams and quotas
A few nodes, one teamtorchrun over SSH, or Slurm on the nodesa scheduler pays off once people queue for the same GPUs

Whatever the choice, the same five things decide whether 1,000 GPUs do useful work: gang admission (no partial jobs), health checks with automatic draining, checkpoints that are sharded and asynchronous, storage sized for the checkpoint burst, and meters for goodput and MFU, not just utilisation.

Depth: four mistakes that cross the children
Trusting the default timeouts, or setting them too short
At 30 minutes (gloo) or 10 minutes (NCCL) a hang burns that much of every GPU before anything fails; but a timeout shorter than your slowest legitimate wait (a first-step compile, a large synchronous checkpoint) kills healthy jobs. Set it on purpose, and add a watchdog on step progress. Know the two NCCL messages apart (torch 2.14.1, ProcessGroupNCCL.cpp): Watchdog caught collective operation timeout: ... ran for ... milliseconds before timing out. means a collective exceeded its timeout (a peer is missing or stuck); ProcessGroupNCCL's watchdog got stuck for ... seconds without making progress in monitoring enqueued collectives. means the watchdog thread itself hung (often a stuck CUDA or NCCL call), after 480 s by default (TORCH_NCCL_HEARTBEAT_TIMEOUT_SEC).
A checkpoint that restores the model but not the run
Without the optimiser state, the learning-rate scheduler step, the data loader's position and the random-number generators, a resumed run sees different data and its loss jumps. Save all of them, and test a restore before you need one. Measured in the Failure lab: seven resumed 4-rank runs on three schedulers all continued the same trajectory, matching the uninterrupted loss at 8 of 10 logged steps and differing at two by one float32 rounding step, because DDP rebuilds its gradient buckets after a process's first step; with 2 ranks, or with the rebuild switched off, resume was bit-exact.
Checkpoints only on node-local disk, or gathered on rank 0
Local disk dies with the node it was meant to protect against; gathering everything on rank 0 is slow and can run that rank out of memory. Stage locally if you like, but upload, and shard the write across ranks.
Elastic restarts that silently change the experiment
Continuing on fewer workers changes the global batch size (or the steps per epoch) unless the code compensates; torchrun also reassigns ranks between restarts, so code that assumed a fixed rank-to-data mapping reads the wrong shards.

The other classic mistakes are taught where they happen: a time limit that blocks backfill (Slurm from zero, section 6), multi-pod training on plain Kubernetes (section 2 here and Kubernetes for ML, section 7), a rendezvous address that works on one node only (Launching distributed training, section 9), a restart onto the same broken node (Fault tolerance at scale, section 3), and reading 100% utilisation as efficiency (section 7 here).

Depth: interview rehearsal across the topic
Design the training platform for a 1,000-GPU lab: scheduler, storage, failure handling, cost controls.

Shape: 125 nodes of 8 GPUs, NVLink inside, one 400 Gb/s NIC per GPU on a rail-optimised fabric, a separate front-end network. Scheduler: Slurm with fairshare and QOS if most work is large training by researchers; Kubernetes with Kueue (team ClusterQueues in a cohort, borrowing, preemption) and JobSet if the lab also serves models and runs pipelines; either way gang admission and topology-aware placement, and a low-priority preemptible queue that soaks up idle GPUs. Failures: at Llama 3's rate a 1,000-GPU job stops about every 51 hours; with a 1-minute blocking checkpoint, Young gives about 78 minutes between checkpoints and about 3% loss with 10-minute restarts derived. Add asynchronous checkpoints, preflight and periodic health checks with automatic drain, a few spare nodes, and automatic requeue. Storage: a parallel file system sized for the checkpoint burst (a 70B model is about 1 TB, so about 16 GB/s to write it in a minute), object storage for datasets and old checkpoints, local NVMe for staging. Cost: per-team quotas, dashboards of allocated against idle GPUs, goodput and MFU per job, alerts on step time and on GPUs allocated but idle.

Slurm or Kubernetes for training?

Slurm gives batch semantics (queue, backfill, fairshare, all-or-nothing allocations) for free and is simplest for big synchronous jobs on a fixed cluster. Kubernetes gives one platform for everything and an ecosystem, but needs Kueue or Volcano and JobSet to behave like a batch system. The deciding question is what else must run on the cluster and who operates it. Both are used at frontier scale (section 3).

Why does distributed training need gang scheduling?

Synchronous training cannot start until all ranks exist; a partly started job holds GPUs and does nothing. Two partly started jobs can each wait forever for GPUs the other holds: a deadlock (section 2's figure). All-or-nothing admission prevents both.

How often should a 16,000-GPU run checkpoint?

Estimate the job's MTBF (Llama 3: about 3.1 hours on 16,384 GPUs) and the blocking write time C; Young's √(2CM) gives about 19 minutes for C = 1 minute. Then make C smaller (asynchronous, in-memory copies) because the loss falls with √C, and make restarts faster because each one costs the restart time on top. The exact interval and where Young breaks are Power, cooling, reliability, section 6.

Goodput against MFU?

Goodput is the share of paid time spent making progress (lost to queues, launches, failures, checkpoints); MFU is how much of the chip's peak the progress uses while it runs. Cost per useful FLOP is the product of both: 90% goodput at 40% MFU uses 36% of what you paid for (section 7).

The rehearsal for one subject sits on its child: a job stuck at init (Launching distributed training, section 11), a job pending for hours (Slurm's Why pending? tab), one slow GPU (Fault tolerance at scale, section 8).

10. Child pages

Each owns one subject in depth, built around the same running example. Times are each page's Reading tab as its header states it on 12 November 2026.

Cluster anatomy: nodes, GPUs, networks and storage tiersOne GPU node part by part, scale-up racks, the four networks, the control nodes and a job stepped onto the machines, rack to cluster and placement, storage tiers and power at cluster level.Child page, about 26 min, plus 10 in closed details. Tabs: Cluster explorer, Sizing calculator.
Slurm from zero: allocation, gang scheduling, fairshare and preemptionThe daemons, a job's life from the controller's own log, steps, limits, the main loop and backfill, multifactor priority reproduced exactly, preemption and requeue, reservations, accounting, containers.Child page, about 35 min, plus 16 in closed details. Tab: Why pending?
Kubernetes for ML: scheduling, device plugins, gang scheduling and operatorsThe control loop, Jobs and failure policies, scheduler scoring, device plugins, the GPU Operator and DRA, RDMA in a pod, gangs, Kueue, JobSet, Trainer v2 and KubeRay, serving objects.Child page, about 39 min, plus 18 in closed details. Tab: Manifest builder.
Ray: tasks, actors, the object store and Ray TrainTasks, actors, objects and ownership, the GCS and raylets, placement groups, what survives a crash, Ray Data, Ray Train, Ray Serve, Tune and KubeRay.Child page, about 35 min, plus 9 in closed details.
Launching distributed training: torchrun, rendezvous, NCCL and hangsThe launchers, torchrun's agent and exit codes, static and dynamic rendezvous, the workers' store between attempts, NCCL's start-up, every timeout, hang debugging, containers and networks, bring-up.Child page, about 38 min, plus 13 in closed details. Tab: Launcher variables.
Fault tolerance at scale: failures, checkpoint/restart and elastic trainingFailure rates as they hit a job, five failure shapes, detection timers, checkpointing strategies, recovery designs, restore traps, silent data corruption and stragglers measured, goodput.Child page, about 42 min, plus 27 in closed details. Tab: Failure taxonomies.
Storage and data movement: parallel file systems, object storage and checkpoint I/OLustre striping and metadata storms on a toy file system, other designs including 3FS, object storage semantics, caches, staging and cross-region movement, checkpoints as byte ranges, sizing.Child page, about 50 min, plus 18 in closed details. Tab: Sizing calculator.
Observability and cost: GPU metrics, goodput, utilisation and capacity planningSeven meters from the bill to the training log, what each GPU counter counts, MFU and goodput metering, Prometheus and alerts, scheduling efficiency, chargeback, cost per GPU-hour and per token.Child page, about 28 min, plus 7 in closed details. Tabs: Cluster dashboard, Capacity planner.
ML platforms and workflows: pipelines, experiment tracking and model registryWorkflows and resume, the engines compared, tracking, registry and aliases, lineage, reproducing a run, feature stores, managed platforms with SageMaker jobs against HyperPod, on a real MLflow server and Metaflow flow.Child page, about 34 min, plus 11 in closed details. Tab: Tool chooser.