Environment
RAID Model: All
Host Hardware: AMD/Intel
Operating System: Linux
This document provides quick and straightforward instructions for performing storage performance testing using the FIO benchmarking tool on Linux.
Note: Avoid running these tests on production servers during peak hours, as it will significantly impact system performance.
1. Install FIO
To install the FIO benchmarking tool, follow the instructions based on your Linux distribution:
For RHEL-based Distributions (e.g., Red Hat, CentOS, Fedora, Alma Linux, Rocky Linux):
Use one of the following commands based on your package manager:s
sudo dnf -y install fio
or
sudo yum -y install fio
ForDebian-based Distributions (e.g., Debian, Ubuntu):
Run the following command:
sudo apt install fio
2. Run the Desired Workload Test
Use the commands provided below to simulate different workloads.
Commands for Workload Testing
Environment-Specific Adjustments
Before executing the commands below, customize the following parameters according to your system:
--filename=/dev/gdg0n1 Check lsblkfor the device you wish to test
--numjobs=32 This should equal the cores you have
--cpus_allowed=0-31 This should equal the cores you have
--iodepth=32 Try increasing this figureto 64, 128, 256, 512
Commands
** Before using these commands please ensure they have been amended detailed in the previous section "Environment-Specific Adjustments" **
For consistent results, it’s recommended to run the following tests in the order listed below. You can copy and paste these.
The results will be displayed after the duration of the test.
Random Read
sudo fio --name=randread-test --filename=/dev/gdg0n1 --numjobs=32 --cpus_allowed=0-31 --iodepth=64 --runtime=300 --rw=randread --bs=4K --time_based=1 --randrepeat=0 --ioengine=libaio --direct=1 --random_generator=tausworthe64 --cpus_allowed_policy=split --group_reporting=1 --norandommap=1
Sequential Read
sudo fio --name=seqread-test --filename=/dev/gdg0n1 --numjobs=32 --cpus_allowed=0-31 --iodepth=32 --runtime=300 --rw=read --bs=1m --time_based=1 --randrepeat=0 --ioengine=libaio --direct=1 --random_generator=tausworthe64 --cpus_allowed_policy=split --group_reporting=1 --norandommap=1
Sequential Write
sudo fio --name=seqwrite-test --filename=/dev/gdg0n1 --numjobs=32 --cpus_allowed=0-31 --iodepth=32--runtime=300 --rw=write --bs=1m --time_based=1 --randrepeat=0--ioengine=libaio --direct=1 --random_generator=tausworthe64 --cpus_allowed_policy=split --group_reporting=1 --norandommap=1
Random Write
sudo fio --name=randwrite-test --filename=/dev/gdg0n1 --numjobs=32 --cpus_allowed=0-31 --iodepth=64 --runtime=300 --rw=randwrite --bs=4K --time_based=1 --randrepeat=0 --ioengine=libaio --direct=1 --random_generator=tausworthe64 --cpus_allowed_policy=split --group_reporting=1 --norandommap=1
Using Files
instead of commands
As an alternative to using the commands in the previous section, sometimes it is preferred to create four .txt files instead as shown below.
1) Create a txt file for each job you would like to run and copy them to a directory.
2) Cd to that directory and run the file/job by using the following command.
fio [file_name.txt]
Here is an example of a FIO job file

Example text to copy into your own .txt files are shown below.
_______________________________________________
Random_read.txt *This is just the name of the file, do not include it in the text file itself*
[global]
#insert the appropriate block device below
filename=/dev gdgxxx
randrepeat=0
ioengine=libaio
direct=1
random_generator=tausworthe64
cpus_allowed_policy=split
group_reporting=1
norandommap=1
time_based=1
runtime=300
[randread]
rw=randread
bs=4K
#change numjobs and cpus_allowed to equal the cores in the server
numjobs=32
cpus_allowed=0-31
#iodepth for Random should equal 4096/numjobs
iodepth=64
________________________________________
sequential_read.txt *This is just the name of the file, do not include it in the text file itself*
[global]
#insert the appropriate block device below
filename=/dev/gdgxxx
time_based=1
runtime=300
randrepeat=0
ioengine=libaio
direct=1
random_generator=tausworthe64
cpus_allowed_policy=split
group_reporting=1
norandommap=1
[seqread]
rw=read
bs=1m
#change numjobs and cpus_allowed to equal the cores in the server
numjobs=32
cpus_allowed=0-31
#iodepth for sequential should equal 2048/numjobs
iodepth=32
________________________________________
Sequential_write.txt *This is just the name of the file, do not include it in the text file itself*
[global]
#insert the appropriate block device below
filename=/dev/ gdgxxx
time_based=1
runtime=300
randrepeat=0
ioengine=libaio
direct=1
random_generator=tausworthe64
cpus_allowed_policy=split
group_reporting=1
norandommap=1
[seqwrite]
rw=write
bs=1m
#change numjobs and cpus_allowed to equal the cores in the server
numjobs=32
cpus_allowed=0-31
#iodepth for sequential should equal 2048/numjobs
iodepth=32
________________________________________
Random_write.txt *This is just the name of the file, do not include it in the text file itself. *
[global]
#insert the appropriate block device below
filename=/dev gdgxxx
randrepeat=0
ioengine=libaio
direct=1
random_generator=tausworthe64
cpus_allowed_policy=split
group_reporting=1
norandommap=1
time_based=1
runtime=300
[randwrite]
rw=randwrite
bs=4K
#change numjobs and cpus_allowed to equal the cores in the server
numjobs=32
cpus_allowed=0-31
#iodepth for Random should equal 4096/numjobs
iodepth=64