In performance-critical computing environments specially in Gaming Rig, understanding the limits of your disk subsystem is just as important as testing CPU or GPU. Whether you’re evaluating a new SSD, tuning a server for IOPS, or benchmarking storage for a high-availability system, Fio (Flexible IO Tester) is a powerful open-source tool that lets you stress test and benchmark disk I/O performance.
This tech concept, walks you through using Fio to simulate various workloads and provides hands-on examples tailored for SSDs and HDDs. For 20+ years, I’ve turned code into products and ideas into growth stories. I believe in tech’s power to transform—and I’m here to share my experience so all tech enthusiast tap into it. Your journey starts now, and it’s full of possibility.
What is Fio?
Fio (Flexible I/O Tester) is a command-line tool developed by Jens Axboe, designed to measure and stress-test storage I/O subsystems. It supports a wide range of I/O engines, offers scripting capabilities, and is highly customizable.
Why Use Fio?
Fio can simulate:
- Sequential and random reads/writes
- Different block sizes and I/O depths
- Sync and async operations
- Multiple jobs across devices or files
- Latency, IOPS, and bandwidth reporting
This makes it ideal for:
- Stress testing new SSDs or NVMe drives
- Benchmarking RAID arrays or SAN/NAS systems
- Identifying bottlenecks in disk I/O paths
- Testing filesystem performance under load
Installing Fio
On Ubuntu/Debian
sudo apt update
sudo apt install fio
On CentOS/RHEL
sudo yum install fio
On macOS (via Homebrew)
brew install fio
Basic Fio Concepts
- filename: Target file or block device (e.g.,
/dev/nvme0n1
) - rw: Type of I/O pattern (
read
,write
,randread
,randwrite
, etc.) - bs: Block size (e.g.,
4k
,128k
) - size: Total amount of data to read/write
- numjobs: Number of threads/jobs
- iodepth: Number of I/Os in flight
- runtime: Duration of the test
- direct: Use direct I/O (bypass page cache)
- output-format: JSON or human-readable
Sample Fio Commands for SSD Stress Testing
1. Sequential Read Test
fio --name=seq_read --rw=read --bs=128k --size=2G --numjobs=1 --iodepth=16 --direct=1 --filename=/dev/nvme0n1 --runtime=60 --time_based
- Simulates sequential read with 128KB blocks
- Good for measuring throughput (MB/s)
2. Sequential Write Test
fio --name=seq_write --rw=write --bs=128k --size=2G --numjobs=1 --iodepth=16 --direct=1 --filename=/dev/nvme0n1 --runtime=60 --time_based
- Tests write speed
- Important for SSD endurance and logging systems
3. Random Read Test
fio --name=rand_read --rw=randread --bs=4k --size=2G --numjobs=4 --iodepth=32 --direct=1 --filename=/dev/nvme0n1 --runtime=60 --time_based
- Simulates database-like small random reads
- Reports IOPS and latency metrics
4. Random Write Test
fio --name=rand_write --rw=randwrite --bs=4k --size=2G --numjobs=4 --iodepth=32 --direct=1 --filename=/dev/nvme0n1 --runtime=60 --time_based
- Useful for stress testing log-heavy applications
5. Mixed Read/Write Load (70/30)
fio --name=mixed_rw --rw=randrw --rwmixread=70 --bs=4k --size=2G --numjobs=4 --iodepth=16 --direct=1 --filename=/dev/nvme0n1 --runtime=60 --time_based
- Emulates real-world mixed usage patterns
Output Metrics to Watch
- IOPS (I/O operations per second)
- Bandwidth (MB/s)
- Latency (average, min, max)
- CPU usage
You can also output the result in JSON and use it for dashboard visualization:
fio --name=test --rw=randread --output-format=json > fio_output.json
Best Practices for SSD Testing
- Use
--direct=1
to avoid caching - Ensure test file size > RAM to bypass OS cache
- Avoid running on mounted filesystems for raw device tests
- Use
--time_based
for consistent load over time - Combine with system tools like
iostat
,vmstat
, ordstat
for holistic insights
Example: Full Benchmark Script
#!/bin/bash
DEVICE="/dev/nvme0n1"
echo "Starting SSD benchmark on $DEVICE"
fio --name=seq_read --rw=read --bs=128k --size=2G --numjobs=1 --iodepth=16 --direct=1 --filename=$DEVICE --runtime=60 --time_based
fio --name=seq_write --rw=write --bs=128k --size=2G --numjobs=1 --iodepth=16 --direct=1 --filename=$DEVICE --runtime=60 --time_based
fio --name=rand_read --rw=randread --bs=4k --size=2G --numjobs=4 --iodepth=32 --direct=1 --filename=$DEVICE --runtime=60 --time_based
fio --name=rand_write --rw=randwrite --bs=4k --size=2G --numjobs=4 --iodepth=32 --direct=1 --filename=$DEVICE --runtime=60 --time_based
My Tech Advice: Disk I/O bottlenecks can cripple high-performance applications. With Fio, developers, sysadmins, and performance engineers have a powerful ally for assessing disk performance under realistic loads. Whether you’re stress testing for Gaming Rig, database servers, big data platforms, or cloud storage backends, Fio provides the detailed insights needed to build robust, high-throughput systems.
Ready to test your Gaming Rig ? Try the above tech concept, or contact me for a tech advice!
#AskDushyant
For Windows users looking to stress test and benchmark SSDs or HDDs, several reliable tools complement or substitute Fio. CrystalDiskMark is a widely-used, open-source tool that benchmarks sequential and random read/write speeds with configurable test parameters. ATTO Disk Benchmark offers detailed I/O performance insights using various transfer sizes, ideal for evaluating RAID setups or high-speed SSDs. Power users can also install Fio for Windows via WSL (Windows Subsystem for Linux) or use precompiled Windows binaries. Together, these tools offer comprehensive disk performance diagnostics tailored for Windows environments.
Note: The names and information mentioned are based on my personal experience and publicly available data; however, they do not represent any formal statement.
#TechConcept #TechAdvice #PCBuild #GamingRig #SSD #StressTesting #FIO #IOPS
Leave a Reply