Install fio Benchmarking Tool on Ubuntu 24.04

Install fio Benchmarking Tool on Ubuntu 24.04

The fio (Flexible I/O Tester) is a benchmarking and testing tool designed to measure and analyze the performance of storage systems. It is widely used for testing the input/output performance of hard drives, SSDs, RAID arrays, and SANs.

This tutorial shows how to install fio benchmarking tool on Ubuntu 24.04.

Install fio

Update the package lists:

sudo apt update

Execute the following command to install fio:

sudo apt install -y fio

We can check fio version as follows:

fio --version

Testing fio

To use the fio command, we can specify a set of options to define the workload for testing. For example, the command:

fio --name=fio_test --filename=/tmp/fio.tmp --rw=read --direct=1 --bs=1024k --size=102400k --iodepth=32 --ioengine=libaio --numjobs=1

The command runs a read performance test on a 100MiB file (--size=102400k) using 1MiB block size (--bs=1024k), 32 I/O operations at a time (--iodepth=32), and Linux native asynchronous block level I/O (--ioengine=libaio). The --direct=1 option ensures that the test bypasses the OS cache.

Here's an example of the output:

fio_test: (groupid=0, jobs=1): err= 0: pid=1940: Tue Sep 24 16:01:51 2024
  read: IOPS=2173, BW=2174MiB/s (2280MB/s)(100MiB/46msec)
    slat (usec): min=303, max=2570, avg=445.90, stdev=298.83
    clat (usec): min=79, max=17273, avg=10176.86, stdev=3592.63
     lat (usec): min=489, max=19554, avg=10622.76, stdev=3698.78
    clat percentiles (usec):
     |  1.00th=[   80],  5.00th=[ 1926], 10.00th=[ 3654], 20.00th=[ 7373],
     | 30.00th=[10945], 40.00th=[11207], 50.00th=[11207], 60.00th=[11338],
     | 70.00th=[11600], 80.00th=[12256], 90.00th=[13304], 95.00th=[14484],
     | 99.00th=[15139], 99.50th=[17171], 99.90th=[17171], 99.95th=[17171],
     | 99.99th=[17171]
  lat (usec)   : 100=1.00%, 500=1.00%
  lat (msec)   : 2=3.00%, 4=5.00%, 10=17.00%, 20=73.00%
  cpu          : usr=0.00%, sys=100.00%, ctx=1, majf=0, minf=8203
  IO depths    : 1=1.0%, 2=2.0%, 4=4.0%, 8=8.0%, 16=16.0%, 32=69.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=98.6%, 8=0.0%, 16=0.0%, 32=1.4%, 64=0.0%, >=64=0.0%
     issued rwts: total=100,0,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=32

Run status group 0 (all jobs):
   READ: bw=2174MiB/s (2280MB/s), 2174MiB/s-2174MiB/s (2280MB/s-2280MB/s), io=100MiB (105MB), run=46-46msec

Uninstall fio

If you want to completely uninstall fio and related dependencies, execute the following command:

sudo apt purge --autoremove -y fio

Leave a Comment

Cancel reply

Your email address will not be published.