Black Friday: 30% off every plan through November 30. See the prices
SysDesignPrep.com
Interviewer kit

Design an ML Training Platform

Run this for someone else. You hold the answers; they do not. Read the prompt, keep the clock, and use the probes below when an answer is thin. Do not show them this page.

The candidate should have a blank page and a whiteboard, not this.

Open with this

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. Take a couple of minutes on requirements, then we will do some numbers, then the design. I will interrupt to keep us moving.

The clock

  • 4 min: functional requirements and scope
  • 4 min: non-functional requirements, with numbers
  • 5 min: back-of-envelope estimates
  • 16 min: high-level design and one or two flows
  • 16 min: deep dives and the close

Move them on out loud when a section overruns. The commonest failure is spending twenty minutes on requirements and never reaching a deep dive, and preventing that is your job as much as theirs.

Requirements · 8 min

Listen for: a scoped set of capabilities, an explicit out-of-scope list, and numeric targets rather than adjectives. Prompt with “what are you not building?” if they never scope, and “what number would make that requirement real?” if they say “fast” or “highly available”.

Functional (9)
  • 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 (8)
  • 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.

Estimates · 5 min

Ask for two or three numbers, not all of them. What matters is whether they state assumptions, round sensibly, and say what the number implies. Push once with “where did that come from?”

The numbers (8)
  • 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.

High-level design · 16 min

Let them draw. Interrupt only to ask what backs a component or what a box actually does. Then pick one flow below and ask them to walk it end to end.

Components (15)
  • 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.
Flows to ask them to walk (5)
  1. 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.
    1. A researcher submits the run: image, command, 1,024 hosts of 8 GPUs, the parallel layout, the dataset and the checkpoint settings.
    2. The scheduler takes the job in order of class, fair share and age, and checks whether 1,024 healthy hosts can be had.
    3. It chooses 32 whole blocks and lays the ranks out so each pipeline sits inside one block.
    4. 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.
    5. Node agents on the 1,024 hosts pull the image and run a 60-second pre-flight check.
    6. Each agent starts eight ranks; the ranks rendezvous and build their communicators.
    7. Ranks load the starting weights, and their data loaders begin streaming shards through the dataset cache.
    8. Training starts; ranks send metrics to tracking and per-step timings to the telemetry stream.
  2. 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.
    1. Each data-parallel rank works out which shards it reads from the dataset version, the seed, the epoch and its rank.
    2. 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.
    3. Every 10 minutes the ranks pause for about two seconds to copy their state to host memory, then carry on.
    4. In the background, each host copies its snapshot to a partner host in another block.
    5. Every third snapshot, the hosts upload their shards to object storage, and the coordinator writes the manifest last.
    6. The checkpoint is recorded on the run in experiment tracking, and milestone checkpoints are queued for evaluation.
    7. A researcher compares runs and checkpoints by their evaluation scores and picks one.
    8. They register the checkpoint as a model version; the registry records its lineage and pins it against deletion.
  3. 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.
    1. The pretraining team submits a new 1,024-host run; only 300 hosts are free, scattered over 40 blocks.
    2. The scheduler plans instead of grabbing: it picks the 32 blocks it can clear soonest and reserves them for the job.
    3. New small jobs may backfill into reserved blocks only if they are preemptible or will finish before the reservation starts.
    4. To clear the blocks it preempts borrowed jobs, choosing the victims that lose the least work.
    5. Each victim takes an on-demand checkpoint within its grace period, exits, and is requeued pointing at that checkpoint.
    6. When all 1,024 hosts are free and healthy, the scheduler binds the gang in one transaction and launches it.
    7. GPU-hours are charged to each team, and borrowers waiting for capacity are ordered by decayed usage over their share.
  4. 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.
    1. A GPU on host h-0412 falls off the bus; the node agent reports the error, and the job’s collectives stop making progress.
    2. The health monitor sees the error and the stalled step heartbeat within a minute and tells the scheduler which host to replace.
    3. The scheduler cordons the host and swaps in a hot spare from the same block, in one transaction with a new allocation epoch.
    4. Agents on all 1,024 hosts stop the old ranks and start new ones under epoch 2.
    5. Ranks restore the latest snapshot: survivors from their own host memory, the spare from its partner’s copy.
    6. Data loaders resume from the position saved in the snapshot, and training continues.
    7. The failed host goes to repair, then burn-in, and only then back to the spare pool.
  5. 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.
    1. Every rank reports, per step, how long it computed, how long it waited for data and how long it waited in collectives.
    2. The health monitor compares each rank with the job’s median and flags rank 3,107: 12 % slower for 50 steps in a row.
    3. It reads the host’s own counters to explain why.
    4. It weighs the cost of the slowdown against the cost of a swap, and decides to swap now.
    5. The scheduler asks the job for an on-demand snapshot, then swaps the host for a spare exactly as for a failure.
    6. The host is marked suspect and diagnosed; a thermal fault goes to the data-centre team.

Deep dives · 16 min

Pick two. Ask the headline question, let them answer, then use the follow-ups. The follow-ups are where the level gets decided, so leave time for at least three of them.

Gang scheduling and topology-aware placement

Ask: 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?

Good answers name: All-or-nothing gang bind on whole blocks, with reservations and backfill, Place workers independently and barrier at start (per-pod scheduling), Static partitions: big teams own fixed blocks, Elastic jobs that start with what is free and grow.

Our pick: 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Ask: 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?

Good answers name: Guaranteed quotas, borrowing of idle quota, reclaim by preemption, fair share among borrowers, Hard quotas, no borrowing, One global queue by submission time or priority number, Internal market: teams bid credits for GPU-hours.

Our pick: 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Ask: 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?

Good answers name: Asynchronous two tiers: snapshot to host RAM every 10 min, partner copy, durable upload every 30 min, Synchronous checkpoint to a shared file system, Checkpoint rarely, every few hours, In-memory replicas only, no durable tier.

Our pick: 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Ask: How do 8,192 GPUs read their training data without ever waiting on I/O, and resume exactly where they were after a restart?

Good answers name: Versioned shards in object storage, deterministic streaming loaders, NVMe read-through cache with read-ahead, One file per sample on a shared POSIX file system, Copy the whole dataset to every host before training, A separate preprocessing fleet feeding GPU hosts over the network.

Our pick: 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Ask: 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?

Good answers name: 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, Logs and folder-naming conventions in a shared bucket, A hosted tracking product (Weights & Biases, MLflow, Neptune), Metrics in the job store.

Our pick: 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Ask: 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?

Good answers name: Host and job telemetry, fast hang detection, cost-based straggler eviction, hot spares, burn-in before reuse, Rely on the collective library’s timeout and restart on crash, Wait for the failed host to be repaired, then resume, Restart on fewer hosts instead of using a spare.

Our pick: 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Close · 5 min

Ask what breaks first at ten times the load, and what they would build next. Then give them your read: one thing that was strong, one thing that was missing, one thing to practise. Be specific; “good job” helps nobody.