Training & Inference

Feeding a GPU Training Cluster: Sizing GPU Cluster Storage for Data Loading and Checkpoint I/O

A single per-accelerator throughput figure can't size GPU cluster storage. MLCommons shows why in MLPerf Storage, its benchmark of how fast storage feeds AI training: one training workload reads about 38x more data per accelerator than the other.

Size storage with two budgets:

  1. Data loading budget: the sustained reads and file opens that keep accelerators busy.
  2. Checkpoint budget: the durable writes and restore reads for checkpoints, the saved copies of model state that let a job restart after a failure.

Before starting, collect the accelerator count, workload type, checkpoint size, longest acceptable save pause, and whether training stops or keeps running during each save.

Step 1: Classify the Workload by Its Storage I/O Pattern

Each MLPerf Storage v3.0 training workload simulates accelerators. Each simulated accelerator reads real data through PyTorch, then pauses for the time a real NVIDIA B200 or AMD MI355 would spend computing, so the result reflects storage speed.

The two training workloads stress storage in opposite ways:

  1. Unet3D: a 3D medical-image segmentation model that reads large files one after another, so the limit is storage bandwidth in bytes per second.
  2. RetinaNet: an object-detection model that reads millions of small JPEG files, so the limit is file opens per second. Each open is a metadata operation, the filesystem lookup that runs before each read.
WorkloadAverage file sizeRead per simulated B200Access pattern
Unet3DAbout 140 MiBAbout 5.9 GiB/sSequential reads of each file, in random file order
RetinaNetAbout 315 KiBAbout 155 MiB/sAbout 500 file opens and reads per second per accelerator

The benchmark counts a training result as valid when the simulated accelerators stay busy at least 90% of the time on Unet3D and 85% on RetinaNet. Reuse those thresholds as pass marks in the verification tests at the end.

Before Step 2, mark the job as bandwidth-bound like Unet3D, metadata-bound like RetinaNet, or a mix.

Step 2: Compute the Storage Read Budget

MLCommons approximates read bandwidth as accelerators multiplied by per-accelerator demand multiplied by achieved utilization. A worked example at 256 accelerators shows the gap between the two types:

Workload typeRead bandwidth at 100% utilizationFile opens per second
Unet3D-typeAbout 1,510 GiB/s (1,622 GB/s)About 11,000, estimated from the 140 MiB average file
RetinaNet-typeAbout 38.8 GiB/sAbout 128,000

Treat these figures as a starting budget, because prefetching, local caching and other jobs on the same filesystem change the demand that reaches shared storage. Write down one read-bandwidth figure and, for small-file jobs, one file-open rate.

Step 3: Fix the File Layout Before Buying Storage Bandwidth

A metadata-bound job needs fewer, larger files before it needs faster storage. Harvard's Kempner Institute calls a dataset stored as millions of tiny files the most common machine-learning I/O mistake, in section 20.5 of its computing handbook.

Kempner calls metadata the slowest part of a shared filesystem. Its handbook lists six fixes:

  1. Pack samples into large shards: read them sequentially, so a few large files replace millions of small ones.
  2. Choose a sharded format: WebDataset, MosaicML Streaming (MDS), TFRecord and Parquet each store many samples per file.
  3. Tune PyTorch's DataLoader: set numworkers, prefetchfactor and pin_memory so reads overlap GPU computation.
  4. Stage frequently read data near the GPUs: copy it to fast scratch storage, or to each node's local /tmp disk when the job rereads it each pass. Kempner's cluster clears /tmp at the end of each job.
  5. Stripe large Lustre files and leave small ones unstriped: Lustre, a parallel filesystem, spreads a striped file across several storage servers, which adds overhead for small files.
  6. Profile before optimizing: tools such as ior or Darshan show where read time goes.

Look at job placement and GPU-to-GPU communication when GPU utilization stays low and samples arrive on time. After the layout change, profile again to confirm metadata operations have stopped dominating read time.

Step 4: Compute the Checkpoint I/O Budget

A checkpoint hits storage twice: a write that pauses training, and a read that restores the job after a failure. MLPerf Storage's checkpoint test emulates four sizes of Llama 3 model, and each run saves 10 times, then reads the data back 10 times:

  1. 8B model: 105 GB, written by 8 processes.
  2. 70B model: 912 GB (about 911 GiB), written by 64 processes.
  3. 405B model: 5.29 TB, written by 512 processes.
  4. 1250B model: 18 TB, written by 1,024 processes.

The benchmark calls fsync on each checkpoint file, which waits until the data reaches durable media, so a write cache can't hide slow drives.

Microsoft gets the write target by dividing checkpoint size by the longest pause training can accept, in its sizing guidance for Azure Managed Lustre, a hosted Lustre service. It takes 7.6 GB/s to write the 70B model's 912 GB checkpoint in 120 seconds, and 30.4 GB/s in 30 seconds.

The recovery target divides the same size by the longest acceptable restore time, because the cluster sits idle during a restore.

The benchmark's restore phase includes a different machine reading a failed machine's part of the checkpoint. Its rules therefore require storage that each machine can read and write at the same time, or a fast remap to a new machine.

Microsoft measured two model sizes in its MLPerf v3.0 submission on Azure Managed Lustre's tier 125:

  1. 70B checkpoint: written at 105.5 GiB/s in 8.65 seconds, with recovery in 7.38 seconds.
  2. 1250B checkpoint: written at 642.2 GiB/s in 24.63 seconds, with recovery in 32.27 seconds.

The 1250B restore took longer than its write, so test restore reads on their own. Multiplying 105.5 GiB/s by 8.65 seconds gives about 913 GiB, which matches the 911 GiB checkpoint and confirms the size-over-bandwidth formula.

Training keeps running during an asynchronous checkpoint, so storage has to absorb the buffered or locally staged copy before the next save.

Microsoft warns against sizing a sustained training workload from a short checkpoint peak. It also recommends a pilot run with the real model, data format and checkpoint method before final sizing.

Record a durable-write figure and a restore-read figure, each tied to the pause the job can accept.

Step 5: Keep the Durable Checkpoint on Shared Storage

PyTorch Distributed Checkpoint has each training process, or rank, write its own shard in parallel. Each save produces a directory holding one shard per rank plus a small metadata file.

A checkpoint kept on node-local disks looks fine until a restore, because a replacement machine can't read the failed node's disks. Treat node-local disks as a cache.

A local-first save works when a copy reaches shared storage before the next save. Check 4 in the verification list below tests this step.

Copying checkpoints to a second site is a separate decision, covered under enterprise AI data storage architecture.

Step 6: Decide Whether GPUDirect Storage Changes the Design

NVIDIA's GPUDirect Storage overview guide describes GPUDirect Storage (GDS) as a direct path that moves data between storage and GPU memory without a copy in CPU memory. The direct path can relieve system bandwidth bottlenecks and cut latency and CPU load.

NVIDIA says the latency gain shows most on small transfers. On some systems, the direct path offers at least twice the peak bandwidth of a path through the CPU.

cuFile, the programming interface for GDS, suits large streaming transfers, so it fits checkpoints and large-file reads better than small random reads. GDS doesn't add parallel transfers on its own, so the application still has to issue many transfers at once to reach peak bandwidth.

cuFile falls back to copying data through CPU memory when the filesystem driver lacks GDS support. NVIDIA's guide names DDN EXAScaler, VAST NFS and WEKA's WekaFS as network filesystems for its GDS dynamic routing feature.

GDS raises throughput when the copy through CPU memory slows the job and the filesystem supports GDS. The two budgets still set the storage size, so confirm the filesystem's GDS support with the vendor before designing around GDS.

Step 7: Choose a Storage Class Against Both Budgets

Kempner's storage table points each workload type to a storage class:

  1. Metadata-bound jobs such as RetinaNet: all-flash scratch storage, which Kempner lists for active training data, checkpoints and many small random reads.
  2. Bandwidth-bound jobs such as Unet3D: a disk-based parallel filesystem, which Kempner lists for large files read with high sequential bandwidth.

Some services sell bandwidth by capacity increment, so the bandwidth target decides how much capacity to buy. Azure Managed Lustre provides 2,000 MB/s of nominal bandwidth per increment across five tiers:

  1. Tier 20: 96 TiB per increment.
  2. Tier 40: 48 TiB per increment.
  3. Tier 125: 16 TiB per increment.
  4. Tier 250: 8 TiB per increment.
  5. Tier 500: 4 TiB per increment.

Higher tiers reach the same bandwidth with less capacity: Microsoft's 93 GiB/s test configurations used 4,800 TiB on tier 20 and 200 TiB on tier 500. Microsoft's tested Unet3D runs delivered about 5.4 to 5.8 GiB/s per simulated B200, close to the 5.9 GiB/s MLCommons figure in Step 1.

Shortlist a tier once the vendor states its read bandwidth, file-open rate and durable-write bandwidth.

Verify the Storage Tier Against Both Budgets

Add five storage checks to GPU cluster commissioning, the acceptance tests run before a cluster goes into production:

  1. Sustained read at the planned accelerator count: run the read test for several hours on a dataset at least five times the clients' combined memory. MLPerf uses that ratio so client caches can't serve the reads. Compare delivered read bandwidth and GPU utilization with the Step 2 read figure and the Step 1 threshold.
  2. File-open rate on the real file layout: measure opens per second on the sharded layout the job will use, with production DataLoader settings. Profile with ior or Darshan, and confirm storage sustains at least the Step 2 file-open figure.
  3. Durable write inside the pause budget: write a production-size checkpoint with fsync and the production writer count, so the measured time equals the stall time. Compare the duration with the tolerated pause from Step 4.
  4. Recovery read by a different machine: stop a writing node, restore its shard on another machine, and time the read against the Step 4 recovery target. Confirm the job resumes from the restored checkpoint.
  5. Concurrent jobs sharing the filesystem: run a checkpoint burst while another job reads training data from the same filesystem, using the production job mix. Confirm the other job's data loading stays at or above its Step 2 figure during the burst.

Zettabyte's enterprise storage platform, zDATA, offers object, block and archival storage; hold it to the same two budgets and five checks as other options.