Design an ML Training Platform
Run training jobs from one GPU to 8,192 on a shared 16,384-GPU cluster: each starts whole or not at all and survives hardware failure.
Last updated 2026-11-14. Difficulty: hard. Patterns: gang-scheduling, checkpointing, fair-share, preemption, gpu-clusters. Reported at OpenAI, Anthropic, Meta, Google, Nvidia, Databricks.
An AI mock is timed like the real round, out loud or typed, and ends with a debrief scored for your level. Practice with AI, in every pass, has no clock and the AI Mentor beside you. Or watch a sample interview first.
Or sit it in the style of OpenAI · Anthropic · Meta · Google, run as that company’s round is reported to go.
The short answer
How to design an ML Training Platform in a system design interview, in five steps:
- Scope it. Submit a training job, gang start with topology-aware placement, quotas, priorities and fair share across teams, checkpoint and automatic restart, feed the accelerators, experiment tracking with lineage, model registry, hardware health and stragglers.
- Set the targets. Cluster and workload scale: 16,384 GPUs · ~10 k jobs/day; Goodput of large runs: ≥ 95 % of allocated GPU-time; Cluster utilisation: ≥ 90 % of GPUs allocated; Recovery from a failure: detect < 1 min · training again < 5 min.
- Do the numbers. Cost of an idle hour: ~$33 k for the cluster; Time between failures of the 8,192-GPU job: ~6 h (≈ 4 a day); Checkpoint size: ~5.6 TB.
- Draw the design. Job API, Job & cluster store, Gang scheduler, Node agents × 2,048, Training ranks, Telemetry stream, Health monitor, DC ops / repair, Local checkpoints.
- Go deep where it is hard.
- Gang scheduling and topology-aware placement → All-or-nothing gang bind on whole blocks, with reservations and backfill.
- Quotas, fair share and preemption → Guaranteed quotas, borrowing of idle quota, reclaim by preemption, fair share among borrowers.
- Checkpoints: how often, where, and how fast back → Asynchronous two tiers: snapshot to host RAM every 10 min, partner copy, durable upload every 30 min.
- Keeping the accelerators fed → Versioned shards in object storage, deterministic streaming loaders, NVMe read-through cache with read-ahead.
- Experiment tracking, lineage and the registry → Tracking service (run metadata in SQL, metrics in a columnar store, artefacts by URI and hash) plus a registry of versions with lineage and stages.
- Failing hardware, stragglers and hot spares → Host and job telemetry, fast hang detection, cost-based straggler eviction, hot spares, burn-in before reuse.
Functional requirements
- Submit a training job. A container image by digest, a command, a size from 1 GPU to 8,192 (whole hosts above 8), the parallel layout, a dataset version and a maximum runtime. The researcher gets a job id, its state, and why it is waiting if it is.
- Gang start with topology-aware placement. All workers of a job start together or none do, on hosts close together in the network: tensor-parallel groups inside a host, pipelines inside one block of 32 hosts. A job that is half placed is worse than one still queued, because it holds GPUs and does nothing.
- Quotas, priorities and fair share across teams. Each of ~40 teams has a guaranteed quota it paid for. Idle quota can be borrowed by others; the owner can take it back within minutes by preempting borrowed jobs; borrowers share spare capacity by fair share over recent usage.
- Checkpoint and automatic restart. A platform library saves sharded training state often and cheaply, and the platform restarts a job from its latest checkpoint after a failure or a preemption without a human. A preempted job gets a grace period to save first.
- Feed the accelerators. Versioned datasets in a lake, streamed by sharded loaders that read in a reproducible order and resume exactly where they stopped, through a cache on local NVMe, so no GPU waits on I/O.
- Experiment tracking with lineage. Configs, metrics, logs, checkpoints and evaluation results per run, comparable across hundreds of runs, with every run linked to the exact data version, commit and image that produced it.
- Model registry. Named model versions that point at immutable checkpoints, with their lineage, eval reports, approvals and a stage. Registering pins the checkpoint so retention can never delete it; serving pulls a version from here.
- Hardware health and stragglers. Continuous host and job health checks, detection of slow GPUs and hung collectives, hot spares swapped in automatically, and a repair and burn-in loop so a bad host never rejoins a job untested.
- Out of scope. The model code and the parallelism library internals (the platform provides the rank map, checkpoint and data hooks), inference serving (the LLM inference design), data collection and cleaning, network and data-centre design, and training across regions.
Non-functional requirements
- Cluster and workload scale (16,384 GPUs · ~10 k jobs/day). 2,048 hosts of 8 GPUs, in 64 blocks of 32 hosts. Most jobs use 1 to 8 GPUs; a few use thousands for weeks; the largest, 8,192 GPUs for months. Scheduling decisions are few (about one a second at peak) but each can involve 1,024 hosts.
- Goodput of large runs (≥ 95 % of allocated GPU-time). The share of a job’s GPU-hours that produce progress it keeps, after checkpoint pauses, lost work and restarts. This is the requirement that drives the hardest trade-off: checkpoints, spare hosts and reservations all cost capacity, and goodput is what they buy.
- Cluster utilisation (≥ 90 % of GPUs allocated). At ~$2 per GPU-hour every 1 % is ~$2.9 M a year. Spares and reserved blocks must run preemptible work rather than sit idle.
- Recovery from a failure (detect < 1 min · training again < 5 min). About 8 hosts fail a day, and the 8,192-GPU job is hit every ~6 hours. Each idle minute of that job costs ~$270, so detection cannot wait for a 10- to 30-minute collective timeout and restarts cannot wait for repairs.
- Quota reclaim (owner has its GPUs < 15 min). A team asking for capacity it owns gets it within the preemption grace period plus a launch. Borrowing is only safe to allow because this bound holds.
- Start latency (≤ 8 GPUs < 2 min · 1,024 hosts < 15 min). Measured from capacity being available. Small debugging jobs must feel interactive; a big gang pays for pre-flight checks, image distribution and communicator setup on 1,024 hosts.
- Durability and lineage (committed checkpoints never lost · every model traceable). A committed checkpoint survives the loss of any host or rack. Every registered model names the exact dataset version, commit, image digest and config it came from.
- Data throughput (data wait < 2 % of step time). From ~5 MB/s for a text run to ~50 GB/s for an image job. A step runs at the pace of its slowest rank, so one rank waiting on a read stalls all of them.
Back-of-envelope estimates
- Cost of an idle hour: ~$33 k for the cluster. 16,384 GPUs × ~$2 per GPU-hour (amortised hardware and power) = $32,768 an hour, about $287 M a year. Every 1 % of utilisation is ~$2.9 M a year, and one idle minute of an 8,192-GPU job is ~$270. Every other trade-off in the design is priced in this unit.
- Time between failures of the 8,192-GPU job: ~6 h (≈ 4 a day). Meta reported 419 unexpected interruptions in 54 days of training on 16,384 GPUs (2,048 hosts), a host MTBF of ~6,000 h. A job on 1,024 hosts stops when any of them fails: 6,000 ÷ 1,024 ≈ 5.9 h. The whole cluster loses 2,048 ÷ 6,000 × 24 ≈ 8 hosts a day. Failure is the normal state of a large job, not an exception.
- Checkpoint size: ~5.6 TB. 400 B parameters × 14 B (bf16 weights 2, fp32 master copy 4, Adam’s two moments 4 + 4) = 5.6 TB. Sharded over 8,192 ranks that is ~680 MB per GPU and ~5.5 GB per host, small next to a host’s 2 TB of RAM. Written synchronously to shared storage at 100 GB/s it stalls every GPU for 56 s.
- Best checkpoint interval: ~27 min sync · 5 to 10 min async. Young’s approximation: interval ≈ √(2 × checkpoint cost × MTBF). Synchronous, √(2 × 60 s × 21,600 s) ≈ 1,600 s, about 27 min, and the overhead is ~7.5 % (half stalls, half lost work). A 2 s snapshot to host memory gives √(2 × 2 × 21,600) ≈ 290 s; the curve is flat, so every 10 min costs only ~1.7 %.
- Cost of one failure: ~$11 k naive · ~$2.5 k designed. Naive: half a 30-minute interval lost (15 min) plus a 25 min restart (collective timeout, waiting for a host, reload from shared storage) = 40 min × 8,192 GPUs ≈ 5,460 GPU-h ≈ $11 k. Four a day is $44 k and 11 % of the run. With 10-minute snapshots (5 min lost on average) and a 4 min restart onto a spare: 9 min ≈ $2.5 k.
- Data the GPUs read: ~5 MB/s text · ~50 GB/s images. Text: 6 × 400 B ≈ 2.4 TFLOP per token; at ~400 TFLOP/s per GPU (40 % of peak) that is ~170 tokens/s per GPU, 1.4 M tokens/s for 8,192 GPUs, × 4 B ≈ 5.5 MB/s. Images: 1,024 GPUs × 500 images/s × 100 KB ≈ 51 GB/s. For text the loader’s problem is order and resumability, not bandwidth; for images it is bandwidth.
- Checkpoint bytes written per day: ~270 TB/day. 5.6 TB to object storage every 30 min = 48 × 5.6 ≈ 270 TB a day, 3.1 GB/s on average, from one job. Kept forever that is ~100 PB a year, so retention keeps the latest three (~17 TB) plus one a day and pins anything registered.
- Hosts out of service: ~24 · pool of ~40 spares. Little’s law: 8 failures a day × ~3 days through repair and burn-in = 24 hosts out at any moment. A pool of ~40 hot spares (2 % of the cluster) covers that plus bursts, and the spares run preemptible jobs, so they are not idle.
Components
- Researchers / SDK (CLI · notebooks · job SDK): About 1,000 researchers in 40 teams submit jobs, watch them and compare runs. The SDK is also the library inside every job: it wraps checkpointing, the data loader and metric logging, so those behave the same in every job instead of being rewritten by each team. Jobs name images by digest and datasets by version, never by mutable names.
- Job API (auth · quota · validation): Authenticates the user, resolves the image tag to a digest and the dataset name to a version, checks the request against the team’s quota and writes the job. Stateless; every write goes through it, so quota and policy live in one place. Submissions carry an idempotency key, because a retried submit of an 8,192-GPU job is an expensive duplicate.
- Job & cluster store (SQL · one txn per gang): Jobs, quotas, reservations, fair-share usage, and one row per host: its block, leaf and spine group, its state (free, allocated, spare, suspect, cordoned, in repair) and the job and allocation epoch it belongs to. Small (2,048 host rows) and transactional, because a gang bind must move 1,024 host rows at once or none. The scheduler is the only writer of allocations.
- Gang scheduler (gang · topology · fair share): Orders pending jobs by class, fair share and age, places each as a gang of whole hosts on whole blocks where it can, lays ranks out along the parallelism, and binds every host in one transaction or none. When a gang does not fit it reserves blocks and backfills around the reservation; it reclaims quota by preempting the borrowed jobs that lose the least work. It also performs host swaps after a failure.
- Node agents × 2,048 (pre-flight · launch · DCGM): One per host. Pulls the image, runs a pre-flight check before any rank starts, launches the eight ranks with their rank map and allocation epoch, and delivers preempt and snapshot signals. Exports GPU, NIC and fabric health every 10 seconds, and kills any rank whose epoch is older than the host’s current allocation.
- Training ranks (8 per host · NCCL · SDK): The job’s processes, one per GPU, running the team’s model code with the platform SDK. They rendezvous as one gang and synchronise every step through collectives over NVLink and the 400 Gb/s fabric, so the job runs at the speed of its slowest rank. Each reports its compute, data-wait and collective-wait time per step, which is what makes stragglers visible.
- Telemetry stream (Kafka · health + step timings): Two topics: host health from the agents (XID errors, ECC counts, clocks, link speeds) and per-step timings from every rank, under 1,000 messages a second for the largest job. Kept apart from the job store and from tracking because it is high-volume, short-lived data whose only purpose is detection.
- Health monitor (hangs · stragglers · burn-in): Turns telemetry into decisions: a job whose steps stopped for 3× its median, a rank 10 % slower than its job for 50 steps, a host reporting a hardware error. Asks the scheduler to replace hosts, decides when a straggler costs more than a restart, and moves hosts through suspect, cordoned, repair and burn-in. Built to notice in under a minute what a collective timeout would take 10 to 30 minutes to report.
- DC ops / repair (tickets · vendor RMA): The data-centre team and the hardware vendors: reseat or replace GPUs and boards, fix cooling and cables. A repair takes days, which is why jobs never wait for one and why the spare pool is sized from repair time. A repaired host comes back through burn-in, never straight into a job.
- Local checkpoints (host RAM · partner copy): Each host keeps its ranks’ latest snapshot in pinned memory (~5.5 GB of 2 TB) plus a copy of a partner host’s snapshot, the partner in another block and power domain. Most failures lose one host, so a restore reads the survivors’ own memory and the partner’s copy in seconds. It also stages the background upload to the durable store.
- Checkpoint store (object storage · manifest last): The durable tier: every third snapshot, uploaded as one object per rank shard and then a manifest written last, so only complete checkpoints are ever visible. Paths carry the job and allocation epoch, so an old attempt can never overwrite a newer one. Retention keeps the latest three and one a day, and anything registered or under evaluation is pinned.
- Dataset cache (host NVMe · read-ahead): A read-through cache on each host’s ~30 TB of NVMe, keyed by (dataset version, shard), that reads the next few shards ahead with large ranged GETs. Multi-epoch image jobs read the lake once and their own NVMe after that. A shared cache tier in front of the lake dedupes reads when many jobs train on the same version.
- Dataset lake (object storage · versioned shards): Training data as immutable dataset versions: a manifest of ~1 GB shards with checksums and sample counts, globally shuffled when the version is built. Immutability is what lets the cache keep shards without invalidation and lets lineage name exactly the data a model saw. Raw data and the pipelines that clean it live upstream and are out of scope.
- Experiment tracking (runs · metrics · artefacts): One record per run with its config, commit, image digest, dataset version and parent checkpoint, filled in by the platform at launch rather than typed by a researcher. Metrics (~30,000 points a second) go to a columnar store keyed by run, metric and step; checkpoints and eval outputs are registered as artefacts by URI and content hash. The SDK buffers, so tracking can be down without slowing a step.
- Model registry (versions · stages · lineage): Named models and their versions, each pointing at an immutable checkpoint by URI and hash, with its lineage, eval report, approvals and stage. Registering pins the checkpoint against retention. Serving resolves a name and stage to a version, so promotion and rollback are each one alias change.
User flows
- Start an 8,192-GPU pretraining run. The main write path. A job asks for 1,024 hosts at once; the scheduler finds whole blocks, binds every host in one transaction or none, and the job starts only when all 8,192 ranks have passed a pre-flight check and found each other.
- A researcher submits the run: image, command, 1,024 hosts of 8 GPUs, the parallel layout, the dataset and the checkpoint settings. The API resolves the image tag to a digest and the dataset name to a version now, so the run’s inputs are fixed before it starts. It checks the request against the team’s quota (the pretraining team’s 8,192 GPUs are guaranteed) and writes the job as queued. The run id is minted here and travels with the job, so lineage starts at submission.
- The scheduler takes the job in order of class, fair share and age, and checks whether 1,024 healthy hosts can be had. Guaranteed work comes first, then borrowed work in fair-share order. For this job it counts free healthy hosts and hosts held by borrowed jobs it may preempt; spares and cordoned hosts never count. If the total falls short it reserves future capacity instead of holding part of it (see the full-cluster flow).
- It chooses 32 whole blocks and lays the ranks out so each pipeline sits inside one block. Inside a host each GPU has ~900 GB/s of NVLink; between hosts it has one 400 Gb/s NIC, 18 times less, so tensor parallelism (8) never leaves a host. Each pipeline of 8 hosts passes activations every micro-batch, so it sits inside a block where every GPU is one switch hop from every other. Only the data-parallel gradient sync crosses the spine, and it overlaps with the backward pass.
- It binds all 1,024 hosts to the job in one transaction, conditional on each still being free and healthy, under a new allocation epoch. Either every host row moves to this job or none does: if one host was cordoned or taken a moment earlier, the whole bind aborts and is planned again. That is what prevents two big jobs each holding half of what they need and neither starting. The epoch goes on every rank and every checkpoint path, so nothing from an older attempt can write into this one.
- Node agents on the 1,024 hosts pull the image and run a 60-second pre-flight check. GPU health, NVLink, all eight NICs at full speed and a small all-reduce with the host’s block neighbours. A host that fails is replaced with a spare from the same block before any rank starts, because a bad host found later costs a restart of all 8,192 ranks. The 20 GB image is mostly cached on the hosts, and the rest is fetched from peers rather than by 1,024 pulls from the registry.
- Each agent starts eight ranks; the ranks rendezvous and build their communicators. Every rank gets its global rank, the rank map and the epoch from its agent. Rendezvous has a deadline: if one rank never arrives, the job fails fast and the scheduler swaps that host, rather than letting 8,191 ranks wait. Building communicators across 8,192 ranks takes a minute or two, a cost every restart pays again.
- Ranks load the starting weights, and their data loaders begin streaming shards through the dataset cache. Each rank reads only its own 680 MB shard of the state, all in parallel. Loaders work out their shard order from the dataset version, the seed and their rank, and start prefetching while the communicators are still being built, so the first step does not wait on a cold cache.
- Training starts; ranks send metrics to tracking and per-step timings to the telemetry stream. From submit to first step is about 10 minutes when the blocks are free: seconds to schedule, a minute of pre-flight, a few minutes of image and rendezvous, a minute to load weights. Metrics go through a buffered SDK, so a slow tracking service can never slow a step.
- Feed the GPUs, checkpoint, register a model. The steady state of a long run. Data must arrive faster than the GPUs consume it, the state must be saved often enough that a failure costs minutes, and the result must end up as a model version whose origins are on record.
- Each data-parallel rank works out which shards it reads from the dataset version, the seed, the epoch and its rank. No coordinator hands out data: the order is a pure function of those inputs, so every rank agrees without talking and a restart lands on exactly the next sample. Shards were globally shuffled when the dataset version was built; at run time the loader shuffles shard order per epoch and samples within a buffer of a few thousand.
- The loader streams its next shard from the host’s NVMe cache; a miss is filled from the lake with large ranged reads, a few shards ahead. A text run needs only ~5 MB/s in total, so the risk is latency, not bandwidth, and read-ahead keeps several shards local. An image job reading ~50 GB/s needs the cache for bandwidth too: the first epoch fills the NVMe and later epochs read locally at several GB/s per host.
- Every 10 minutes the ranks pause for about two seconds to copy their state to host memory, then carry on. Each rank copies its 680 MB shard of weights, optimiser state, RNG state and loader position into pinned host RAM. Only this copy blocks training; everything after it runs in the background. Two seconds every ten minutes is 0.3 % of the run.
- In the background, each host copies its snapshot to a partner host in another block. Most failures take out one host. With its snapshot already in a partner’s memory, the replacement restores in seconds instead of reading from object storage. Partners sit in different blocks and power domains, so one rack failing cannot take both copies.
- Every third snapshot, the hosts upload their shards to object storage, and the coordinator writes the manifest last. 5.6 TB every 30 minutes, uploaded at a capped rate so it never starves data reads. A checkpoint exists only once its manifest, listing every shard and checksum, is written; a crash halfway leaves orphan shards for garbage collection but never a half checkpoint that a restore could pick.
- The checkpoint is recorded on the run in experiment tracking, and milestone checkpoints are queued for evaluation. The run already carries the image digest, commit, config hash and dataset version from submission, so the checkpoint inherits its lineage. Evaluation of each daily milestone runs as small preemptible jobs, and the scores are attached to the checkpoint’s artefact id, not to a file name.
- A researcher compares runs and checkpoints by their evaluation scores and picks one. Comparison works because every run’s metrics are keyed by step in one store with its config alongside. Hundreds of runs from a sweep can be grouped by a config value, which is how a team spots the learning rate that diverged.
- They register the checkpoint as a model version; the registry records its lineage and pins it against deletion. The version points at the checkpoint by URI and content hash, never by a mutable path, and carries the eval report and the run’s lineage. Pinning means retention can never delete a checkpoint a registered model depends on. Promotion to production is a separate, approved stage change that moves an alias.
- A big run meets a full cluster. The scale case: a 1,024-host gang arrives while small and borrowed jobs fill every block. Holding hosts while waiting would idle GPUs and can deadlock, so the scheduler reserves blocks on paper, backfills around the reservation, and reclaims the team’s quota by preempting the borrowed jobs that lose the least.
- The pretraining team submits a new 1,024-host run; only 300 hosts are free, scattered over 40 blocks. The team is inside its guaranteed 8,192 GPUs, but while its last run was finishing other teams borrowed that capacity: about 750 hosts run borrowed jobs. A per-pod scheduler would start binding the 300 free hosts and sit on them, idle, at ~$4,800 an hour.
- The scheduler plans instead of grabbing: it picks the 32 blocks it can clear soonest and reserves them for the job. For each block it estimates when it could be empty: now for free hosts, a grace period for borrowed jobs it may preempt, and the declared max runtime for other teams’ guaranteed jobs, which it may not. It prefers blocks that are mostly free or mostly borrowed. A reservation is a row, not a hold: no host sits idle because of it yet.
- New small jobs may backfill into reserved blocks only if they are preemptible or will finish before the reservation starts. This is EASY-style backfill: a job started after the reservation must never push it later. A 30-minute guaranteed debugging job cannot go into a block reserved from two minutes from now, but a preemptible eval can, as the first victim. Max runtimes are enforced by killing jobs at their limit, or the reservation rests on promises.
- To clear the blocks it preempts borrowed jobs, choosing the victims that lose the least work. A victim’s cost is its GPUs × (minutes since its last checkpoint + minutes to restart). A 512-GPU job that snapshotted 2 minutes ago is cheaper to stop than a 64-GPU job 25 minutes past its last one. Jobs that started under 10 minutes ago are skipped when anything else will do, so nothing is preempted twice in quick succession.
- Each victim takes an on-demand checkpoint within its grace period, exits, and is requeued pointing at that checkpoint. The snapshot pauses the victim for about two seconds; the upload must finish before its hosts are handed over, because their memory is about to be wiped for the next job. Borrowed jobs are small next to the flagship: a 512-GPU run of a 7 B model holds ~100 GB of state and uploads in well under a minute. The requeued job keeps its place in fair-share order.
- When all 1,024 hosts are free and healthy, the scheduler binds the gang in one transaction and launches it. The reservation turns into an allocation atomically. From the team’s request to the first step took the 2-minute grace plus a normal launch, roughly 12 minutes, which is the bound behind the reclaim requirement. Hosts that freed early ran backfilled preemptible work until the last moment.
- GPU-hours are charged to each team, and borrowers waiting for capacity are ordered by decayed usage over their share. Usage decays with a 7-day half-life, so a team that borrowed 2,000 GPUs all last week waits behind one that borrowed nothing. Within its quota a team orders its own jobs; the fair-share order only decides who gets capacity that belongs to someone else.
- A GPU dies mid-run. The failure that hits the 8,192-GPU job every six hours. The goal is to notice in under a minute rather than at a 30-minute timeout, swap the host without waiting for repair, and lose minutes rather than hours of 8,192 GPUs.
- A GPU on host h-0412 falls off the bus; the node agent reports the error, and the job’s collectives stop making progress. An XID 79 from the driver is unambiguous, but many failures are not: a rank can simply hang inside an all-reduce. The other 8,191 ranks block in the next collective and would wait for the library’s timeout, 10 to 30 minutes by default, at ~$270 a minute.
- The health monitor sees the error and the stalled step heartbeat within a minute and tells the scheduler which host to replace. Two independent signals agree: an XID on h-0412, and no step completed for 3× the 10-second median. A hang with no host error is attributed by asking which rank has not entered the collective that the others are waiting in. Detecting in ~30 seconds instead of 10 minutes saves about $2,500 per failure on its own.
- The scheduler cordons the host and swaps in a hot spare from the same block, in one transaction with a new allocation epoch. A spare in block 12 keeps the layout intact, so the pipeline that included h-0412 still sits inside one block. Without one, the nearest block’s spare is used and that pipeline pays an extra hop until the next full restart. The spare was running a preemptible eval, which is stopped with no grace; it is cheap to redo.
- Agents on all 1,024 hosts stop the old ranks and start new ones under epoch 2. Every rank restarts, not just the eight on the failed host, because every communicator included the dead GPU. Ranks carry the epoch, so a slow rank from epoch 1 that wakes up late is refused by the rendezvous and cannot write a checkpoint. Images and data shards are already on the hosts, so start-up is mostly communicator setup, about two minutes.
- Ranks restore the latest snapshot: survivors from their own host memory, the spare from its partner’s copy. The restore takes the newest step complete everywhere, step 41,200 from six minutes earlier. 1,023 hosts read it from local RAM; h-0415 fetches h-0412’s 5.5 GB from its partner in another block in seconds. Only if the partner were also gone would it read the last durable copy, up to 30 minutes old, from object storage.
- Data loaders resume from the position saved in the snapshot, and training continues. About four minutes after the failure the job is stepping again: 30 seconds to detect, seconds to swap, two minutes for communicators, under a minute to restore and warm up. With six minutes of progress lost, this failure cost ~10 minutes of 8,192 GPUs, ~$2,700, against ~$11,000 with 30-minute synchronous checkpoints and timeout-based detection.
- The failed host goes to repair, then burn-in, and only then back to the spare pool. Repair is the data-centre team’s queue and takes days: reseat, swap the GPU or the board. Burn-in then runs hours of stress and fabric tests before the host is trusted again. A host implicated in two job failures within a week is pulled even if its tests pass, because some faults only show under real training load.
- One slow GPU drags 8,191 others. The background detection path for faults that never raise an error. Synchronous training runs at the speed of its slowest rank, so finding the one slow GPU, and deciding when it is worth a restart to remove it, is worth thousands of dollars an hour.
- Every rank reports, per step, how long it computed, how long it waited for data and how long it waited in collectives. 8,192 records every ~10 seconds is under 1,000 messages a second. The split is what makes attribution possible: a straggler shows long compute and short waits, while every other rank shows short compute and long collective waits, because they are waiting for it.
- The health monitor compares each rank with the job’s median and flags rank 3,107: 12 % slower for 50 steps in a row. Relative to the job’s own median, because absolute step times vary with the model and batch. Fifty consecutive steps, about eight minutes, filters out a momentary blip. Meanwhile the whole job’s step time has risen by the same 12 %, because every all-reduce waits for rank 3,107.
- It reads the host’s own counters to explain why. Here GPU 3 on h-0388 reports thermal throttling, its clocks 15 % below its peers. Other usual causes are a NIC that negotiated half speed, a link retrying errors, or memory row remapping. An explanation raises confidence, but a persistent 12 % with no explanation is still evicted, because the cost is the same either way.
- It weighs the cost of the slowdown against the cost of a swap, and decides to swap now. 12 % of 8,192 GPUs is ~980 GPUs’ worth of wasted time, about $2,000 an hour for the rest of the run. A swap after an on-demand snapshot loses no progress and costs a ~4-minute restart, about $1,100. Anything that persists past about half an hour is worth removing, and a throttling GPU rarely fixes itself.
- The scheduler asks the job for an on-demand snapshot, then swaps the host for a spare exactly as for a failure. Snapshotting first means the restart resumes from the current step, so the only cost is the restart itself. The swap is the same transaction and epoch bump as for a dead GPU; one path for both keeps failure handling simple and well exercised.
- The host is marked suspect and diagnosed; a thermal fault goes to the data-centre team. Throttling usually means a cooling problem in the chassis, which no software can fix. Evictions are counted per host and per component, and the false-eviction rate (hosts that come back from repair with no fault found) is the check that the thresholds are not too eager.
Deep dives
Gang scheduling and topology-aware placement
Why not schedule each of the 8,192 workers as its own pod and let them meet once they are all up? And does it matter which 1,024 hosts they get?
A synchronous training job makes no progress until every rank is present: the first all-reduce blocks until all 8,192 have joined. Scheduling workers one at a time means a job can sit holding 900 hosts while it waits for the last 124, and two big jobs that each grabbed 900 of the 1,024 hosts they need deadlock, neither able to start, while 1,800 hosts sit idle at about $29 k an hour. And because ranks talk constantly, where they land matters: inside a host, GPUs share NVLink at ~900 GB/s each; inside a block of 32 hosts, every GPU is one switch hop from every other at 400 Gb/s; across blocks, traffic crosses a spine every job shares.
Two observations shape the answer. The allocation must be atomic and the waiting must be planned rather than held: a job binds all its hosts in one decision or holds none, and the scheduler reserves future capacity for it on paper while smaller work fills in around the reservation. And the parallelism has a shape: tensor parallelism all-reduces every layer and needs NVLink, pipeline stages pass activations every micro-batch and want one hop, data parallelism syncs gradients once a step and overlaps with compute, so it can cross the spine. Placement maps that shape onto the network, and the cluster’s job is to keep whole blocks available for it.
- All-or-nothing gang bind on whole blocks, with reservations and backfill chosen
- Place workers independently and barrier at start (per-pod scheduling) rejected
- Static partitions: big teams own fixed blocks situational: one flagship run that will hold the same blocks for months, carved out as a partition with its own spares
- Elastic jobs that start with what is free and grow situational: data-parallel-only jobs and fine-tuning, where a variable number of replicas is acceptable
The answer: The scheduler treats a job as a gang of whole hosts with a shape: 1,024 hosts of 8 GPUs, laid out tensor 8 × pipeline 8 × data 128. Placement takes whole blocks first (32 blocks of 32 hosts), preferring blocks under the same spine group, then lays ranks out so each pipeline’s 8 hosts share a block and data-parallel groups span blocks. The bind is one transaction over 1,024 host rows, conditional on each still being free and healthy, stamped with an allocation epoch; if anything changed, nothing is bound. When the gang does not fit, the scheduler computes the earliest time enough blocks free up, from running jobs’ declared max runtimes and which of them are preemptible, and reserves those blocks; later jobs backfill only if they will end before the reservation or can be preempted. Small jobs are packed best-fit into blocks that are already partly used, so whole blocks stay whole. Slurm’s backfill scheduler with reservations, and Kubernetes add-ons such as Kueue and Volcano, implement versions of the same ideas.
One host fails its pre-flight check after the gang is bound. Does the job start with 1,023?
No. The gang never starts partial: the scheduler swaps in a spare from the same block with another conditional transaction, the epoch goes up, and the other 1,023 hosts wait about a minute. If the block has no spare, the nearest block’s is used and one pipeline pays an extra hop. Silently running a smaller world size would change the training maths, so that is never an automatic choice.
A 1,024-host job is at the head of the queue and cannot fit yet. Do the small jobs wait behind it?
Only the ones that would delay it. The reservation says which blocks it gets and when; a small job may start on those blocks if its enforced max runtime ends before then, or if it is preemptible and will be its victim. Everything else runs on blocks outside the reservation. Without backfill, head-of-line blocking would idle hundreds of hosts while the big job waited; without the reservation, the big job would starve behind a stream of small ones.
How much does placement really matter?
Inside a host each GPU has ~900 GB/s of NVLink; across hosts it has one 400 Gb/s NIC, 50 GB/s, 18 times less, which is why tensor parallelism never leaves a host. Pipeline stages exchange activations every micro-batch and stall if a hop is slow, so they stay inside a block. Data-parallel gradient sync is large but overlaps with the backward pass, so it tolerates the spine. I would measure rather than guess: run the same job packed and scattered, and feed the step-time difference into the placement score.
Small jobs keep fragmenting the blocks. How do you get whole blocks back?
Prevent it first: pack small jobs best-fit into the fullest block they fit in, and keep a few blocks for small work only, so the rest stay whole. Then defragment when a reservation needs it, by preempting or migrating preemptible small jobs at their next checkpoint. The metric that tells you it is working is the largest gang the cluster could start right now, tracked over the day.
How does Kubernetes handle this, and would you build on it?
The default Kubernetes scheduler places pods one at a time, which is exactly the partial-allocation problem. Add-ons fix it: Volcano and the coscheduling plugin admit a group of pods only when all fit, and Kueue adds quotas, borrowing within cohorts and preemption, with topology-aware placement in recent versions. Building on Kubernetes plus those is reasonable; many labs run Slurm instead. Either way the design decisions in this answer are the ones you configure.
Quotas, fair share and preemption
Forty teams share 16,384 GPUs, and the pretraining team paid for half. How do you keep everything busy without anyone losing what they paid for?
Demand is lumpy. A team runs almost nothing for a week while it writes code, then wants 2,000 GPUs for a sweep. If each quota were a hard wall the cluster could easily sit 30 to 40 % idle; if it were first come, first served, whoever submits a big sweep first holds the cluster for days. And preempting a training job is not free the way evicting a web replica is: the job loses everything since its last checkpoint and pays a restart, so stopping a 1,000-GPU job 20 minutes after its last checkpoint wastes about 30 minutes of 1,000 GPUs, ~$1,000.
Separate the promise from the use. A guaranteed quota is a promise of capacity on demand within a bounded time, not ownership of particular hosts, so idle quota can be lent as long as loans are revocable and every borrowed job can be checkpointed and stopped with a grace period. Fairness among borrowers is a question of recent history, who has used more than their share lately, and since the price of reclaiming is lost work, victims are chosen by how little they lose.
- Guaranteed quotas, borrowing of idle quota, reclaim by preemption, fair share among borrowers chosen
- Hard quotas, no borrowing situational: a dedicated cluster for one customer or a regulated workload, where predictability is the product
- One global queue by submission time or priority number rejected
- Internal market: teams bid credits for GPU-hours situational: setting quarterly quotas across a very large organisation; the scheduler still enforces quotas day to day
The answer: Every team has a guaranteed quota in GPUs per GPU type, and the guarantees add up to less than the cluster minus the spare pool. Inside its quota a team’s jobs are never preempted for another team (only for hardware or maintenance), and the team orders its own queue. Beyond its quota a team may borrow idle capacity; borrowed jobs are marked preemptible and must use the checkpoint library. When an owner needs its quota back, the scheduler preempts borrowed jobs chosen to minimise lost work, GPUs × (minutes since the last checkpoint + restart minutes), skips jobs that started less than 10 minutes ago unless nothing else fits, and prefers the borrower furthest over its fair share. Victims get a 2-minute grace signal, take an on-demand snapshot and are requeued with it. Among borrowers the order is fair share: each team’s GPU-hours over a window decaying with a 7-day half-life, divided by its quota; the lowest ratio goes first. Slurm’s multifactor priority uses the same decayed fair share, and Kueue’s cohorts implement quotas with borrowing and reclaim.
The owner needs 1,000 GPUs back and the only borrower is one 4,096-GPU job. Do you kill all of it?
Preempting any rank stops the whole gang, so yes, unless it is elastic. Two things soften it. The victim gets its grace period and an on-demand snapshot, so it loses only the restart, not the work. And if the owner’s request is not urgent, the scheduler can align the preemption with the victim’s next scheduled snapshot a few minutes away. The victim then requeues and, if it can run smaller, restarts on the GPUs that remain.
What stops a team splitting a 1,000-GPU job into 1,000 one-GPU jobs to game the system?
Everything is counted in GPU-hours, not jobs: quotas are GPUs, fair share is decayed GPU-hours, and victim cost is GPU-minutes of lost work. Splitting changes none of those numbers. A cap on pending jobs per team protects the scheduler from someone submitting a million tiny jobs.
Why decay usage with a half-life instead of counting all of it?
Counting forever punishes a team now for what it ran last quarter; counting nothing lets a team that just used 2,000 GPUs for a week compete as if it were fresh. A half-life weights recent use most and forgets old use smoothly. Seven days matches the time scale of a typical experiment, so a team that borrowed heavily this week yields next week.
How do you stop the same job being preempted over and over?
A minimum runtime before a job can be a victim (10 minutes), victim selection that counts recent preemptions, and after two preemptions in an hour, placement only on guaranteed capacity or a short immunity. Measure preemptions per GPU-hour per team; a team whose borrowed work is preempted constantly is a sign its quota is too small.
How would you know the quotas are set right?
Per team: guaranteed use (used ÷ quota), borrowed GPU-hours, queue time by class, and the time to reclaim at p95, which must stay under the bound. A team that leaves half its quota idle every week, while others borrow it all the time, is a quota to move at the next planning cycle. Cluster-wide, allocation above 90 % with reclaim inside its bound means borrowing is working.
Checkpoints: how often, where, and how fast back
A failure every six hours on 8,192 GPUs. How often do you checkpoint, where do the bytes go, and how do you get back to training in minutes?
The training state of a 400 B-parameter model with Adam is ~5.6 TB: bf16 weights, an fp32 master copy and two optimiser moments, 14 bytes per parameter. Written synchronously to shared storage at 100 GB/s, it stalls all 8,192 GPUs for about a minute, ~$250 of idle GPUs each time. Not checkpointing is worse: with a failure every ~6 hours, each one throws away on average half an interval of progress plus the restart, and every minute of either costs ~$270.
Two facts make it cheap. The best interval balances the cost of a checkpoint against the expected loss from a failure (Young’s approximation: interval ≈ √(2 × checkpoint cost × MTBF)), so the cheaper the blocking part, the more often you can afford it. And the blocking part only has to get the state out of GPU memory: a copy to host RAM takes about two seconds, after which training resumes while the bytes travel to a partner and to durable storage in the background. Most failures lose one host, so the copy that restores fastest is the one already in the surviving hosts’ memory.
- Asynchronous two tiers: snapshot to host RAM every 10 min, partner copy, durable upload every 30 min chosen
- Synchronous checkpoint to a shared file system situational: jobs under ~100 GPUs, whose state is small enough that the stall is seconds
- Checkpoint rarely, every few hours rejected
- In-memory replicas only, no durable tier rejected
The answer: The platform’s checkpoint library, on a sharded format such as PyTorch Distributed Checkpoint, saves each rank’s shard of parameters and optimiser state with the RNG states, the step and the data loader’s position. Every 10 minutes ranks pause for ~2 s to copy their 680 MB shard into pinned host memory, then resume; a background thread copies the host’s 5.5 GB to a partner host in another block and power domain, and every third snapshot (30 minutes) uploads all shards to object storage, the coordinator writing the manifest last so a half-written checkpoint can never be picked. Paths carry the job and allocation epoch, so ranks from an old attempt can never overwrite a newer checkpoint. A restore picks the newest step complete everywhere: host RAM on survivors, the partner’s copy for a replaced host, object storage if both are gone. Retention keeps the last three durable checkpoints plus one a day, and anything registered or under evaluation is pinned. Meta reported 419 unexpected interruptions in 54 days of Llama 3 pretraining on 16,384 GPUs and still kept effective training time above 90 %; frequent, cheap checkpoints and fast restarts are how that is done.
Work out the interval for me.
Young’s approximation: interval ≈ √(2 × C × M), with C the time the job is blocked and M its mean time between failures. Synchronous, C = 60 s and M = 21,600 s give ~1,600 s, about 27 minutes, and the overhead is C ÷ T plus T ÷ 2M, 3.7 % + 3.7 % ≈ 7.5 %. With a 2 s snapshot the optimum is ~5 minutes at ~1.4 %; at 10 minutes it is ~1.7 %, because the curve is flat near the optimum, so I take 10 and halve the snapshot traffic. Restart time is extra per failure and does not depend on the interval, which is why it gets its own work.
A rack loses power and takes the failed host and its partner with it.
Partners are chosen in different blocks and power domains precisely so one event cannot take both. If both are gone anyway, the restore falls back to the newest complete durable checkpoint, at most 30 minutes old, and that one event costs more lost work. That is why the durable copy is every 30 minutes rather than every few hours.
Can you restore onto a different number of GPUs?
Yes, if the format records each tensor’s global shape and each shard’s offset, which is what distributed checkpoint formats do: the loader reads whichever byte ranges its new shard needs. That matters when a job restarts smaller because no spare is free, and for evaluating or fine-tuning a checkpoint on 8 GPUs. The data loader’s position is stored as a global sample count for the same reason, so it can be split across a different number of ranks.
How do you know a checkpoint is actually good?
The manifest carries a checksum per shard, and a restore verifies them. Beyond that, a nightly job restores a sample of recent checkpoints onto a small allocation, runs a few steps and compares the loss with the original run. A checkpoint that has never been restored is a hope, not a backup.
What do 5.6 TB every 30 minutes do to the storage system?
About 270 TB a day, 3.1 GB/s on average from one job, in bursts. Uploads are rate-limited per job so a checkpoint never starves the data reads that share the storage, and they go to their own bucket or prefix with its own lifecycle rules. Retention is what keeps it bounded: the latest three plus one a day, everything else deleted once it is superseded and not pinned.
Keeping the accelerators fed
How do 8,192 GPUs read their training data without ever waiting on I/O, and resume exactly where they were after a restart?
Bandwidth depends on the modality. A text run at 1.4 M tokens a second reads only ~5 MB/s of tokenised data; an image job on 1,024 GPUs at 500 images a second each reads ~50 GB/s, enough to saturate a shared storage cluster. Either way a step waits for its slowest rank, so one rank stalled on a slow read stalls 8,191 others, and data that is repeated or skipped after a restart quietly changes the training run.
Make the data shaped for streaming and make its position part of the checkpoint. Large immutable shards of about 1 GB turn billions of small objects into thousands of sequential reads; a deterministic assignment of shards to ranks, from the dataset version, seed, epoch and rank, makes the order reproducible without a coordinator; and a read-through cache on local NVMe with read-ahead hides object-storage latency. The loader’s state is a few numbers, so it goes into every checkpoint.
- Versioned shards in object storage, deterministic streaming loaders, NVMe read-through cache with read-ahead chosen
- One file per sample on a shared POSIX file system situational: small datasets and fine-tuning, or a parallel file system used as a shared cache tier in front of object storage
- Copy the whole dataset to every host before training rejected
- A separate preprocessing fleet feeding GPU hosts over the network situational: CPU-heavy pipelines, such as image and video decoding with augmentation, where host CPUs cannot keep up
The answer: Datasets are built once into immutable versions: a manifest lists ~1 GB shards with checksums and sample counts (pre-tokenised, packed sequences for text; tar shards of samples for images), globally shuffled at build time. Each data-parallel rank computes its shard order from (dataset version, seed, epoch, rank, data-parallel size) and streams sequentially through a shuffle buffer of a few thousand samples. A read-through cache on each host’s ~30 TB of NVMe holds the job’s shards and fetches the next few ahead with large ranged reads; multi-epoch image jobs read the lake once and NVMe thereafter, and a shared cache tier dedupes reads when many jobs use the same version. Loaders run in background processes that keep a queue of ready batches in pinned memory, so the step never waits unless the queue is empty. The loader’s position (global samples consumed, shard cursor and offset) is in every checkpoint, so a restart neither repeats nor skips data. Data wait per step per rank is a metric, with an alert above 2 % of step time.
The job restarts with a different number of data-parallel ranks. How does the loader avoid repeating data?
Store the position as a global sample index, not a per-rank cursor. The global order of samples is a pure function of the dataset version and seed, so after the restart each new rank takes its slice of the remaining sequence. Nothing is repeated or skipped, whatever the new world size is.
Why 1 GB shards instead of one object per image?
Two billion images as two billion objects means two billion GETs an epoch, each paying 10 to 50 ms of first-byte latency and a per-request charge, plus listings nobody can run. A 1 GB shard turns that into one long sequential read, and checksums and caching become per shard. Much larger shards make shuffling coarser and cache fills slower, so around a gigabyte is the usual middle.
Ten jobs train on the same dataset version at once. Does each fetch it from the lake?
No: a shared cache tier between the cluster and the lake serves repeated reads, and its key is (dataset version, shard). Because versions are immutable, entries never need invalidating; they only age out. Within one job each shard is read by exactly one rank, so there is no duplication there either.
The CPUs cannot decode images fast enough. What do you do?
First confirm it from data wait and CPU use on the hosts. Then the options, cheapest first: preprocess to the training resolution once, when the dataset version is built; decode on the GPU (nvJPEG or DALI); or add a separate CPU preprocessing fleet. CPU cores are cheap next to idle GPUs, so all three are worth it the moment data wait shows up.
How do you tell whether a slow step is waiting on data or on compute?
Every rank reports per step its data wait, its compute time and its time waiting in collectives. A data-bound job shows data wait on the ranks themselves; a compute straggler shows one rank with long compute and every other rank waiting in collectives. Without that split, all three look identical from outside: the job is just slower.
Experiment tracking, lineage and the registry
Six months from now someone asks which data and which code produced the model in production. How does the platform answer, and why can’t metrics just live in the job logs?
A thousand researchers run ~10,000 jobs a day; ~3,000 runs are active at once, each logging ~100 metrics every 10 seconds, about 30,000 points a second, and a long run collects tens of millions of points. Researchers compare hundreds of runs side by side, and production depends on knowing exactly what a model is, while a checkpoint is a 5.6 TB blob that says nothing about the dataset, the commit or the container it came from.
Lineage is only trustworthy if every link is an immutable id recorded automatically at the moment it happens: the platform knows the image digest, the dataset version and the commit when it launches the job, and the checkpoint URI and hash when it writes one. Metadata, metrics and artefacts have different shapes and volumes, so they live in different stores joined by run id. The registry is then a small, consistent catalogue of named versions that point at immutable artefacts and pin them against deletion.
- Tracking service (run metadata in SQL, metrics in a columnar store, artefacts by URI and hash) plus a registry of versions with lineage and stages chosen
- Logs and folder-naming conventions in a shared bucket rejected
- A hosted tracking product (Weights & Biases, MLflow, Neptune) situational: smaller organisations, or as the interface on top of lineage the platform records itself
- Metrics in the job store rejected
The answer: The platform creates the run record when the job is submitted: run id, job id, team, user, config and its hash, git commit, image digest, dataset version, and the parent checkpoint for a resumed or fine-tuned run; the launcher fills these in, so nobody can forget them. Metrics go through the SDK, which buffers in memory and on local disk and flushes asynchronously into a columnar store keyed by (run, metric, step); long runs are downsampled for display but kept in full. Every checkpoint and evaluation output is registered as an artefact with its URI, content hash and producing run, so lineage is a graph: dataset version → run → checkpoint → evaluation → model version. The registry holds named models and versions; registering records the checkpoint’s URI and hash, the eval report, an approval and a stage (candidate, staging, production), and pins the checkpoint so retention never deletes it. Serving resolves a model name and stage to a version, never to a path. MLflow’s model registry and Weights & Biases artifacts follow the same model.
The tracking service is down for an hour. Does training stop?
No. The SDK buffers metrics in memory and then on local disk and flushes them when tracking returns, with writes keyed by (run, metric, step) so a replay cannot double-count. The run record itself was created from the job store at submission, and artefact registrations are retried the same way. Tracking is for people; a step must never wait on it.
Is a run reproducible, not just traceable?
Its inputs are: image by digest, data by version, code by commit, config by hash, seeds recorded, data order deterministic. The outputs are reproducible statistically, not bit for bit, because some GPU kernels are non-deterministic and results differ across GPU types. I would say that plainly rather than promise bitwise reproducibility, and offer deterministic kernels for the debugging cases that need them.
A dataset turns out to contain data you must delete. Which models are affected?
Query the lineage graph from that dataset version: every run that read it, every checkpoint those runs wrote, every model version registered from them, and every fine-tune whose parent was one of those. That query is only possible because the run recorded a dataset version id, not a path that has since changed. Then flag those versions in the registry and plan retraining on a cleaned version.
Who can promote a model to production?
Stage changes are guarded: moving to production needs the eval gates to pass and an approval from an owner, and every transition is audited. Production is an alias pointing at one version, so promotion and rollback are both one atomic alias change, and serving never sees a half-updated state.
How do you stop metric storage growing forever?
Retention by value: full resolution for 90 days for ordinary runs, then downsampled; everything kept for runs linked to a registered model. A columnar store compresses each point to a few bytes, so even full resolution is cheap compared with one checkpoint.
Failing hardware, stragglers and hot spares
Eight hosts fail every day, and some GPUs do not fail at all, they just get slow. How do you find them, and how do you keep a 1,024-host job running through it?
With 2,048 hosts and a mean time between failures of ~6,000 hours each, about eight hosts fail a day, and the job holding 1,024 of them is hit every ~6 hours. Many failures do not announce themselves: a collective just hangs, and default collective timeouts are 10 to 30 minutes, during which 8,192 GPUs do nothing. Degradations are worse: a GPU throttling for heat, a NIC that came up at half speed, a link retrying errors. In synchronous training every step waits for the slowest rank, so one GPU running 12 % slow makes all 8,192 run 12 % slow, about $2,000 an hour, while nothing has technically failed.
Health has to be measured from both sides: the host reports what it knows (error counters, clocks, link speeds) and the job reports what it experiences (each rank’s compute time and how long it waited for the others). A rank that is slow at its own compute while the others wait for it is the straggler. And recovery must not wait for repair: a pool of tested spares, busy with preemptible work, lets a job swap one host in minutes while the broken one goes through repair and burn-in at its own pace.
- Host and job telemetry, fast hang detection, cost-based straggler eviction, hot spares, burn-in before reuse chosen
- Rely on the collective library’s timeout and restart on crash rejected
- Wait for the failed host to be repaired, then resume rejected
- Restart on fewer hosts instead of using a spare situational: elastic data-parallel jobs, or when the spare pool is empty
The answer: Each node agent exports GPU health from DCGM (XID errors, ECC and row-remap counts, clocks and throttle reasons, NVLink errors), NIC link state and speed, and fabric error counters every 10 seconds; each rank reports its compute time, data wait and collective wait per step. The health monitor declares a hang when a job’s steps stop for 3× its median step time, long before the collective timeout, and attributes it to the host with an error or to the rank missing from the collective. A straggler is a rank more than 10 % slower than its job’s median for 50 consecutive steps, or a host whose counters show throttling or a degraded link; it is evicted when its cost (slowdown × the job’s GPUs) passes the cost of a restart, after an on-demand snapshot so nothing is lost. The scheduler swaps in a spare from the same block where it can. Hosts move through healthy, suspect, cordoned, repair and burn-in; repair is the data-centre team’s queue, burn-in is hours of stress and fabric tests, and a host implicated in two job failures within a week is pulled even if its tests pass. The spare pool is sized by Little’s law, 8 failures a day × ~3 days out ≈ 24 hosts, so ~40 spares (2 %), each running preemptible jobs until it is needed.
How do you avoid evicting healthy hosts by mistake?
Require persistence (50 consecutive steps) or two independent signals, and compare with the job’s own median rather than a fixed number. Cap automatic evictions per job per hour and page a person beyond that, because a wave of “stragglers” usually means a shared cause such as a spine link. Track the false-eviction rate, hosts that come back from repair with no fault found, and tune the thresholds against it.
Forty spare hosts is idle capacity. How do you justify it?
They are not idle: they run preemptible evals and small experiments that can be stopped in seconds. And the alternative is pricing out a wait for repair: one day of the 8,192-GPU job idle is ~$390 k, while 40 spare hosts cost ~$15 k a day before counting the work they do. Little’s law says ~24 hosts are out at any moment, so 40 also covers bursts.
What about a GPU that silently computes wrong answers?
Silent data corruption is rare per chip but real at tens of thousands of chips; Google and Meta have both published on CPUs that compute wrong results at fleet scale, and accelerators are not immune. In training it shows as loss spikes, NaNs, or data-parallel replicas whose gradient norms disagree. The defences are known-answer tests in burn-in and between jobs, cross-replica checks, and on a spike, rolling back to the checkpoint before it and excluding the host that the checks point to.
The job hangs and no host reports an error. How do you find the culprit?
Every rank records the sequence number of the collective it is in. If 8,191 ranks are waiting in all-reduce number 18,402 and one is still in 18,401, or never entered it, that rank’s host is the suspect. Hang detection from the step heartbeat starts this within 30 seconds, instead of waiting out the library timeout.
How do you know the health system is working?
Goodput per large job, the share of GPU-time that produced kept progress, is the headline. Under it: time from failure to detection and to training again, failures per host-day by component, repeat-offender rate, false evictions, and spare-pool depth over time. If goodput drops and none of those moved, the loss is somewhere the monitor cannot see yet.
The theory behind it
- Multi-tenancy: Designing SaaS systems that serve many customers from shared infrastructure: tenancy models from shared tables to dedicated stacks, tenant isolation for data and security, noisy neighbours, per-tenant limits, cells, enterprise requirements and tenant-aware operations.
- Distributed file systems and erasure coding: How huge files are stored across thousands of disks: the GFS and HDFS design with a metadata master and chunk servers, chunk sizes and replication, write pipelines, metadata scaling, object storage internals, and erasure coding versus replication for durability and cost.
- Gossip protocols and failure detection: How large clusters know who is alive without a central coordinator: heartbeats and timeouts, phi accrual failure detectors, gossip dissemination and SWIM, membership changes, split brain, and how these show up in databases, caches and service discovery.