Fio is a flexible I/O benchmark tool that generates synthetic disk workloads (sequential, random, mixed) so you can measure throughput, latency, and IOPS of drives, filesystems, or block devices on Linux and other OSes
Information
fio is one of the preinstalled packages for our r/Techsupport Rescue Media. If you are using this live image, you can skip the installation section.
How to install fio
Refer below for installation instructions if you are not using our live image or want to install it on your own system.
Installing fio
Refer below for installation instructions if you are not using our live image or want to install it on your own system.
Running fio on a mounted filesystem or active block device can cause data loss. Always ensure you are targeting the correct device and have backups before running tests!
This is a guide for making your own custom tests. FIO runs via command line or job files (INI-style text files with [global] and [jobname] sections). The general idea usually goes:
Target a file (filename=testfile) or block device (filename=/dev/sdX – use lsblk to identify).
If you have a dedicated set of tests you want to create for reuse later, you will create a .fio job file (e.g., nano test.fio), then run fio test.fio. The general ideas on the key aspects to focus on are:
Advanced: rwmixread=80 (read % in mixed), ramp_time=10s (warmup), stonewall (pause between jobs).
An example job file would look like so:
[global]
ioengine=libaio
direct=1
time_based
runtime=60
group_reporting
[randread]
rw=randread
bs=4k
iodepth=32
size=10G
numjobs=4
You will then run this test file by typing sudo fio test.fio. For more information on how to create a test file, please visit the official FIO documentation hub.