Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

AI Storage: Capacity, IOPS, Throughput, Cost

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Choosing storage for AI training workloads means balancing four competing demands: capacity for your dataset, throughput for streaming data into GPUs, IOPS for small random reads, and cost that fits your budget. This guide walks through the decision process step by step, from profiling your workload to picking a storage tier and validating it with a real test.

What You'll Need

  • Dataset size and expected growth rate (e.g., 50 TB now, 10 TB/month)
  • Training framework details (PyTorch, TensorFlow, etc.) and data loader settings
  • GPU cluster specs: number of GPUs, network speed (e.g., 100 GbE), and local NVMe capacity
  • IO profiling tool (e.g., iostat, fio, or cloud provider monitoring)
  • Budget range and cost model (per GB/month, per IOPS, egress fees)

Step-by-Step

  1. Profile your workload. Run a training job with a small sample of your data and monitor IO. Capture read/write ratio, average IO size, IOPS, and throughput. Use iostat -x 1 on Linux or cloud monitoring dashboards. Record peak values, not just averages.
  2. Estimate capacity requirements. Multiply your dataset size by 2-3x to account for checkpoints, temporary files, and versioning. Add expected growth over 12-24 months. For example, 50 TB dataset + 20% overhead + 10 TB/month × 12 = 194 TB.
  3. Determine throughput needs. GPU clusters can easily saturate 100 GbE (≈12 GB/s). If you have 8 GPUs each reading at 2 GB/s, you need at least 16 GB/s sustained throughput. Match storage throughput to your network and GPU consumption rate.
  4. Calculate IOPS requirements. Small random reads (e.g., 4K-64K) happen during data augmentation and shuffling. Count the number of files and how often they are accessed per second. A rule of thumb: 1,000-5,000 IOPS per GPU for typical image or text datasets, but profile to be sure.
  5. Choose a storage tier. Options range from local NVMe (highest performance, low capacity, expensive per GB) to network-attached HDD (low cost, low IOPS). For most AI training, a parallel file system (like Lustre or GPFS) or object storage with high throughput (like S3 with prefix-level parallelism) is a good middle ground. Consider cloud options: instance storage, network block storage (EBS), or managed parallel file systems.
  6. Match storage to data access pattern. If your dataset is read sequentially in large chunks, prioritize throughput over IOPS. If you do heavy random access (e.g., many small files), prioritize IOPS. For checkpointing, you need high write throughput but can tolerate some latency.
  7. Estimate cost. Calculate total cost of ownership (TCO) over 3 years: storage capacity cost + IOPS cost (if provisioned) + data transfer/egress fees + operational overhead (managed vs. self-managed). Compare on-premises vs. cloud. For cloud, use the provider's pricing calculator, but factor in that reading data from object storage may incur per-request costs.
  8. Run a proof-of-concept test. Before committing, run a small training job on the candidate storage. Use fio to simulate your IO pattern and measure actual throughput and IOPS. Also test with your real data loader to see if it becomes a bottleneck.
  9. Plan for scaling. Ensure the storage solution can grow capacity and performance independently. For example, object storage scales easily but may have throughput limits per prefix; parallel file systems can add nodes but have a management overhead.
  10. Monitor and adjust. After deployment, continuously monitor storage metrics during training. If you see I/O wait times or GPU starvation, adjust the storage configuration (e.g., increase parallelism, switch to a faster tier).

Common Mistakes

  • Overprovisioning IOPS. Many AI workloads are throughput-bound, not IOPS-bound. Buying high-IOPS storage when you only need sequential reads wastes money.
  • Ignoring checkpoint write bursts. Checkpointing can write huge amounts of data in seconds. If your storage can't handle the burst, training stalls. Always test with a realistic checkpoint size.
  • Choosing capacity based on raw dataset size. You need space for intermediate files, logs, and multiple versions. Add overhead.
  • Forgetting network bottlenecks. Even if storage is fast, your network may cap throughput. Ensure the connection between GPUs and storage is at least as fast as the storage's peak throughput.
  • Using object storage for small random reads. Object storage is great for large files but has high latency per request. For many small files, a parallel file system or local NVMe is better.

Tips

  • Use local NVMe for hot data. Cache frequently accessed data on local SSDs to reduce load on central storage.
  • Prefetch and pipeline. Use data loaders with multiple worker processes to overlap I/O with computation, hiding latency.
  • Compress data. Store compressed formats (e.g., TFRecord, WebDataset) to reduce capacity and increase effective throughput.
  • Consider tiered storage. Keep hot data on fast storage, warm data on standard, and cold data on archive. Automate data movement.
  • Negotiate or use spot pricing. In the cloud, use spot instances for storage if your training can tolerate interruptions.

Troubleshooting

  • Training is slow but CPU/GPU utilization is low. Likely I/O bottleneck. Check storage metrics; if throughput is near max, increase parallelism or move to a faster tier.
  • High latency on small reads. If using object storage, increase the number of concurrent connections or switch to a parallel file system.
  • Out of storage mid-training. Your capacity estimate was too low. Add storage dynamically if possible, or clean up old checkpoints.
  • Cost overruns. Review your IOPS and throughput usage; you may be paying for provisioned performance you don't use. Switch to a pay-as-you-go model.
  • Checkpoint writes fail. Ensure storage has enough free space and can handle the write burst. Test with a large file write before training.

Frequently Asked Questions

What is more important for AI training: IOPS or throughput?

It depends on your data. If you read large files sequentially (e.g., video, high-res images), throughput is key. If you have many small files (e.g., text, small images), IOPS matter more. Profile your workload to know.

Can I use object storage for AI training?

Yes, but only if your data is in large files and you can tolerate higher latency. Use a data loader that prefetches and caches. For small files, consider packing them into larger archives.

How much overhead should I add to my dataset size?

At least 20-30% for checkpoints and temporary files. If you version datasets, plan for 2-3x the raw size.

Is local NVMe always the best choice?

Local NVMe is fastest but limited in capacity and expensive per GB. It's best for a working set, not for the entire dataset. Use it as a cache.

How do I estimate storage cost in the cloud?

Use the provider's pricing calculator, but include egress fees (data leaving the cloud) and request costs for object storage. Multiply by your expected usage.

What is a parallel file system and do I need one?

It's a storage system that distributes data across multiple servers to provide high aggregate throughput. You need it if your training requires >10 GB/s sustained throughput or if you have many GPUs reading simultaneously.