Choosing storage for an AI inference server is about balancing speed, capacity, and cost so that model loading and data access do not become a bottleneck. This guide walks you through the key decisions—from interface and drive type to capacity planning and redundancy—so you can pick a storage setup that matches your workload and budget.
What You’ll Need
- An estimate of your model sizes (sum of all weights and associated files)
- Expected concurrent inference requests (QPS) and latency targets
- Typical input/output data size per request (e.g., images, text, audio)
- Your server’s available drive bays and PCIe slots
- Budget for hardware and ongoing power/cooling costs
Step-by-Step
- Estimate your working set size. Sum the sizes of all model weights, tokenizer files, and any preprocessed data you need to keep hot. For example, a 7B parameter model in FP16 takes about 14 GB, while a 70B model takes about 140 GB. Add 20–30% headroom for temporary files and OS overhead.
- Determine your latency budget. If you need to load a model into RAM or GPU memory on cold start, storage read speed matters. For a 14 GB model, a SATA SSD at ~500 MB/s takes ~28 seconds; an NVMe SSD at ~3,500 MB/s takes ~4 seconds. If you can keep models resident in memory, storage speed matters less.
- Choose the drive type.
- NVMe SSD (PCIe 3.0/4.0/5.0): Best for most inference servers. High sequential and random read speeds, low latency. Use for OS, model weights, and hot data.
- SATA SSD: Cheaper but slower (~500 MB/s). Acceptable for cold storage or if models fit in RAM.
- HDD: Only for archival or rarely used models. Too slow for real-time inference.
- Decide on capacity per drive. Choose drives that give you at least 2x your working set size. For example, if your models total 100 GB, a single 240 GB NVMe is enough, but 500 GB gives more headroom for logs and temporary data.
- Plan for redundancy. Use RAID 1 (mirroring) for the OS and model drives if you need high availability. For large capacity with some redundancy, RAID 10 or RAID 5 (with a spare) are options, but RAID 5 write performance can be a bottleneck. Alternatively, keep a backup of model files on a separate drive or object storage.
- Consider the interface. Most modern servers have M.2 or U.2 slots for NVMe. Check your motherboard specs: M.2 slots may share PCIe lanes with other devices, and some slots are SATA-only. Use PCIe 4.0 or 5.0 NVMe drives if your server supports them for maximum throughput.
- Think about data locality. If your inference server runs in a cloud environment, choose storage that is in the same region/zone as your compute to minimize network latency. For on-prem, keep model files on the same server or a low-latency NAS (not recommended for hot paths).
- Test your setup. After installing, run a benchmark (e.g., fio or dd) to measure sequential and random read speeds. Then load a model and measure time-to-first-token to see if storage is a bottleneck.
Common Mistakes
- Underestimating model size. A 7B model in FP32 takes ~28 GB, not 7 GB. Always check the data type and number of parameters.
- Using a single HDD for hot models. Even a 7200 RPM drive gives ~150 MB/s, making model loads painfully slow.
- Ignoring random read performance. Some workloads read many small files (e.g., tokenizers, configs). NVMe drives excel at random reads; HDDs are terrible.
- Buying a single large drive without backup. If it fails, you lose everything. Always have a mirror or backup.
- Forgetting about power and cooling. Multiple NVMe drives generate heat; ensure proper airflow to avoid thermal throttling.
Tips
- If your models fit in RAM (e.g., 64 GB server with 7B models), a mid-range NVMe is sufficient; you won’t see much benefit from the fastest PCIe 5.0 drives.
- Use a separate drive for logs and temporary files to avoid competing with model reads.
- Consider using a RAM disk for very small models that are loaded frequently, but remember it is volatile.
- For multi-GPU servers, store models on a fast shared storage (e.g., NVMe over fabric) only if you need to load the same model on multiple GPUs; otherwise, local NVMe is simpler.
- Monitor disk I/O with tools like iostat to see if storage is actually the bottleneck before upgrading.
Troubleshooting
- Model loads slowly: Check if the drive is nearly full. SSDs slow down when >70% full. Also verify the drive is connected to a PCIe slot that supports its speed (e.g., a PCIe 4.0 drive in a PCIe 3.0 slot runs at 3.0 speeds).
- High latency spikes: Look for background processes (e.g., backups, log rotation) that are hammering the disk. Use ionice or schedule them off-peak.
- Drive not detected: Ensure the drive is properly seated and the BIOS/UEFI recognizes it. Check if the M.2 slot is disabled when another slot is occupied.
- RAID rebuild takes too long: For large drives, RAID rebuilds can take hours. Use a hot spare and schedule rebuilds during low load.
- Insufficient space: If you run out of space, compress model files (e.g., use quantized versions like int8) or move cold models to an HDD/object storage.
Frequently Asked Questions
Q: Do I need NVMe or is SATA SSD enough?
A: For most inference workloads, SATA SSD is sufficient if models fit in RAM. NVMe helps when loading large models quickly or when reading many small files.
Q: How much storage do I need for a 7B model?
A: A 7B parameter model in FP16 takes ~14 GB. With tokenizer and config files, plan for ~20 GB. In int8, it’s ~7 GB.
Q: Should I use RAID 0 for speed?
A: RAID 0 gives faster reads but no redundancy. If a drive fails, you lose everything. Prefer RAID 1 for reliability, or RAID 10 if you need both speed and redundancy.
Q: Can I store models on a network drive?
A: Yes, but network latency will slow down model loads. Use a low-latency network (e.g., InfiniBand or 25GbE) and consider caching models on local NVMe after first load.
Q: What is the best file system for inference storage?
A: ext4 or XFS are solid choices for Linux. XFS handles large files well. Avoid using a filesystem that is not journaled if you need crash safety.
Q: How do I know if storage is my bottleneck?
A: Monitor disk I/O during inference. If disk utilization is high and read latency spikes, storage is likely the issue. Also check time-to-first-token after a cold start.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Philips DST7060/20 7000 Series Iron: Specs & Fit
- Coal Fueled Jet Aircraft: Could It Work?675 L
- Remote Desktop on Raspberry Pi: How to Enable It
- Word Select Last Line in Paragraph?
- Google Assistant IFTTT Recipes: 7 Useful Automations
- OLED TVs in Dark Rooms: Why They Look Better and When They Don’t