image_pdfimage_print

Flexible IO tester aka FIO is a open-source synthetic benchmark tool initially developed by Jens Axboe and now updated by various developers.   FIO can generate various IO type workloads be it sequential reads or random writes, synchronous or asynchronous, based on the options provided by the user.  FIO provides various global options through which different type of workloads can be generated.  FIO is the easiest and versatile tool to quickly perform IO plumbing tests on storage system.

FIO enables ease of generating sequential or random IO workload with varying number of threads and the percentage of reads and writes for specific block size to mimic real world workload . FIO also has the option to generate very detailed output.  By default it provides key metrics output like IOPS, latency and throughput.

IO Things to consider

To avoid I/Os out of host system cache, use the direct option which will directly read/write to the disk.  Use the Linux native asynchronous IO using the ioengine directive with libaio.

When FIO is invoked, it will create the file with the name provided in –name to the size as provided in –size with block size as –bs.  If the –numjobs are provided, it will create the files in the format of name.n.0 where n will be between 0 and –numjobs.

–jobs = More the jobs, higher the performance can be (based on the resource availability).  If your server is limited on the resources (TCP or FC), run fio across multiple servers to push more workload to the storage subsystem.

–time_based = FIO will run all the way till runtime value.

Software

At this time I am using fio on RHEL 7.0.  You should be able to find the relevant rpm at this site.

FIO Cheat sheet

  1. Sequential Reads – Async mode – 8K block size – Direct IO – 100% Reads

2. Sequential Writes – Async mode – 32K block size – Direct IO – 100% Writes

3. Random Reads – Async mode – 8K block size – Direct IO – 100% Reads

4. Random Writes – Async mode – 64K block size – Direct IO – 100% Writes

5. Random Read/Writes – Async mode – 16K block size – Direct IO – 90% Reads/10% Writes

Sample IO output

The following command creates 8 files (numjobs=8) each with size 512MB (size) at 64K block size (bs=64k) and will perform random read/write (rw=randrw) with the mixed workload of 70% reads and 30% writes. The job will run for full 5 minutes (runtime=300 & time_based) even if the files were created and read/written.