Benchmarking with fio and generating graphs

Discussion in 'Hard Drives and Solid State Drives' started by nry, Nov 30, 2015.

  1. nry

    nry Active Member

    Joined:
    Feb 22, 2013
    Messages:
    311
    Likes Received:
    61
    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
     
    #1
    Last edited: Nov 30, 2015
    bash8061 likes this.
  2. nry

    nry Active Member

    Joined:
    Feb 22, 2013
    Messages:
    311
    Likes Received:
    61
    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
    [​IMG]

    IOPS
    [​IMG]

    I/O latency
    [​IMG]

    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 :)
     
    #2
    bash8061, jerrytsao, eva2000 and 7 others like this.
  3. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,759
    Likes Received:
    855
    I just did this, awesome :-D My io latency graphs did not nearly and pretty/no data actually on some. Guess I will increase data set size back to your 128gb.
     

    Attached Files:

    #3
    T_Minus and Patrick like this.
  4. Patrick

    Patrick Administrator
    Staff Member

    Joined:
    Dec 21, 2010
    Messages:
    11,524
    Likes Received:
    4,450
    #4
    gigatexal likes this.
  5. nry

    nry Active Member

    Joined:
    Feb 22, 2013
    Messages:
    311
    Likes Received:
    61
    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.
     
    #5
    bash8061 and Patrick like this.
  6. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,759
    Likes Received:
    855
    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.
     
    #6
  7. whitey

    whitey Moderator

    Joined:
    Jun 30, 2014
    Messages:
    2,759
    Likes Received:
    855
  8. bash8061

    bash8061 New Member

    Joined:
    Sep 25, 2016
    Messages:
    1
    Likes Received:
    0
    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.
     
    #8
    Last edited: Sep 25, 2016
  9. chrispitude

    chrispitude Member

    Joined:
    Dec 14, 2017
    Messages:
    38
    Likes Received:
    1
    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...
     
    #9
Similar Threads: Benchmarking generating
Forum Title Date
Hard Drives and Solid State Drives Single NVME node Ceph Benchmarking OSD Tips May 22, 2017
Hard Drives and Solid State Drives Benchmarking NAS drives Jan 15, 2015
Hard Drives and Solid State Drives Benchmarking SSDs Aug 8, 2012

Share This Page