Top Disk Benchmark Tips to Improve Storage PerformanceImproving storage performance starts with accurate measurement. Disk benchmarking gives you quantitative data about how your drives behave under different workloads — sequential reads/writes, random I/O, latency, and queue depth — so you can make informed decisions about hardware, configuration, and tuning. This article walks through practical tips to get reliable benchmark results and actionable ways to improve storage performance on consumer and server systems.
Understand what you’re measuring
Before running any tool, decide which metrics matter for your workload:
- Sequential throughput (MB/s) — important for large file transfers, backups, and media streaming.
- Random IOPS (IO operations per second) — critical for databases, virtual machines, and transactional workloads.
- Latency (ms or µs) — crucial for responsiveness in user-facing applications.
- 4K vs large-block performance — small-block (4K) tests stress the drive’s I/O handling; large-block tests (64K, 1MB) show raw throughput.
- Read vs write balance — some workloads are read-heavy, some write-heavy. Measure both.
Pick the block sizes, queue depths, and read/write mixes that reflect your real-world use.
Choose the right benchmarking tool
Use tools appropriate for your OS and level of detail needed. Popular options:
- Windows: CrystalDiskMark, ATTO Disk Benchmark, DiskSpd (Microsoft).
- Linux: fio (flexible I/O tester), hdparm (simple sequential reads), iozone.
- macOS: Blackmagic Disk Speed Test, AmorphousDiskMark, fio.
For reproducible and scriptable tests, fio (cross-platform) and DiskSpd (Windows) are recommended.
Prepare the system for accurate results
Benchmarks are noisy if the system isn’t controlled. Follow these steps:
- Run benchmarks from a clean state: close user applications, background services, and OS update processes.
- Disable aggressive caching only when you want raw device performance; otherwise measure with the cache behavior that matches your workload.
- Ensure drives aren’t in a thermal-throttling state — allow them to cool or monitor temperatures.
- For SSDs, ensure enough free space (many SSDs slow down as capacity fills). Trim/garbage-collect beforehand if modeling steady-state performance.
- On HDDs, defragment if simulating a heavily fragmented consumer drive (though fragmentation isn’t common in server workloads).
- If testing external drives, use the fastest available interface (USB 3.⁄3.2 Gen 2, Thunderbolt) and test with the same cable/port each run.
Use realistic test parameters
Synthetic benchmarks can be misleading if they don’t match how you actually use the drive. Configure:
- Block sizes: use 4K for random I/O-heavy workloads, 64K–1MB for large sequential transfers.
- Queue depth: typical desktop apps use low queue depths (1–4); databases and servers can benefit from higher depths (16–128).
- Read/write mix: common mixes are ⁄30 (read-heavy) for general use or ⁄50 for mixed workloads.
- Test duration: short tests show peak performance; longer runs (minutes) reveal sustained behavior and thermal effects.
- Number of runs: run each test multiple times and take the median to reduce variance.
Example fio command for random 4K read/write mix:
fio --name=randrw --ioengine=libaio --rw=randrw --rwmixread=70 --bs=4k --iodepth=32 --numjobs=4 --size=10G --runtime=180 --time_based
Interpret results correctly
Understanding benchmark output is key to making improvements:
- Compare like-for-like: don’t compare a cached Windows benchmark to an uncached Linux fio run.
- Look beyond peak MB/s — high throughput with high latency may still be bad for responsiveness.
- For SSDs, watch for changing performance over time (steady-state vs fresh-out-of-box).
- Use IOPS and latency percentiles (e.g., 99th percentile) rather than only averages to understand worst-case behavior.
- Consider the effect of the whole I/O stack: filesystem, drivers, controller firmware, RAID, and virtualization layers add latency and variability.
Tuning and configuration tips
Software and OS configuration often give large gains without new hardware:
- Enable TRIM (SSD) so the drive can maintain steady-state performance.
- Use the appropriate filesystem and mount options: ext4/xfs/btrfs choices and mount flags (noatime, nodiratime) can reduce writes.
- For Linux, tune elevator/IO scheduler (noop, deadline, bfq) depending on device type; NVMe generally performs best with noop or none.
- Align partitions to the drive’s erase block or RAID stripe size to avoid write amplification.
- For RAID arrays, choose stripe size and caching policies that match your workload.
- Use write-back or write-through cache policies carefully — write-back improves throughput but risks data loss on power failure unless you have battery-backed cache.
- For virtualization, use virtio drivers and passthrough (NVMe-PT) where possible to reduce overhead.
Hardware upgrades and choices
When software tuning isn’t enough, consider hardware:
- SSD vs HDD: For random I/O and low latency, SSDs are orders of magnitude faster than HDDs.
- SATA SSD vs NVMe: NVMe drives use PCIe lanes and typically deliver much higher throughput and lower latency than SATA SSDs.
- Enterprise vs consumer SSDs: enterprise drives often have higher write endurance, better sustained performance, and power-loss protection.
- Add DRAM or use drives with onboard DRAM for faster mapping (DRAM-less controllers may show higher latency under load).
- Use a faster interface (PCIe Gen4/5, Thunderbolt 4) and ensure your motherboard/CPU lanes aren’t a bottleneck.
Monitor and validate in production
After changes, monitor real workloads:
- Collect IOPS, latency percentiles, queue depth, and throughput from monitoring tools (iostat, nvme-cli, perf, Windows Performance Monitor).
- Validate improvements with A/B testing or rolling deployment rather than assuming synthetic gains translate to end-user benefit.
- Keep firmware and drivers updated — they can contain performance and stability fixes.
Troubleshooting common issues
- Sudden drop in throughput: check temperatures, thermal throttling, firmware, and background tasks (TRIM/resync).
- High latency under load: inspect queue depth, CPU contention, driver issues, and controller limits.
- Inconsistent results between runs: ensure the test is repeatable, run longer tests, and average multiple runs.
Practical checklist before a benchmark run
- Close nonessential apps and services.
- Confirm drive temperature is normal.
- Ensure sufficient free space on SSDs; run TRIM if modeling steady-state.
- Use consistent cables/ports for external drives.
- Choose block size, queue depth, and read/write mix that reflect real use.
- Run each test multiple times and record median values.
Summary
Accurate disk benchmarking combines the right tools, realistic parameters, controlled environment, and correct interpretation. Small software and configuration changes often yield big gains; when hardware is the bottleneck, prioritize SSDs (NVMe where possible) and proper interfaces. Use monitoring to ensure synthetic benchmark improvements translate to better real-world performance.
Leave a Reply