Just First of all, I arrange the terminology of FIO,

From here.

IOPS

  • I recommend you to read Wiki of IOPS at once

  • IOPS means Input/output operations per second

Flexible I/0 Test

FIo is short for Flexble IO, a versatile IO workload generator.

If you basically want to know about FIO. I recommend you this wiki site

The below article will cites the above wiki.

FIO

I think if want to use the fio tool, I have to download from Jens Axboe’s github

And if you want to know more details about FIO, I recommend you HOWTO of Jens Axboe’s github

README of axboe git repository

As you can read, This article introduces you about fio and where you can download Fio Source.

FIO is a tool that will put a number of threads or processes doing a particular type of io action as specified by the user.

The typical use of fio is to write a job file matching the io load one wants to be simulated.

How to install FIO

First of all, you have to choose git repository of fio you will download

For candidates, as follows.

First, git://git.kernel.dk/fio.git and http://git.kernel.dk/fio.git

Second, git://github.com/axboe/fio.git and https://github.com/axboe/fio.git

In my case, I used canonical place, http://git.kernel.dk/fio.git

$ git clone http://git.kernel.dk/fio.git

$ git clone http://git.kernel.dk/fio.git
Cloning into 'fio'...
remote: Counting objects: 22539, done.
remote: Compressing objects: 100% (6932/6932), done.
remote: Total 22539 (delta 16654), reused 20973 (delta 15554)
Receiving objects: 100% (22539/22539), 4.17 MiB | 962.00 KiB/s, done.
Resolving deltas: 100% (16654/16654), done.

$ ls

$ ls
Desktop  Documents  Downloads  fio  Music  Pictures  Public  Templates  Videos

$ cd fio $ ls

$ ls
arch                  crc         filehash.h       gcompat.c         graph.c          iolog.c       MORAL-LICENSE  profile.h       td_error.c
backend.c             debug.c     filelock.c       gcompat.h         graph.h          iolog.h       mutex.c        profiles        td_error.h
blktrace_api.h        debug.h     filelock.h       gerror.c          hash.h           io_u.c        mutex.h        rate-submit.c   thread_options.h
blktrace.c            diskutil.c  filesetup.c      gerror.h          helpers.c        io_u_queue.c  optgroup.c     rate-submit.h   tickmarks.c
cairo_text_helpers.c  diskutil.h  fio.1            gettime.c         helpers.h        io_u_queue.h  optgroup.h     README          tickmarks.h
cairo_text_helpers.h  engines     fio.c            gettime.h         helper_thread.c  json.c        options.c      REPORTING-BUGS  time.c
cconv.c               err.h       fio.h            gettime-thread.c  helper_thread.h  json.h        options.h      server.c        tools
cgroup.c              eta.c       fio_time.h       gfio.c            HOWTO            lib           os             server.h        trim.c
cgroup.h              examples    FIO-VERSION-GEN  gfio.h            idletime.c       libfio.c      oslib          SERVER-TODO     trim.h
client.c              exp         flist.h          GFIO-TODO         idletime.h       log.c         parse.c        smalloc.c       verify.c
client.h              fifo.c      flow.c           ghelpers.c        init.c           log.h         parse.h        smalloc.h       verify.h
compiler              fifo.h      flow.h           ghelpers.h        io_ddir.h        Makefile      printing.c     stat.c          verify-state.h
configure             file.h      gclient.c        goptions.c        ioengine.h       memory.c      printing.h     stat.h          workqueue.c
COPYING               filehash.c  gclient.h        goptions.h        ioengines.c      minmax.h      profile.c      t               workqueue.h

$ make

$ make
Makefile:20: config-host.mak: No such file or directory
FIO_VERSION = fio-2.14-38-g9935
Running configure for you...
Operating system              Linux
....
Consider installing zlib-dev (zlib-devel), some fio features depend on it.
    CC crc/crc16.o
    CC crc/sha512.o

When you run cofigure, you can get a hint you need forward like this :

Consider installing zlib-dev (zlib-devel), some fio features depend on it.

So after you install zlib-devel. If you type make once again.

the above hint diappears like the following.

  $ make
Makefile:20: config-host.mak: No such file or directory
FIO_VERSION = fio-2.14-38-g9935
Running configure for you...
Operating system              Linux
    CC crc/crc16.o
    CC crc/sha512.o

right after typing “make”, If you get a following letters.

Makefile:20: config-host.mak: No such file or directory

that’s because you type make right away without ./configure

more exactly, you keep order as follows

$ ./configure
$ make
$ sudo make install

BUT you don’t have to type like the above.

Although you only type make, you can finish make.

Makefie of fio by itself decide to take an action for make.

i.e Makefile runs ./configure, after that, in order, finishes make as you have seen the above.

most of all

When you execute ./configure, you have to see the result. because you can get a hint you need on your system running FIO forward.

For my information,

if you only type ./configure on command line, the result is like this :

The following is after intalling zlib-devel.

$ ./configure

   $ ./configure
Operating system              Linux
   From now on, it is similar to another make process.

$ make

 $ make
FIO_VERSION = fio-2.14-38-g9935
    CC crc/crc16.o
    CC crc/sha512.o

$ sudo make install

  $ sudo make install
install -m 755 -d /usr/local/bin
install fio t/fio-genzipf t/fio-btrace2fio t/fio-dedupe t/fio-verify-state ./tools/fio_generate_plots ./tools/plot/fio2gnuplot ./tools/genfio ./tools/fiologparser.py ./tools/fio_latency2csv.py ./tools/hist/fiologparser_hist.py /usr/local/bin

If you want to check if your installation is right.

$ fio –version

  $ fio --version
fio-2.14-38-g9935

How to install FIO On CentOS 7

To sum up,

First, git://git.kernel.dk/fio.git and http://git.kernel.dk/fio.git

Second, git://github.com/axboe/fio.git and https://github.com/axboe/fio.git

You have to choose one of both

In my case,

$ git clone http://git.kernel.dk/fio.git
$ cd fio
$ ./configure
$ make
$ sudo make install
$ fio –version

OR for simple method

$ git clone http://git.kernel.dk/fio.git
$ cd fio
$ make
$ sudo make install
$ fio –version

If some item is short for FIO in both of two ways, you have to install that item.

And you need to pay an attention of ther result of ./configure.

**If you want to know more details, Just visit build part of the github README of axboe’s fio **

Ramdisk

Definition
A RAM disk is a portion of RAM which is being used as if it were disk drive.
i.e use portion of Main memory as hard disk or SSD

How to make Ram disk

First, you have to create a folder to use as a mount point of your RAM disk.

$ mkdir /mnt/ramdisk OR $ mkdir ~/ramdisk

Second, create RAM disk with mount command

$ mount -t [TYPE] -o size=[SIZE] [FSTYPE] [MOUNTPOINT]

substitute the follwoing attributes for your own values :

  • [TYPE] is the type of RAM disk to use: either tmpfs ro ramfs.
  • [SIZE] is the size to use for the file system, Remember that ramfs does not have a physical limit and is specified as a starting size.
  • [FSTYPE] is the type of RAM disk to use; either tmpfs, ramfs,ext4, etc.

For example :

-making ramdisk 
$ mkdir ./root/ramdisk
$ sudo mount -t tmpfs -o size=2G tempfs ./root/ramdisk

or another reference,geekstuff

So what is difference between ramfs and tmpfs, What is the mount command and umount command.

Reference site1 and site2 telling you differenc

What is the tmpfs

FIO’s options

fio2gnuplot renders the output files of fio and uses gnuplot ot generate nice graphics

fio2gnuplot is part of fio release

How to generate Log files ?

just if you want to visualize the result of FIO.

Sample of FIO command

The following command is a Sample of FIO.

fio --name=FIO_job_file \
 --filename=/dev/nvme0n1 \
 --rw=randomwrite \
 --bs=4096 \
 --ioengine=libaio \
 --numjobs=1 \
 --iodepth=256 \
 --direct=1 \
 --thread \
 --size \
1. --name=FIO_job_file

	This means each jobs, this is job file. 
	
2. --filename=/dev/nvme0n1

 	where do you create work of job file. 

3. --ioengine=libaio
this shows you what IOengine you use. libaio means asynchronous IO of linux native.
4. --rw=randomwirte
	
	this means that type of IO pattern.

5. --bs=4096

	this means the block size used for the io units.
	
6. --numjobs=1

	this means creating the specified number of clones of this job.
	if next options is given, this job execute as thread.
	
7. --thread
	
	this means how to create numofjob, process or thread.
	
8. --iodepth=256

	this means how many io units keep in flight against the file. 
	When using asyc, you need to configure direct=1
	
9. --direct=1

	this means if value is true, use non-buffered io.
	
10. --size

	this means how much you are going to use device, if noe set, so if you don't set, Fio will use the full size of the given files or devices. 
	i.e the total size of file io for this job. Fio will run until this many bytes has been transferred, nuless runtime is limited by other options (such as 'run time', for instances, or increased/decreased by 'io_size')

how to interpret the output of FIO

If you want to know detail about this, just you have to refer to HoWTO of FIO github.

there is chapter 6 that explains this.

Summary of How to install FIO

$ git clone http://git.kernel.dk/fio.git
$ cd fio
- zlib-devel or libaio-devel
$ sudo yum install zlib-devel  or $ sudo yum install libaio-devel
$ ./configure
$ make
$ sudo make install
$ fio -version
  • simple Shell script fio
#!/bin/bash

BS=4k
RW=randwrite

for RDN in $(seq 0 9) 
do

fio --name=$BS-$RW-$RDN \
 --filename=/dev/hyun \
 --rw=$RW \
 --bs=$BS \
 --ioengine=libaio \
 --numjobs=1 \
 --iodepth=256 \
 --direct=1 \
 --thread \
 --write_iops_log=$BS-$RW-$RDN \
 --log_avg_msec=1000 \
 --size=50% OR noone
	
done

be careful If you don’t configure –log_avg_msec, by default, that is 500. i.e 0.5 seconds

Appendix

What is GiB and GB

K < M < G < T
10^3 < 10^6 < 10^9 < 10^12
2^10 < 2^20 < 2^30 < 2^40

Examples and comparisons with SI prefixes

  Example
one mebibyte 1 MiB = 2^20 Byte = 1,048,576 Byte
one megabyte 1 MB = 10^6 Byte = 1,000,000 Byte
one gibibyte 1 GiB = 20^30 Byte = 1,073,741,824 Byte
one gigabyte 1 GB = 10^9 Byte = 1,000,000,000 Byte

Reference

axboe’s fio

HOWTO of axboe’s fio

wiki’s Benchmarking

Getting started with FIO

aerospike

How to Benchmark SSDS with FIO visualizer

Benchmarking:Disk Bandwidth analysis of i instance part 2 FIO

Teminology

FOX = fresh out of box

DW = Disk full write

Write cliff

T1Q256

====================

example.

Reference

if you want to know what the standard of WAF is ?