Install fio Benchmarking Tool on Raspberry Pi

Install fio Benchmarking Tool on Raspberry Pi

The fio (Flexible I/O Tester) is a benchmarking and testing tool used to evaluate the performance of storage systems. It is commonly employed to test the input/output performance of hard drives, SSDs, RAID arrays, and SANs.

This tutorial explains how to install fio benchmarking tool on Raspberry Pi.

Install fio

Execute the following command to update the package lists:

sudo apt update

Install fio:

sudo apt install -y fio

To verify installation, check fio version:

fio --version

Testing fio

To run the fio command, we can specify various options to define the testing workload. For instance, 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 provided command performs a read performance test on a 100MiB file (--size=102400k) with a block size of 1MiB (--bs=1024k), executing 32 I/O operations concurrently (--iodepth=32). It utilizes Linux's native asynchronous block-level I/O (--ioengine=libaio), while the --direct=1 option ensures the test bypasses the OS cache.

Below is an example of the output:

fio_test: (groupid=0, jobs=1): err= 0: pid=1509: Mon Mar 10 11:34:29 2025
  read: IOPS=43, BW=43.1MiB/s (45.2MB/s)(100MiB/2320msec)
    slat (usec): min=66, max=81226, avg=5528.93, stdev=12174.89
    clat (msec): min=31, max=1400, avg=624.63, stdev=370.36
     lat (msec): min=54, max=1400, avg=630.15, stdev=365.21
    clat percentiles (msec):
     |  1.00th=[   32],  5.00th=[   87], 10.00th=[  132], 20.00th=[  262],
     | 30.00th=[  376], 40.00th=[  468], 50.00th=[  642], 60.00th=[  718],
     | 70.00th=[  726], 80.00th=[  953], 90.00th=[ 1183], 95.00th=[ 1284],
     | 99.00th=[ 1385], 99.50th=[ 1401], 99.90th=[ 1401], 99.95th=[ 1401],
     | 99.99th=[ 1401]
   bw (  KiB/s): min=10240, max=83968, per=100.00%, avg=47104.00, stdev=36864.00, samples=3
   iops        : min=   10, max=   82, avg=46.00, stdev=36.00, samples=3
  lat (msec)   : 50=3.00%, 100=5.00%, 250=11.00%, 500=23.00%, 750=29.00%
  lat (msec)   : 1000=11.00%, 2000=18.00%
  cpu          : usr=0.00%, sys=3.32%, ctx=179, majf=0, minf=8218
  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=43.1MiB/s (45.2MB/s), 43.1MiB/s-43.1MiB/s (45.2MB/s-45.2MB/s), io=100MiB (105MB), run=2320-2320msec

Disk stats (read/write):
  mmcblk0: ios=120/41, merge=0/1, ticks=55397/2515, in_queue=57912, util=93.09%

Uninstall fio

To fully remove fio and its related dependencies, run the following command:

sudo apt purge --autoremove -y fio

Leave a Comment

Cancel reply

Your email address will not be published.