How to Choose Storage & Networking for AI Workloads
In this article
Choosing storage and networking for data-intensive AI workloads means balancing speed, capacity, and cost so your training and inference jobs don't stall waiting for data. This guide walks you through the key decisions—from estimating your throughput needs to picking the right interconnect—so you can build a system that keeps GPUs busy and your budget in check.
What You'll Need
- An estimate of your dataset size (raw data, checkpoints, logs)
- Your GPU model and count (e.g., 8× A100) to calculate PCIe/NVLink bandwidth
- Knowledge of your workload type: training, inference, or both
- A rough budget for hardware (or cloud) spend
Step-by-Step
- Estimate your data footprint. Add up the size of your training dataset, validation set, model checkpoints, and any logs. Multiply by 3–5× if you plan to keep multiple versions or experiment runs. This total tells you the minimum raw storage capacity you need.
- Determine your throughput requirement. A simple rule: your storage must deliver at least as many GB/s as your GPUs can consume. For example, a single A100 can read about 2 TB/s from its HBM, but in practice, training often needs only 1–10% of that. Compute: (number of GPUs) × (per-GPU read rate in GB/s) × 0.1 to get a rough floor. If your dataset is small enough to fit in memory, you can use lower throughput.
- Choose the storage tier. For hot data (frequently read), use NVMe SSDs in a parallel file system (e.g., Lustre, GPFS, or WekaFS). For warm data (occasional access), use object storage like S3 or GCS. For cold data (archives), use tape or cheap object storage. Match the tier to your access pattern—don't put everything on the fastest tier.
- Pick the file system. If you use multiple nodes, you need a parallel file system that can stripe data across many servers. For a single node, local NVMe is fine. For cloud, managed parallel file systems (e.g., Amazon FSx for Lustre, Google Filestore) simplify setup. Avoid NFS for high-bandwidth training—it's too slow.
- Calculate network bandwidth. For multi-node training, the network must move gradients at the speed your GPUs produce them. A common baseline: 100 Gbps (12.5 GB/s) per GPU is comfortable for most models. If you have 8 GPUs per node, that's 800 Gbps per node—so a 2×100 Gbps (200 Gbps) link per node might be enough if you use gradient compression. Use the formula: (model size in GB) / (time per step in seconds) × 2 (for send and receive) to get required bandwidth per node.
- Choose the interconnect. For clusters, InfiniBand (HDR 200 Gbps, NDR 400 Gbps) is the gold standard for low latency. RoCE (RDMA over Converged Ethernet) on 100/200/400 Gbps Ethernet is cheaper and works well if your switches support PFC and ECN. For a single node, NVLink (e.g., NVSwitch) provides up to 900 GB/s between GPUs—no external network needed.
- Design the storage network. Storage servers should connect to the compute fabric at the same speed as the compute nodes. If you use 200 Gbps InfiniBand for compute, connect storage to the same fabric. For Ethernet, use separate storage VLANs to avoid congestion. Ensure the storage network has enough bandwidth to feed all compute nodes simultaneously: (number of nodes) × (per-node read rate).
- Plan for checkpointing. Checkpoint writes are bursty and can saturate storage. Use asynchronous checkpointing to a separate tier (e.g., write to local NVMe first, then sync to parallel FS). Allocate at least 20% extra storage bandwidth for checkpoints to avoid stalls.
- Test with a realistic benchmark. Use tools like fio or IOR to simulate your workload. Run a small training job and measure actual throughput and latency. Compare against your estimates—if you see less than 50% of expected bandwidth, investigate bottlenecks (e.g., PCIe lanes, switch oversubscription).
- Monitor and adjust. Set up monitoring for storage I/O (IOPS, throughput, latency) and network utilization. If your GPU utilization drops below 70% during training, you likely have a storage or network bottleneck. Scale out by adding more storage servers or higher-speed NICs.
Common Mistakes
- Ignoring latency. High throughput doesn't fix high latency. For small files or many small reads, latency matters more. Use NVMe and RDMA to keep latency low.
- Oversubscribing the network. A 1:1 oversubscription ratio means every port gets full bandwidth. Many switches are 1:2 or worse—check your switch specs.
- Using NFS for multi-node. NFS is not designed for parallel access; you'll get lock contention and poor scaling.
- Forgetting about metadata. Millions of small files can kill performance. Store training data as large shards (e.g., TFRecord, WebDataset) to reduce metadata overhead.
- Underestimating checkpoint traffic. Checkpoints can be as large as the model—if you save every 10 minutes, that's a lot of writes. Plan for it.
Tips
- Use NVMe over Fabrics (NVMe-oF) to extend local NVMe performance across the network.
- For cloud, use instance types with local NVMe (e.g., AWS i3en, GCP A2) for hot data and object storage for the rest.
- Consider using a data loader with caching (e.g., NVIDIA DALI) to reduce storage reads.
- Enable RDMA on your network stack (InfiniBand or RoCE) to reduce CPU overhead.
- Test with your actual data before committing to a full-scale purchase.
Troubleshooting
- GPU utilization is low. Check if storage or network is the bottleneck. Run `nvidia-smi` to see GPU utilization, and `iostat` or `iftop` to see I/O and network. If storage is at 100% but GPU is idle, you need faster storage or better data prefetching.
- Training stalls at checkpoint. Reduce checkpoint frequency, use asynchronous writes, or move checkpoints to a separate storage tier.
- Network errors or packet loss. For RoCE, ensure PFC (priority flow control) is enabled and ECN is configured. For InfiniBand, check for cable or switch issues.
- Storage performance degrades over time. This could be due to fragmentation or insufficient metadata servers. Defragment or scale out metadata nodes.
- Cannot achieve rated bandwidth. Check PCIe lanes—a GPU might be on a x8 slot instead of x16, halving bandwidth. Also check if your NIC is on a shared PCIe switch.
Frequently Asked Questions
Q: Can I use Ethernet instead of InfiniBand?
A: Yes, with RoCEv2 on 100/200/400 Gbps Ethernet, you can get RDMA performance close to InfiniBand, but you need lossless network configuration (PFC, ECN).
Q: How much storage bandwidth do I need for a 100GB model?
A: It depends on how fast you want to read it. If you want to load it in 10 seconds, you need 10 GB/s. For training, you typically need less because data is read in batches.
Q: Should I use local SSDs or a parallel file system?
A: For a single node, local SSDs are fastest and simplest. For multi-node, you need a parallel FS to share data. In the cloud, managed parallel FS is easier to maintain.
Q: What is NVMe-oF and do I need it?
A: NVMe-oF lets you access NVMe SSDs over the network with low latency. It's useful when you want to pool storage across servers, but it adds complexity. Start with local NVMe if you can.
Q: How do I estimate network bandwidth for data-parallel training?
A: Use the formula: (model size in GB) / (time per step in seconds) × 2. For a 1GB model with 1 second per step, you need 2 GB/s per node. Add overhead for gradients and other traffic.
Q: What is oversubscription and why does it matter?
A: Oversubscription is the ratio of total downstream bandwidth to upstream bandwidth on a switch. A 1:1 ratio means no congestion. Higher ratios (e.g., 4:1) are cheaper but can cause bottlenecks.