9 years agofio2gnuplot: Fixing typo when inserting fake data
Erwan Velu [Thu, 1 Aug 2013 11:39:32 +0000 (13:39 +0200)]
fio2gnuplot: Fixing typo when inserting fake data

Commit f9846c392d176582916c39b1925a436e79f23de1 introduced fake data
when matched files doesn't have the exact same amount of traces. This
patch introduced a typo that prevented the int comparison to work

9 years agoMake test for gnuplot work with empty strings.
Martin Steigerwald [Mon, 5 Aug 2013 14:57:33 +0000 (08:57 -0600)]
Make test for gnuplot work with empty strings.

When I launch fio_generate_plots on a system where gnuplot is not installed I
get this error :

$ fio_generate_plots test
Making bw logs
/usr/bin/fio_generate_plots: 42: /usr/bin/fio_generate_plots: -: not found

That's because the test checking whether gnuplot is installed is failing
because of an empty variable :
GNUPLOT=$(which gnuplot)
if [ ! -x $GNUPLOT ]; then
        echo You need gnuplot installed to generate graphs
        exit 1

Indeed the command "test -x" is exiting with code 0.

To correct this we should enclose the variable with quotes :
if [ ! -x "$GNUPLOT" ]; then

Then the script is going into the test properly :
$ fio_generate_plots test
You need gnuplot installed to generate graphs

I copied problem description by Hervé from the Debian bug report below.

Bug#700580: /usr/bin/fio_generate_plots: -: not found

Reported-By: Hervé Werner <>
Tested-By: Hervé Werner <>
Tested-By: Martin Steigerwald <>
Signed-off-by: Jens Axboe <>
9 years agofio2gnuplot: Adding filename as title for 2D graphs
Erwan Velu [Wed, 31 Jul 2013 10:32:40 +0000 (12:32 +0200)]
fio2gnuplot: Adding filename as title for 2D graphs

While plotting 2D graphs, it's pretty handy to keep the filename as
title for the plotting trace. This way, the png file still keep the
original filename used for plotting.

9 years agofio2gnuplot: Adding information steps
Erwan Velu [Wed, 31 Jul 2013 10:21:10 +0000 (12:21 +0200)]
fio2gnuplot: Adding information steps

While executing fio2gnuplot, we were lacking of some information of
what's going on.

This patch makes things easier to understand/follow for end users.

9 years agofio2gnuplot: Fixing help message
Erwan Velu [Wed, 31 Jul 2013 10:15:24 +0000 (12:15 +0200)]
fio2gnuplot: Fixing help message

Some options were missing on the main description.

9 years agofio2gnuplot: Adding comparing 2D graphs
Erwan Velu [Wed, 31 Jul 2013 10:07:32 +0000 (12:07 +0200)]
fio2gnuplot: Adding comparing 2D graphs

It's a pretty common need to plot several files on the same graph to
compare behavior during various benchs.

If 2 or more files are selected by the pattern, new plots will be
generated to compare the traces into a single graph. 3 kinds of graphs
will be generated (raw, smooth and trends) like for the individual

The output filename will be prefixed with "compare-" like :

9 years agofio2gnuplot: Printing number of selected files
Erwan Velu [Tue, 30 Jul 2013 12:13:51 +0000 (14:13 +0200)]
fio2gnuplot: Printing number of selected files

when using pattern matching on a big set of files, it's pretty hard to
estimate if we missed some or not.

Let's print the number of matched items with the selected pattern to
help user estimate if it's ok or not.

9 years agofio2gnuplot: Using default install dir for gpm files
Erwan Velu [Tue, 30 Jul 2013 11:50:07 +0000 (13:50 +0200)]
fio2gnuplot: Using default install dir for gpm files

That was pretty boring trying to read the gpm files from the same dir as
the logs. Since gpm files are now installed in a specific dir at make
install time, let's use them from here.

Two locations will be considered at runtime : /usr/share/fio and

9 years agoTree: Moving fio_generate_plots in tools/
Erwan Velu [Tue, 30 Jul 2013 09:54:45 +0000 (11:54 +0200)]
Tree: Moving fio_generate_plots in tools/

As & genfio are located in tools, it sounds better to put
all the additional tools in the same directory.

9 years agoMakefile: Installing genfio at install time
Erwan Velu [Tue, 30 Jul 2013 09:47:16 +0000 (11:47 +0200)]
Makefile: Installing genfio at install time

genfio wasn't installed at all during 'make install'.

9 years agoMakefile: Installing fio2gnuplot & sons
Erwan Velu [Tue, 30 Jul 2013 09:45:18 +0000 (11:45 +0200)]
Makefile: Installing fio2gnuplot & sons

Let's install fio2gnuplot & other gnuplot files (.gpm) while installing

Gnuplot files are installed into $(prefix}/share/fio/ subdirectory

9 years agofio2gnuplot: Option to select gnuplot's output dir
Erwan Velu [Tue, 30 Jul 2013 09:34:53 +0000 (11:34 +0200)]
fio2gnuplot: Option to select gnuplot's output dir

This patch add the '-d' option to select where gnuplot shall render its

When plotting big series of files, it's pretty anoying having all the
files in the current directory as there is many many of them.

So let's use this option to allow users specifying where all the
graphics shall be rendered

9 years agoUpdate sample atomic write job file
Jens Axboe [Fri, 26 Jul 2013 19:11:52 +0000 (13:11 -0600)]
Update sample atomic write job file

Signed-off-by: Jens Axboe <>
9 years agoMake it clear in job output whether we are using bs_is_seq_rand or not
Jens Axboe [Thu, 25 Jul 2013 19:01:11 +0000 (13:01 -0600)]
Make it clear in job output whether we are using bs_is_seq_rand or not

Signed-off-by: Jens Axboe <>
9 years agoAdd support for bs_is_seq_rand
Jens Axboe [Thu, 25 Jul 2013 18:45:26 +0000 (12:45 -0600)]
Add support for bs_is_seq_rand

This option will switch the meaning of the read,write part of any
blocksize setting to mean sequential,random instead.

Signed-off-by: Jens Axboe <>
9 years agoinit: remove leftover unused variable
Jens Axboe [Thu, 25 Jul 2013 18:30:06 +0000 (12:30 -0600)]
init: remove leftover unused variable

Signed-off-by: Jens Axboe <>
9 years agoAdd support for randomness of any IO direction
Jens Axboe [Thu, 25 Jul 2013 16:20:45 +0000 (10:20 -0600)]
Add support for randomness of any IO direction

sequential_random used to be applied to all of the IO
directions, with no possibility of having different settings
for reads, writes, and trims. Now it supports setting each of
them individually.

By default, if you do:


it will still apply to all three. If you do:


you would get reads 10% random, writes 90% random, and trims
80% random.

Signed-off-by: Jens Axboe <>
9 years agoUpdate for RDMA io engine's compatibility
Yufei Ren [Tue, 23 Jul 2013 02:58:05 +0000 (20:58 -0600)]
Update for RDMA io engine's compatibility

Since the RDMA engine is not able to be successfully compiled, this
patch accommodates it to the upstream version of fio.

Signed-off-by: Jens Axboe <>
9 years agocore: Insure "il" is initialized in all cases
Erwan Velu [Mon, 22 Jul 2013 21:48:48 +0000 (23:48 +0200)]
core: Insure "il" is initialized in all cases

Prior this commit, "il" was not initialized and check_int() was supposed
to setup it's value before usage.

In fact, check_int() can let "il" uninitialized leading to a dprint()
with a unintialized value.

9 years agocore: Don't leak memory if error is unknown
Erwan Velu [Mon, 22 Jul 2013 21:46:10 +0000 (23:46 +0200)]
core: Don't leak memory if error is unknown

If error is unknown, the "return 1" call was not freeing error which was
malloced at the beginning of the function.

9 years agocore: Removing duplicated code
Erwan Velu [Mon, 22 Jul 2013 21:39:18 +0000 (23:39 +0200)]
core: Removing duplicated code

Some variable are assigned during initialization and another time with
the same value a very few later.

That's clearly useless and could lead to an error if only one is changed.

9 years agofio2gnuplot: Don't plot fake data
Erwan Velu [Mon, 22 Jul 2013 10:59:04 +0000 (12:59 +0200)]
fio2gnuplot: Don't plot fake data

As we did add some fake data to keep as long a possible the coherency
between all the fio files, let's ignore them when rendering.

As a consequence, we are keeping the time associated to each
performance we store instead of a single time for all performance
traces. This will increase precision while plotting.

9 years agofio2gnuplot: Don't truncate fio log files
Erwan Velu [Mon, 22 Jul 2013 10:56:26 +0000 (12:56 +0200)]
fio2gnuplot: Don't truncate fio log files

The code was stopping at reading once the shorter stopped. But in the
case of a very big difference of performances between hosts, some could
be much longer/shorter than others.

This patch does insure that until _all_ input files got read complety we
do had fake data with a negative time.

This way, all the traces will be complete as per fio's output.

9 years agofio2gnuplot: Keep original filename in temp. files
Erwan Velu [Mon, 22 Jul 2013 10:54:39 +0000 (12:54 +0200)]
fio2gnuplot: Keep original filename in temp. files

It was pretty hard to understand what trace file was linked to which fio
output file. This simple commit add a simpler header to inform the
debugger which fio outputfile got used.

9 years agonet: Add UDP multicast example job file
Shawn Bohrer [Mon, 22 Jul 2013 14:57:44 +0000 (09:57 -0500)]
net: Add UDP multicast example job file

This adds a pingpong UDP multicast example with two readers.

Signed-off-by: Shawn Bohrer <>
Signed-off-by: Jens Axboe <>
9 years agonet: Add option to set outgoing multicast TTL
Shawn Bohrer [Fri, 19 Jul 2013 18:24:08 +0000 (13:24 -0500)]
net: Add option to set outgoing multicast TTL

Signed-off-by: Shawn Bohrer <>
Signed-off-by: Jens Axboe <>
9 years agonet: Allow setting network interface to use for multicast
Shawn Bohrer [Fri, 19 Jul 2013 18:24:07 +0000 (13:24 -0500)]
net: Allow setting network interface to use for multicast

Signed-off-by: Shawn Bohrer <>
Signed-off-by: Jens Axboe <>
9 years agonet: Add UDP multicast support
Shawn Bohrer [Fri, 19 Jul 2013 18:24:06 +0000 (13:24 -0500)]
net: Add UDP multicast support

Allow UDP readers to listen to UDP multicast traffic if hostname is set
to a valid UDP multicast address.

Signed-off-by: Shawn Bohrer <>
Signed-off-by: Jens Axboe <>
9 years agofio2gnuplot: Fixing Yaxis rendering for 2D plots
Erwan Velu [Tue, 16 Jul 2013 09:07:34 +0000 (11:07 +0200)]
fio2gnuplot: Fixing Yaxis rendering for 2D plots

With many values, gnuplot was complaining about too many ticks like :

"graph2D.gpm", line 26: warning: Too many axis ticks requested (>9e+03)

Using the "auto" command, that works much more better and axis are now

9 years agogenfio: Protecting parse_cmdline from spaces
Erwan Velu [Mon, 15 Jul 2013 10:33:44 +0000 (12:33 +0200)]
genfio: Protecting parse_cmdline from spaces

If you want to provide arguments with spaces in it, $@ shall be
protected with quotes.

That's required to manage complex cmdline for -A or -B options

9 years agotools: Adding gitignore
Erwan Velu [Mon, 15 Jul 2013 10:05:01 +0000 (12:05 +0200)]
tools: Adding gitignore

Nothing like a clean git status ;o)

9 years agogenfio: Use dynamic default values in help
Erwan Velu [Mon, 15 Jul 2013 10:03:55 +0000 (12:03 +0200)]
genfio: Use dynamic default values in help

To avoid mismatch between default values and help, let's print directly
the default value of the option.

9 years agogenfio: Don't use cat EOF for small prints
Erwan Velu [Mon, 15 Jul 2013 09:14:39 +0000 (11:14 +0200)]
genfio: Don't use cat EOF for small prints

That's just bother the reading when very few data is involved. A simple
print is enough

9 years agogenfio: Adding exec_{pre|post}run support
Erwan Velu [Mon, 15 Jul 2013 09:10:27 +0000 (11:10 +0200)]
genfio: Adding exec_{pre|post}run support

It's pretty useful being able to run some commands before or after a
job. That could be use to ask some external storage array to loose its
cache or return in a particular configuration state.

The -A (stands for After) or -B (stands for Before) allow user to define
what commands shall be run before or after a job.

9 years agogenfio: Splitting gen_template in 2 parts
Erwan Velu [Mon, 15 Jul 2013 08:44:58 +0000 (10:44 +0200)]
genfio: Splitting gen_template in 2 parts

gen_template can be split in to two parts:
- the static headers
- the dynamic ones linked to the arguments from cmdline

The static ones are now in gen_template() call before parsing the

The dynamic ones are now call in finish_template() after parsing the

That also open the ability of feeding the fio header during the parsing
removing the need of specific variables to remember the values.

9 years agonet: close socket on error
Shawn Bohrer [Fri, 19 Jul 2013 18:24:10 +0000 (13:24 -0500)]
net: close socket on error

Signed-off-by: Shawn Bohrer <>
Signed-off-by: Jens Axboe <>
9 years agonet: fix recvfrom error message
Shawn Bohrer [Fri, 19 Jul 2013 18:24:09 +0000 (13:24 -0500)]
net: fix recvfrom error message

The error is from recvfrom not sendto.

Signed-off-by: Shawn Bohrer <>
Signed-off-by: Jens Axboe <>
9 years agoHOWTO: update exec_{pre,post}run information
Jens Axboe [Thu, 18 Jul 2013 04:15:09 +0000 (22:15 -0600)]
HOWTO: update exec_{pre,post}run information

Signed-off-by: Jens Axboe <>
9 years agoFix warning with newer gcc in str_numa_mpol_cb()
Jens Axboe [Wed, 17 Jul 2013 22:15:31 +0000 (16:15 -0600)]
Fix warning with newer gcc in str_numa_mpol_cb()

GCC complains about potentially accessing the array beyond
the end. Ensure that we include a NULL at the end.

Signed-off-by: Jens Axboe <>
9 years agobackend: Logging exec_{pre|post}run
Erwan Velu [Wed, 17 Jul 2013 21:04:46 +0000 (23:04 +0200)]
backend: Logging exec_{pre|post}run

When using the exec_{pre|post}run option in fio jobs, it's very
important being able to read the output of thoses commands later.

As the output could be very verbose, let's log all the output of the
command in separate file.

As an example, when running two jobs called "write" and "read" the
exec_prerun option is used. During fio's execution, the following
message will be shown :
write : Saving output of prerun in write.prerun.txt
read : Saving output of prerun in read.prerun.txt

The output filename is so composed of the job name appended with the pre
or post run name and a final .txt extension.

That's pretty simple and shall do the job.

9 years agobackend: Get rid of sh -c for exec_string
Erwan Velu [Wed, 17 Jul 2013 20:29:27 +0000 (22:29 +0200)]
backend: Get rid of sh -c for exec_string

Running commands in a 'sh -c' does kill the existing environment values.
i.e that does kill ssh-agent.

It sounds more 'direct' to execute the command in the same environment
as fio.

9 years agogenfio: Enforce time_based if runtime > 0
Erwan Velu [Fri, 12 Jul 2013 15:13:59 +0000 (17:13 +0200)]
genfio: Enforce time_based if runtime > 0

If the device is short and the bandwidth pretty high, we can exit
_before_ runtime is achieved. To avoid this phenomena, let's use
time_based directive that will ensure that no run will be shorten.

9 years agogenfio: Adding iodepth support
Erwan Velu [Fri, 12 Jul 2013 15:01:31 +0000 (17:01 +0200)]
genfio: Adding iodepth support

It's useful to be able to specify the iodepth while running fio with

By default, we keep iodepth=1 to keep the same as fio's default.

9 years agogenfio: Warn users if read occurs before write
Erwan Velu [Fri, 12 Jul 2013 13:21:25 +0000 (15:21 +0200)]
genfio: Warn users if read occurs before write

The default mode was to generate read pattern _before_ the write ones.
On some storage device that handle read on untouch sectors by answering
zero from the cache, the result is totally invalid and cheat about the
real read capabilities of the device.

This patch does change the default mode to emit writes before reads.
It also add a warning message if user is setting up some modes by itself
and generate a read_before_write pattern.

That's only a warning message that last a few seconds but could avoid
running a wrong benchmark.

This commit occurs after a real case of invalid performances due to read
emitted to an untouched block volume.

Typical output will be:
 root@vm1-1: genfio -d vdb -s -b 4k,128k,4m -m read,randread
 # Warning : You are reading data while never wrote them before#
 # On some storage devices, this could lead to invalid results #
 #                                                             #
 # Press Ctrl-C to adjust pattern order if you have doubts     #
 # Or Wait 5 seconds before the file will be created           #
 Generating vm1-1-4k,128k,4m-sequential-read,randread-vdb.fio
 Estimated Time = 1800 seconds : 0 hour 30 minutes

9 years agofio2gnuplot: Adjusting y axis plot (2D)
Erwan Velu [Fri, 12 Jul 2013 12:27:12 +0000 (14:27 +0200)]
fio2gnuplot: Adjusting y axis plot (2D)

It's better let gnuplot adjusting the tics on the Y axis unless that
becomes unreadble. Too many ticks where present on simple graphs.

This was a useless option, shouldn't have been here from the beginning.

9 years agofio2gnuplot: Don't graph 3D if not enough data
Erwan Velu [Fri, 12 Jul 2013 12:24:26 +0000 (14:24 +0200)]
fio2gnuplot: Don't graph 3D if not enough data

If the matching pattern doesn't get more than a single file, 3D plotting
doesn't have any meaning and confuse gnuplot.

So let's disable the 3D plotting if a single file matched the pattern.

9 years agofio2gnuplot: Adding sample files
Erwan Velu [Fri, 12 Jul 2013 09:36:43 +0000 (11:36 +0200)]
fio2gnuplot: Adding sample files

This commit does add some sample log files and makefile to use
fio2gnuplot. This is very useful for understanding, developping or testing fio2gnuplot.

A simple "make" will do the job for you.

9 years agofio2gnuplot: Adding 2D graphs for each fio trace
Erwan Velu [Fri, 12 Jul 2013 09:12:10 +0000 (11:12 +0200)]
fio2gnuplot: Adding 2D graphs for each fio trace

When tracing multiple files, the 3D graph is useful to understand the
behavior of a group of disks but makes difficult to understand how a
particular disk behave during the test.

This patch does add three 2D plots for each fio trace :
- the 2D Raw tracing
This plot is the exact plotting of the raw values reported by fio.
It's very precise but hard to read when having many many traces

- the 2D Smooth tracing
This plot is a smooth version of the raw tracing. It tries to keep as
much as possible a tracing close to the raw one but makes it more
readable by aggregating points.

- the 2D Trend tracing
This plot is trying to setup a trend of the global performance. It
aggregates many points and hide peaks. It only consider at giving a very
easy to understand plotting on how the bench was performing.
It's much more easier to read but could be misleading if raw or smooth
tracing didn't got read before.

9 years agogenfio: Fixing empty ETA while runtime > 0
Erwan Velu [Thu, 11 Jul 2013 08:16:05 +0000 (10:16 +0200)]
genfio: Fixing empty ETA while runtime > 0

Commit 920e0b66756814f7d01bcbbaf5cf0fd05213628d introduced the runtime=0
support but did considered the amount of minutes in addition of rounded
hours to consider if the ETA message can be shown or not.

This is perfectly wrong since it should have been the total amount of
seconds to consider. If runtime=0, the amount of seconds to run cannot
be computed as = 0.

The present code was wrong as if runtime was rounded on hours it did
show the message that ETA cannot be computed.

9 years agogenfio: Adding prefix to fio filename
Erwan Velu [Thu, 11 Jul 2013 07:56:28 +0000 (09:56 +0200)]
genfio: Adding prefix to fio filename

This patch add a prefix (-x) option to add context to fio jobs.
When running many many jobs it's pretty hard to remember which job was
made for.

Adding a prefix to the filename can give some interesting information
like the tested hardware or the day we run it, or a option you test

If the prefix owns a / in it, it will be considered as a directory and
will create it. The fio jobs will be stored into this directory.

9 years agogenfio: Claryfing default options
Erwan Velu [Wed, 10 Jul 2013 14:50:20 +0000 (16:50 +0200)]
genfio: Claryfing default options

Let's show the help if no disks are given as parameter.

This patch does also clarify the default values of each parameter.
That clearly helps understanding what's the default settings if no
option used.

9 years agogenfio: Adding cached_based option
Erwan Velu [Wed, 10 Jul 2013 14:44:24 +0000 (16:44 +0200)]
genfio: Adding cached_based option

By default fio is still run in direct mode which is safer for many
benchmarking approach. In some case, you might need to enable the
cached-based IOs.

The "-c" option is now here for enabling this.

9 years agogenfio: Adding runtime=0 support
Erwan Velu [Wed, 10 Jul 2013 14:38:33 +0000 (16:38 +0200)]
genfio: Adding runtime=0 support

If the runtime is set to 0, it will ask fio to get until the end of the
device. This could be useful in some cases.

9 years agoAdding fio2gnuplot tool
Erwan Velu [Tue, 25 Jun 2013 16:06:59 +0000 (18:06 +0200)]
Adding fio2gnuplot tool

fio2gnuplot aims at plotting fio output files into gnuplot traces.
It does work pretty differently from fio_generate_plots as :
- it plots simultaneous traces in 3D graphs
- it plots various histogram to represent min/max/average/stddev of the
- it uses a pattern matching mecanism to select the input files
- it have a post-mortem analysis mode to compute global values across
  multiple log files
- it saves metadata to report what traces was related to what file
- it generates automatically picture's topic

fio2gnuplot aims at plotting a huge number of simultaneous fio traces in
a understable way. It got tested with up to 197 simultaneous disks traces.

The 3D rendering helps at understanding the "surface" of the benchmark
and answer is fraction of seconds about the homogenity of the results.

The histograms rendering helps at understanding the average values, the
standard deviations between hosts or storage device. By using the
pattern matching, it's really easy to select a set of files to generate
a dedicated graph.

Example: -p 'm[1-3]sw[1-3]-*read*para-*iops*' -g
 Selected m1sw1-128k-sdb-read-para.results_iops.log
 Selected m1sw1-128k-sdc-read-para.results_iops.log
 Selected m1sw1-128k-sdd-read-para.results_iops.log
 Selected m1sw1-128k-sde-read-para.results_iops.log
 Selected m2sw1-128k-sdb-read-para.results_iops.log
 Selected m2sw1-128k-sdc-read-para.results_iops.log
 Selected m2sw1-128k-sdd-read-para.results_iops.log
 Selected m2sw1-128k-sde-read-para.results_iops.log
 Running gnuplot Rendering

The previous example shows how to match some iops log file from fio.
In this example, thoses files were generated by genfio.

As a result, the following files will be generated by gnuplot :

Thoses files will graph all the selected files (traces) at the same time
with various goals (min/max/stddev/average/3D)

9 years agoAdding genfio tool : an fio job creator
Erwan Velu [Tue, 25 Jun 2013 15:47:01 +0000 (17:47 +0200)]
Adding genfio tool : an fio job creator

Some fio users need to create multiple fio jobs to compare storage
device's performance on different workload.

genfio is made for creating series of fio jobs based on the following
- a disk serie
- a block size serie
- the time each job shall run (default is 300 seconds)
- the expected IO patterns to perform (read,write,randread,randwrite)
- a parameter to define if disks shall be tested one after the other or

Based on all this parameters, a single fio script file will be computed
to process all this workloads.

[user@localhost]: genfio -d sdb,sdc,sdd,sde -a -b 4k,128k,1m -r 100 -a
Generating localhost-4k,128k,1m-all-read,write,randread,randwrite-sdb,sdc,sdd,sde.fio
Estimated Time = 6000 seconds : 1 hour 40 minutes

If the user run "fio
it will run:
- a sequential bench on /dev/sdb /dev/sdc /dev/sdd /dev/sde
    block size = 4k with read,write,randread,randwrite tests
    ETA ~ 4 tests * 4 disks * 100 seconds

- a sequential bench on /dev/sdb /dev/sdc /dev/sdd /dev/sde
    block size = 128k with read,write,randread,randwrite tests
    ETA ~ 4 tests * 4 disks * 100 seconds

- a sequential bench on /dev/sdb /dev/sdc /dev/sdd /dev/sde
    block size = 1m with read,write,randread,randwrite tests
    ETA ~ 4 tests * 4 disks * 100 seconds

- a parallel bench on /dev/sdb /dev/sdc /dev/sdd /dev/sde
    block size = 4k with read,write,randread,randwrite tests
    ETA ~ 4 tests * 100 seconds

- a parallel bench on /dev/sdb /dev/sdc /dev/sdd /dev/sde
    block size = 128k with read,write,randread,randwrite tests
    ETA ~ 4 tests * 100 seconds

- a parallel bench on /dev/sdb /dev/sdc /dev/sdd /dev/sde
    block size = 1m with read,write,randread,randwrite tests
    ETA ~ 4 tests * 100 seconds

For each job of this fio script, bandwidth & iops logs file will be
generated allow further investigations or plotting.

9 years agoInit buflen for our dummy buffer
Josef Bacik [Tue, 9 Jul 2013 00:35:01 +0000 (20:35 -0400)]
Init buflen for our dummy buffer

If we fail to verify our buffer we will allocate a dummy buf to fill in so we
have something to compare our bad file to.  Unfortunately we don't set the
buflen of the dummy buffer which means we will sometimes write well past the end
of our buffer and this make glibc complain loudly.  Thanks,

Signed-off-by: Josef Bacik <>
Signed-off-by: Jens Axboe <>
9 years agoMake sure io_u->buflen is aligned to the verify_interval
Josef Bacik [Tue, 9 Jul 2013 00:32:50 +0000 (20:32 -0400)]
Make sure io_u->buflen is aligned to the verify_interval

If you specify verify and bs_unaligned you can make fio blow up in interesting
ways.  This is because the verify code assumes that the buflens will be bs
aligned and therefore aligned to the verify_interval.  However this isn't the
case for bs_unaligned.  So to fix this make sure we are always aligned to
verify_interval.  This keeps us from reading off the end of our io buf, or worse
writing past the end of it and makes this fio job pass properly instead of
blowing up.  Thanks,

Signed-off-by: Josef Bacik <>
Signed-off-by: Jens Axboe <>
9 years agoFio 2.1.1 fio-2.1.1
Jens Axboe [Wed, 5 Jun 2013 14:55:53 +0000 (16:55 +0200)]
Fio 2.1.1

Signed-off-by: Jens Axboe <>
9 years agoMakefile: don't run configure for make clean
Jens Axboe [Wed, 29 May 2013 19:49:21 +0000 (21:49 +0200)]
Makefile: don't run configure for make clean

Normally we auto-run the configure part, if config-host.mak
doesn't exist. But we don't need to do that for make clean.

Signed-off-by: Jens Axboe <>
9 years agoWindows: include winsock2.h instead of windows.h to avoid a warning.
Bruce Cran [Wed, 29 May 2013 09:21:04 +0000 (10:21 +0100)]
Windows: include winsock2.h instead of windows.h to avoid a warning.

Signed-off-by: Jens Axboe <>
9 years agoposix_fadvise is now provided in helpers.c: remove it from the Windows posix.c
Bruce Cran [Wed, 29 May 2013 09:12:27 +0000 (10:12 +0100)]
posix_fadvise is now provided in helpers.c: remove it from the Windows posix.c

Signed-off-by: Jens Axboe <>
9 years agoUpdate windowsaio for changes to the thread structure
Bruce Cran [Wed, 29 May 2013 10:06:24 +0000 (12:06 +0200)]
Update windowsaio for changes to the thread structure

The free/busy/requeue list has been replaced with a FIFO + ring: update
windowsaio.c to work with the new code.

Modified by Jens to check for IO_U_F_FLIGHT before doing engine
private checks.

Signed-off-by: Jens Axboe <>
9 years agoFix bad merge of write_iops_log= option for fio 2.1
Jens Axboe [Wed, 29 May 2013 08:45:16 +0000 (10:45 +0200)]
Fix bad merge of write_iops_log= option for fio 2.1

We need to store the string.

Signed-off-by: Jens Axboe <>
9 years agoBump IO engine version number
Jens Axboe [Tue, 28 May 2013 12:17:50 +0000 (14:17 +0200)]
Bump IO engine version number

We changed the layout of io_u, which isn't binary
compatible with pre-compiled external engines.

Signed-off-by: Jens Axboe <>
9 years agoReplace list based free/busy/requeue list with FIFO + ring
Jens Axboe [Tue, 28 May 2013 12:16:55 +0000 (14:16 +0200)]
Replace list based free/busy/requeue list with FIFO + ring

Cache friendliness of the list is pretty low. This has
provably lower overhead.

Signed-off-by: Jens Axboe <>
9 years agoCatch NULL td->o.ioengine
Jens Axboe [Mon, 27 May 2013 07:50:31 +0000 (09:50 +0200)]
Catch NULL td->o.ioengine

This should not happen, except if there's a bug in the
option parsing (or profile, see commit 774a99b5). But
lets be cautious and catch it instead of seg faulting.

Signed-off-by: Jens Axboe <>
9 years agoMerge branch 'master' of ssh://
Jens Axboe [Fri, 24 May 2013 18:11:02 +0000 (20:11 +0200)]
Merge branch 'master' of ssh://

9 years agoact: add slice support and pass/fail end criteria
Jens Axboe [Fri, 24 May 2013 07:09:39 +0000 (09:09 +0200)]
act: add slice support and pass/fail end criteria

Signed-off-by: Jens Axboe <>
9 years agoMerge branch 'master' of ssh://
Jens Axboe [Fri, 24 May 2013 05:57:00 +0000 (07:57 +0200)]
Merge branch 'master' of ssh://

9 years agoRework fio_generate_plots script
Louwrentius [Fri, 24 May 2013 05:56:38 +0000 (07:56 +0200)]
Rework fio_generate_plots script

Signed-off-by: Jens Axboe <>
9 years agotiobench: ensure that ioengine is being specified
Jens Axboe [Thu, 23 May 2013 19:31:35 +0000 (21:31 +0200)]
tiobench: ensure that ioengine is being specified

Signed-off-by: Jens Axboe <>
9 years agoAlways exit if do_exit is set after parse
Jens Axboe [Thu, 23 May 2013 19:27:54 +0000 (21:27 +0200)]
Always exit if do_exit is set after parse

It need not be an error condition, it could be just after
doing --cmdhelp or similar.

Signed-off-by: Jens Axboe <>
9 years agoparse: if profile is set, only show options relevant to the profile
Jens Axboe [Thu, 23 May 2013 19:14:03 +0000 (21:14 +0200)]
parse: if profile is set, only show options relevant to the profile

Signed-off-by: Jens Axboe <>
9 years agoMake group_reporting be a string-set option again
Jens Axboe [Thu, 23 May 2013 18:24:12 +0000 (20:24 +0200)]
Make group_reporting be a string-set option again

Otherwise it'll break job files between 2.1 and 2.0.x and earlier.

Signed-off-by: Jens Axboe <>
9 years agoBetter catch arguments with required options and none passed
Jens Axboe [Thu, 23 May 2013 18:00:35 +0000 (20:00 +0200)]
Better catch arguments with required options and none passed

Signed-off-by: Jens Axboe <>
9 years agoFix segfault is bool option is used on command line and fails parsing
Jens Axboe [Thu, 23 May 2013 17:54:43 +0000 (19:54 +0200)]
Fix segfault is bool option is used on command line and fails parsing

Signed-off-by: Jens Axboe <>
9 years agoact: basic reporting
Jens Axboe [Thu, 23 May 2013 10:33:08 +0000 (12:33 +0200)]
act: basic reporting

Signed-off-by: Jens Axboe <>
9 years agoact: bring closer to real ACT
Jens Axboe [Thu, 23 May 2013 07:32:31 +0000 (09:32 +0200)]
act: bring closer to real ACT

- Use the right write sizes and scale IOPS

- Use regular read(2)/write(2) and use read threads

- Add real prep phase

- Add error handling for running out of option space

Signed-off-by: Jens Axboe <>
9 years agoact: fixes
Jens Axboe [Wed, 22 May 2013 22:29:38 +0000 (00:29 +0200)]
act: fixes

- Use libaio to be able to drive higher loads.

- Fix error in latency calculation.

- Fix 5ms vs 8ms typo.

Signed-off-by: Jens Axboe <>
9 years agoStart of ACT like benchmark profile
Jens Axboe [Wed, 22 May 2013 20:21:29 +0000 (22:21 +0200)]
Start of ACT like benchmark profile

Signed-off-by: Jens Axboe <>
9 years agohelpers: fixup bad fadvise check
Jens Axboe [Wed, 22 May 2013 10:17:43 +0000 (12:17 +0200)]
helpers: fixup bad fadvise check

Signed-off-by: Jens Axboe <>
9 years agofusion atomic: retrieve all capabilities and support larger writes
Chandra Mallarapu [Tue, 21 May 2013 06:08:57 +0000 (08:08 +0200)]
fusion atomic: retrieve all capabilities and support larger writes

Signed-off-by: Jens Axboe <>
9 years agofusion atomic: support for new SDK API
Santhosh Koundinya [Sat, 18 May 2013 06:44:01 +0000 (08:44 +0200)]
fusion atomic: support for new SDK API

vsl_vectored_write() is dead, long live nvm_atomic_write().

Signed-off-by: Jens Axboe <>
9 years agoflow: quiesce pending IO before sleep
Jens Axboe [Fri, 17 May 2013 19:52:08 +0000 (21:52 +0200)]
flow: quiesce pending IO before sleep

Similar potential latency problem as was fixed for thinktime
in commit 002e7183 and for rated IO in commit c3a1b740.

Signed-off-by: Jens Axboe <>
9 years agoUpdate HOWTO and man page for thinktime blocks impact on queue depth
Jens Axboe [Fri, 17 May 2013 10:47:11 +0000 (12:47 +0200)]
Update HOWTO and man page for thinktime blocks impact on queue depth

Signed-off-by: Jens Axboe <>
9 years agoMerge branch 'master' of ssh://
Jens Axboe [Fri, 17 May 2013 10:41:22 +0000 (12:41 +0200)]
Merge branch 'master' of ssh://

9 years agoEnsure that we have no IO pending when sleeping
Jens Axboe [Fri, 17 May 2013 10:39:53 +0000 (12:39 +0200)]
Ensure that we have no IO pending when sleeping

For rate limiting or thinktime handling, ensure that we have
no busy IO when we do spin or sleep. Otherwise we potentially
skew the latencies a lot, since events could have been reaped.

Already working for rate iops, just abstracted it out and
ensure that we do the same for thinktime. Only a problem for
certain workloads, those with queuedepth > 1.

Signed-off-by: Jens Axboe <>
9 years agosync engine: guard pvsync engine register/unregister
Jens Axboe [Thu, 16 May 2013 18:50:26 +0000 (20:50 +0200)]
sync engine: guard pvsync engine register/unregister

Need to be behind CONFIG_PWRITEV check.

Signed-off-by: Jens Axboe <>
9 years agoDocument pvsync engine
Jens Axboe [Thu, 16 May 2013 18:38:09 +0000 (20:38 +0200)]
Document pvsync engine

Signed-off-by: Jens Axboe <>
9 years agosync engine: add support for pwritev/preadv
Jens Axboe [Thu, 16 May 2013 18:36:57 +0000 (20:36 +0200)]
sync engine: add support for pwritev/preadv

Signed-off-by: Jens Axboe <>
9 years agoFio 2.1 fio-2.1
Jens Axboe [Wed, 15 May 2013 06:42:26 +0000 (08:42 +0200)]
Fio 2.1

Now with the initial gfio code merged in.

Signed-off-by: Jens Axboe <>
9 years agoHOWTO: fix typo
Jens Axboe [Thu, 9 May 2013 19:10:58 +0000 (21:10 +0200)]
HOWTO: fix typo

Signed-off-by: Jens Axboe <>
9 years agoHonor random/zero/compressible settings for filling an initial file
Jens Axboe [Fri, 3 May 2013 13:12:33 +0000 (15:12 +0200)]
Honor random/zero/compressible settings for filling an initial file

Right now we only do that for when the job writes, do it for the
initial setup as well. Otherwise you just get zero filled files
initially, which might not be what you want.

Also fixes a bug with compression if compress_chunk isn't set.

Signed-off-by: Jens Axboe <>
9 years agoandroid: use ashmem
Akers, Jason B [Wed, 1 May 2013 19:28:49 +0000 (21:28 +0200)]
android: use ashmem

I wrapped the ashmem calls with the existing shm* function definitions.
It's a little ugly, but makes for an easy patch touching only

Tested on both arm and x86 android phones.

Signed-off-by: Jens Axboe <>
9 years agoconfigure: remove argument for --build-32bit-win
Jens Axboe [Wed, 1 May 2013 11:00:26 +0000 (13:00 +0200)]
configure: remove argument for --build-32bit-win

It's an enable type option, just remove the argument.

Signed-off-by: Jens Axboe <>
9 years agoAdd support for dumping the status on Windows.
Bruce Cran [Sun, 28 Apr 2013 15:34:15 +0000 (17:34 +0200)]
Add support for dumping the status on Windows.

Windows uses a per-user temporary directory, with the path stored in the TEMP
environment variable. Update check_status_file to check both the Unix TMPDIR
and Windows TEMP variables before falling back to /tmp.

Signed-off-by: Jens Axboe <>
9 years agoAdd distclean target
Jens Axboe [Sat, 27 Apr 2013 21:51:25 +0000 (15:51 -0600)]
Add distclean target

And only clean cscope.out output when doing that. I'm getting
tired of having to re-do cscope for no real reason.

Signed-off-by: Jens Axboe <>
9 years agoMove __NR_shm* syscall numbers to x86-64 where they belong
Jens Axboe [Sat, 27 Apr 2013 02:24:59 +0000 (20:24 -0600)]
Move __NR_shm* syscall numbers to x86-64 where they belong

The definitions are only correct for 64-bit Linux, not for 32-bit.

Signed-off-by: Jens Axboe <>
9 years agoEnsure that stat outputs are serialized
Jens Axboe [Fri, 26 Apr 2013 23:05:57 +0000 (17:05 -0600)]
Ensure that stat outputs are serialized

Two issues:

- We don't want potentially two stat outputs running at the same time.
  This could potentially happen if USR1 or interval stats race with
  the thread exit.

- We could potentially crash if the interval or USR1 signaled stat
  output trigger when fio is tearing down. Let the main thread wait
  for any in-progress output in that case.

Signed-off-by: Jens Axboe <>
9 years agoAdd log_info_flush()
Vincent Kang Fu [Fri, 26 Apr 2013 22:56:01 +0000 (16:56 -0600)]
Add log_info_flush()

If fio dumps status through -USR1 or similar and output is
being stored in a file, the buffering on the file descriptor
by the library can cause is not to see all the output. Ensure
that it gets flushed after dumping stats.

Signed-off-by: Jens Axboe <>