Learn about Fio:

  1. Fio
  2. Fio Basics
  3. Compile Fio
  4. Visualize Fio Logs with fio2gnuplot


Fio offers the possibility to log the performance values with log files during test runs . At certain intervals, the achieved performance values are written to a file. fio2gnuplot is a script that generates graphs from these log files . It can also generate comparative graphs from multiple logs .


fio2gnuplot since Fio Version 2.1.2 part of Fio. Under Ubuntu 14.04 LTS aka Trusty is Fio 2.1.3 in the repos. The gnuplot package is also installed to generate the graphs:

$ sudo apt-get install fio gnuplot
 [ ... ] 
Setting up fio ( 2.1.3-1 ) ...
Setting up gnuplot ( 4.6.4-2 ) ...
$ dpkg -L fio | grep fio2gnuplot
/ Usr / bin / fio2gnuplot

Create Fio Logs

To create the log files with Fio, the following options are used:

  • write_bw_log
  • write_iops_log
  • write_lat_log

See the Fio Fundamentals article for more information about the Fio options. In a job file, the options are specified as follows:

rw = read
write_bw_log = seq-read

After the test run, Fio writes the log files:

$ head seq-read_bw.log 
502, 20908, 0, 65536
1004, 21673, 0, 65536
1512, 8583, 0, 65536
2014, 16191, 0, 65536
2522, 25952, 0, 65536

This file will serve as input for fio2gnuplot . To compare several test runs, use the log files of the respective tests for fio2gnuplot together as input.

Generate graphs

The help of fio2gnuplot provided first information for use: [2]

$ fio2gnuplot -h
fio2gnuplot -ghbiodvk -t <title> -o <outputfile> -p <pattern> -G <type> -m <time> -M <time>
-h --help: Print this help 
-p <pattern> or --pattern <pattern>: A pattern in regexp to select fio input files
-b or --bandwidth: A predefined pattern for selecting * _bw.log files
-i or --iops: A predefined pattern for selecting * _iops.log files
-g or -gnuplot: Render gnuplot traces before exiting

The following example uses two logfiles to compare with fio2gnuplot :

$ ls * seq-read_bw.log
512K-seq-read_bw.log default-seq-read_bw.log
$ fio2gnuplot -p '* seq-read_bw.log' -g
 2 files Selected with pattern '* seq-read_bw.log' 
 | -> 512K-seq-read_bw.log
  | -> default-seq-read_bw.log
Running gnuplot rendering
Rendering traces are available in the current directory

The following graphs were created in the current directory:

$ ls * .png
512K-seq-read_bw-2Draw.png compare-seq-read_bw-2Dsmooth.png default-seq-read_bw-2Dtrend.png seq-read_bw.min.png
512K-seq-read_bw-2Dsmooth.png compare-seq-read_bw-2Dtrend.png seq-read_bw-3D.png seq-read_bw.png
512K-seq-read_bw-2Dtrend.png default-seq-read_bw-2Draw.png seq-read_bw.average.png seq-read_bw.stddev.png
compare-seq-read_bw-2Draw.png default-seq-read_bw-2Dsmooth.png seq-read_bw.max.png
Categories: Tutorials

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: