Skip to content

Instantly share code, notes, and snippets.

@pishangujeniya
Last active February 25, 2025 06:22
Show Gist options
  • Save pishangujeniya/a90307be3f50f6de70a3d327f9b74910 to your computer and use it in GitHub Desktop.
Save pishangujeniya/a90307be3f50f6de70a3d327f9b74910 to your computer and use it in GitHub Desktop.
FIO Ubuntu and Windows commands

For NVMe SSD benchmarking, use these optimized fio commands:

1. Sequential Read/Write Test (Best for Large File Transfers)

fio --name=seq_read_write --size=10G --rw=rw --bs=128k --numjobs=1 --iodepth=32 --direct=1 --runtime=60 --time_based --group_reporting

2. Random Read/Write Test (Best for OS & Application Performance)

fio --name=rand_read_write --size=10G --rw=randrw --rwmixread=70 --bs=4k --numjobs=4 --iodepth=64 --direct=1 --runtime=60 --time_based --group_reporting

(70% Read / 30% Write, 4K block size, high queue depth for NVMe performance)

3. Latency & IOPS Test (Important for Responsiveness)

fio --name=latency_test --size=10G --rw=randread --bs=4k --numjobs=1 --iodepth=1 --direct=1 --runtime=60 --time_based --group_reporting

(Measures random read latency in microseconds)

4. High Queue Depth IOPS Test (Push NVMe to Its Limits)

fio --name=iops_test --size=10G --rw=randread --bs=4k --numjobs=8 --iodepth=128 --direct=1 --runtime=60 --time_based --group_reporting

(Maximizes IOPS by simulating a high parallel workload)

Key Optimizations for NVMe:

  • --direct=1 → Bypasses OS cache for raw disk performance
  • --iodepth=64 or 128 → Uses NVMe's high queue depth capability
  • --bs=128k (sequential) & 4k (random) → Best for SSD/NVMe
  • --rwmixread=70 → Simulates real-world workload (70% Read / 30% Write)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment