Fio
From Leo's Notes
This page was last edited on 28 July 2022, at 21:58.
The flexible IO (fio) utility can be used to quickly benchmark the filesystem IO performance.
Quick start
Select one of the following commands to run.
| Description | Command |
|---|---|
| Sequential read test, 1MB block size, 1 thread, 1 queue | # fio \
--ioengine=libaio \
--direct=1 \
--randrepeat=0 \
--refill_buffers \
--end_fsync=1 \
--filename=/home/lleung/.kdiskmark.tmp \
--name=sequential-read-8-queues-1-thread \
--rw=read \
--size=1073741824 \
--bs=1024k \
--iodepth=1 \
--numjobs=1 \
--iodepth=8 \
--runtime=5
|
Understanding the results
Results you get after running fio looks like something below:
Starting 1 process
sequential-read-8-queues-1-thread: Laying out IO file (1 file / 1024MiB)
Jobs: 1 (f=1): [R(1)][100.0%][r=241MiB/s][r=241 IOPS][eta 00m:00s]
sequential-read-8-queues-1-thread: (groupid=0, jobs=1): err= 0: pid=137965: Thu Jul 28 15:41:32 2022
read: IOPS=190, BW=191MiB/s (200MB/s)(957MiB/5014msec)
slat (usec): min=105, max=881, avg=222.28, stdev=54.72
clat (msec): min=3, max=426, avg=41.63, stdev=63.38
lat (msec): min=3, max=427, avg=41.86, stdev=63.38
clat percentiles (msec):
- slat - submission latency. This is the time it took to submit the I/O. This could be useful if you need to determine if you need to tune the IO scheduler (eg. from spinning disk to SSD) or if there's a network issue for network based filesystems.
- clat - completion latency. This is the time between submission and completion.
Other notes
Drop caches
You might want to drop caches before doing a test to avoid skewed results by running: echo 1 > /proc/sys/vm/drop_caches
Change the output format
Use the --output-format=json option to change the output format to json.