Benchmarking with fio and generating graphs

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

nry

Active Member
Feb 22, 2013
312
61
28
Trying to benchmark some drives on my Ubuntu server.

I seem to remember doing this briefly in the past (after seeing Creating storage benchmark charts with fio and GNUplot and researching the fio_generate_plots tool) but I didn't make any notes on this!

Kind of looking for a set of tests which I can run on the command line which will give me details on read/write for the following:
  • Sequential throughput
  • IOPS
  • Latency
Then these plotted on a graph, as they look pretty :rolleyes:. I'm 99% sure this is possible, but as I'm inexperienced with using fio I was wondering if anyone had any pointers :)

Seems "genfio" would be a good starting point, just not too sure how to use it currently.

Thanks
 
Last edited:
  • Like
Reactions: bash8061

nry

Active Member
Feb 22, 2013
312
61
28
I'll answer my own question as I managed to work it out. These are the steps I used to create some fairly simple graphs.

I tried to use genfio, while it does almost generate a working fio file, theres a few things which needed changing as I was getting "sh: 0: Illegal option -" and the version (2.1.3) installed with Ubuntu 14.04 does not support filename for generation. (Believe this may have been added in 2.2.0)

First install fio and gnuplot.
Code:
apt-get install fio gnuplot
Found it best to break random and sequential tests up otherwise the output graphs are a little messy.

Create a "sequential" directory for all the results to be placed into. Within this a fio file "sequential.fio" for testing the sequential performance:
Code:
[global]
ioengine=libaio
invalidate=1
ramp_time=5
size=128G
iodepth=32
runtime=30
time_based

[write-fio-4k-para]
bs=4k
stonewall
filename=/media/zfstest/fio
rw=write
write_bw_log=4k-write.results
write_iops_log=4k-write.results
write_lat_log=4k-write.results

[read-fio-4k-para]
bs=4k
stonewall
filename=/media/zfstest/fio
rw=read
write_bw_log=4k-read.results
write_iops_log=4k-read.results
write_lat_log=4k-read.results
Note: filename path will need changing!

Run the tests
Code:
fio sequential.fio
Directory should look something like the following:
Code:
-rw-r--r-- 1 root root     1305 Nov 30 15:19 4k-read.results_bw.log
-rw-r--r-- 1 root root 66843220 Nov 30 15:19 4k-read.results_clat.log
-rw-r--r-- 1 root root     1293 Nov 30 15:19 4k-read.results_iops.log
-rw-r--r-- 1 root root 66844275 Nov 30 15:19 4k-read.results_lat.log
-rw-r--r-- 1 root root 77449891 Nov 30 15:19 4k-read.results_slat.log
-rw-r--r-- 1 root root     1299 Nov 30 15:18 4k-write.results_bw.log
-rw-r--r-- 1 root root 14000078 Nov 30 15:18 4k-write.results_clat.log
-rw-r--r-- 1 root root     1270 Nov 30 15:18 4k-write.results_iops.log
-rw-r--r-- 1 root root 14003825 Nov 30 15:18 4k-write.results_lat.log
-rw-r--r-- 1 root root 14968393 Nov 30 15:18 4k-write.results_slat.log
Now we can generate the graphs by running the below command within the directory of the above results.
Code:
fio_generate_plots "Sequential Test"
There will now be 5 svg files which you should be able to open in your browser.

Bandwidth


IOPS


I/O latency


Far from perfect as still need to work out the following
- How to remove/change data source?
- Key has useless labels

But it's a start :)
 

nry

Active Member
Feb 22, 2013
312
61
28
I have it on my list of TODOs to generate some script for performing a suite of tests! Just work is taking up all my free time currently.
 

whitey

Moderator
Jun 30, 2014
2,766
868
113
41
What's up w/ everything showing 'queue depth' for the graph legend, is that really read (red), write (blue)?

Just ran a new set of tests via a ubuntu 16.04 LTS machine, seems gnuplot is happier here as ALL my graphs are generating now.
 

bash8061

New Member
Sep 25, 2016
1
0
1
30
Trying to benchmark some drives on my Ubuntu server.

I seem to remember doing this briefly in the past (after seeing Creating storage benchmark charts with fio and GNUplot and researching the fio_generate_plots tool) but I didn't make any notes on this!

Kind of looking for a set of tests which I can run on the command line which will give me details on read/write for the following:
  • Sequential throughput
  • IOPS
  • Latency
Then these plotted on a graph, as they look pretty :rolleyes:. I'm 99% sure this is possible, but as I'm inexperienced with using fio I was wondering if anyone had any pointers :)

Seems "genfio" would be a good starting point, just not too sure how to use it currently.

Thanks
did you try fio2gnuplot? if yes need some help as I am trying to generate some graphs but these graphs are making no sense ,can we decide which kind of graph we want(like what vs what) x-axis here is always time.
 
Last edited:

chrispitude

Member
Dec 14, 2017
38
2
8
50
Allentown, PA
Reviving an old thread...

So I've been learning fio, and I came across the fio-visualizer utility, which is an Intel-sponsored open-source GUI front-end for fio:

GitHub - intel/fiovisualizer

After that, I found that fio also comes with gfio, its own GUI front-end:

1. fio - Flexible I/O tester rev. 3.2 — fio 3.2-13-g40e5f-dirty documentation

Both of these these are interactive tools, and they seem useful for experimenting with job files to get the tests right.

Speaking of which, now it's time to look into job-generating tools and plotting tools...