Comprehensive Guide to fio: Advanced I/O Performance Testing Tool

Introduction to I/O Testing Tools

When evaluating storage performance, several I/O testing tools are available. Among the most popular are fio, iometer, and Orion. Each has its strengths: fio is particularly well-suited for Linux environments, iometer excels on Windows systems, and Orion specializes in simulating Oracle database workloads without requiring a full Oracle installation.

Instlaling fio

To install fio on Linux systems, you can either download the source code from the official website and compile it:

tar -xvf fio-2.1.10.tar
cd fio-2.1.10
./configure
make
make install

Or install it using your package manager:

yum -y install fio

Understanding fio Parameters

The fio tool offers numerous parameters to customize your I/O tests. Here are some key parameters:

  • filename: Specifies the target device or file (e.g., /dev/sdb or /dev/emcpowerb)
  • direct=1: Bypasses system buffers for more accurate measurements
  • rw: Defines the I/O pattern (read, write, randread, randwrite, randrw)
  • bs: Block size for I/O operations
  • size: Total size of data to be processed
  • numjobs: Number of parallel jobs/threads
  • runtime: Duration of the test in seconds
  • ioengine: I/O engine to use (psync or libaio)
  • group_reporting: Aggregates results from all jobs

Common I/O Test Scenarios

Here are some typical test scenarios using fio:

Random Read IOPS Test

fio -direct=1 -iodepth=128 -rw=randread -ioengine=libaio -bs=4k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=/dev/sdb -name=Random_Read_Test

Random Write IOPS Test

fio -direct=1 -iodepth=128 -rw=randwrite -ioengine=libaio -bs=4k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=/dev/sdb -name=Random_Write_Test

Sequential Write Throughput Test

fio -direct=1 -iodepth=64 -rw=write -ioengine=libaio -bs=1024k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=/dev/sdb -name=Sequential_Write_Test

Sequential Read Throughput Test

fio -direct=1 -iodepth=64 -rw=read -ioengine=libaio -bs=1024k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=/dev/sdb -name=Sequential_Read_Test

Interpreting fio Test Results

When analyzing fio output, several key metrics are important:

  • io: Total amount of data processed
  • bw: Average I/O bandwidth
  • iops: Input/Output Operations Per Second
  • runt: Total runtime
  • clat: Completion latency
  • lat: Total latency
  • cpu: CPU utilization
  • IO depths: I/O queue depth distribution
  • util: Device utilization percentage

Understanding I/O Queue Depth

Queue depth refers to the number of I/O requests pending at any given time. Increasing queue depth can improve performance by keeping the storage device busy, but may increase latency. The optimal queue depth balances throughput and response time.

Linux systems allow you to view the default queue depth for storage devices:

lsscsi -l

Monitoring I/O Performance with iostat

The iostat command provides detailed insights into disk I/O performance:

iostat -xd 3

Key metrics from iostat include:

  • await: Average time for I/O requests (including queue time)
  • svctm: Service time for I/O operations
  • %util: Device utilization percentage
  • avgqu-sz: Average queue length
  • r/s and w/s: Read and write operations per second
  • rKB/s and wKB/s: Kilobytes read/written per second

For optimal performance, aim for low queue times and high utilization without excessive latency.

Tags: fio I/O testing storage performance Linux iostat

Posted on Sat, 08 Aug 2026 16:54:48 +0000 by tzicha