fio.git
12 years agoAdd version number to --help output
Bruce Cran [Sat, 30 Jul 2011 10:55:52 +0000 (12:55 +0200)]
Add version number to --help output

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agostats: Fix computation of summed standard deviation
Yu-ju Hong [Sat, 30 Jul 2011 07:18:13 +0000 (09:18 +0200)]
stats: Fix computation of summed standard deviation

Fix the computation of standard deviation for a group
of jobs. Please see the below link for the
approximation formula used.
<http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance

The formula was originally presented here:
<ftp://reports.stanford.edu/pub/cstr/reports/cs/tr/79/773/
CS-TR-79-773.pdf>

Signed-off-by: Yu-ju Hong <yjhong@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix bsrange read,write value option pairs
Dave Engberg [Sat, 23 Jul 2011 19:07:13 +0000 (21:07 +0200)]
Fix bsrange read,write value option pairs

The 'bs' and 'bssplit' configuration variables accept separate numbers
for read and write operations if you separate them with a comma. For
example: bssplit=1k/39:8k/50:64k/11,1k/29:8k/50:64k/21

The documentation for 'bsrange' says it works the same way, but if I try
to specify two ranges with a comma, I get an error when I run the app.
E.g. if I put this line in the configuration file: bsrange=1k-16k,2k-32k

I get this error output:

fio: pid=26861, err=22/file:engines/sync.c:62, func=xfer, error=Invalid argument

This patch fixes it.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix --timeout as global parameter
Jens Axboe [Sat, 23 Jul 2011 11:43:13 +0000 (13:43 +0200)]
Fix --timeout as global parameter

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoLibaio engine support for iodepth_batch_complete=0
Dan Ehrenberg [Sat, 23 Jul 2011 11:36:46 +0000 (13:36 +0200)]
Libaio engine support for iodepth_batch_complete=0

Previously, even if iodepth_batch_complete=0, the libaio engine
passed in non-zero values for the min_nr value for io_getevents.
This patch makes min_nr always 0 if iodepth_batch_complete == 0,
and if multiple events are required at a higher level, then
we poll io_getevents multiple times for the events.

Signed-off-by: Dan Ehrenberg <dehrenberg@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRespect iodepth_batch_complete=0 in main loop
Dan Ehrenberg [Sat, 23 Jul 2011 11:36:44 +0000 (13:36 +0200)]
Respect iodepth_batch_complete=0 in main loop

If the iodepth_batch_complete is 0, then even if the queue is full,
we still don't make min_events be 1 in the main loop. Instead, poll
in a non-blocking way until a result is found.

Signed-off-by: Dan Ehrenberg <dehrenberg@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAddes Trace file format description
Paul Dubs [Thu, 21 Jul 2011 15:26:02 +0000 (17:26 +0200)]
Addes Trace file format description

12 years agoAdded description for iops output
Paul Dubs [Thu, 21 Jul 2011 14:04:52 +0000 (16:04 +0200)]
Added description for iops output

12 years agoMerge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Jens Axboe [Tue, 19 Jul 2011 14:28:33 +0000 (16:28 +0200)]
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio

12 years agoFix Solaris compile
Jens Axboe [Tue, 19 Jul 2011 14:27:43 +0000 (16:27 +0200)]
Fix Solaris compile

In file included from fio.h:24,
                  from gettime.c:10:
os/os.h:192: error: redefinition of 'gettid'
os/os-solaris.h:123: error: previous definition of 'gettid' was here
make: *** [gettime.o] Error 1

Forgot to define FIO_HAVE_GETTID

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMake string-set options behave more like bool options
Jens Axboe [Fri, 15 Jul 2011 07:09:15 +0000 (09:09 +0200)]
Make string-set options behave more like bool options

Before this change, string-set options (like time_based) would not
complain if passed an argument, they would just always evaluate
to being set. This is very confusing if someone uses them negated,
ala:

time_based=0

since fio would interpret that as the option being set. Now we'll
do the right thing, time_based=0 will be identical to not having
the option set. And time_based=1 or just time_based will equate
to the option being set.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFio 1.57 fio-1.57
Jens Axboe [Thu, 14 Jul 2011 18:20:25 +0000 (20:20 +0200)]
Fio 1.57

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoWindows affinity fix for thread based jobs
Bruce Cran [Thu, 14 Jul 2011 14:34:02 +0000 (16:34 +0200)]
Windows affinity fix for thread based jobs

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix infinite loop on platforms with severely limited aio resources
Jens Axboe [Thu, 14 Jul 2011 10:45:13 +0000 (12:45 +0200)]
Fix infinite loop on platforms with severely limited aio resources

Problem hit on OSX, where with 4 jobs each with a queue depth larger
than what the system supports, you can get into a situation where
any given process can get EAGAIN on queueing AIO even if it has
nothing queued already. Check for this condition to avoid fio's
IO loop going into a death spiral.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMake raw disk size detection work on OSX
Jens Axboe [Thu, 14 Jul 2011 07:12:50 +0000 (09:12 +0200)]
Make raw disk size detection work on OSX

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix compile warning on OSX
Jens Axboe [Thu, 14 Jul 2011 06:39:19 +0000 (08:39 +0200)]
Fix compile warning on OSX

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix killing of threads that haven't started
Michael Callahan [Thu, 14 Jul 2011 05:56:37 +0000 (07:56 +0200)]
Fix killing of threads that haven't started

If there is a thread that has not started yet (for instance with a long
startdelay or a stonewall) then a SIGINT will fire off terminate_threads
which runs through all of the threads and calls kill(pid, SIGTERM).
However the threads that have not started yet have a pid of 0.  When you
call kill(0, SIGTERM) it kills the entire thread group which can extend
out of fio.  I have included a short patch which fixes this for me.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd CPU affinity support to Windows
Bruce Cran [Thu, 14 Jul 2011 05:50:43 +0000 (07:50 +0200)]
Add CPU affinity support to Windows

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix AIX Makefile
Michael Perzl [Wed, 13 Jul 2011 18:28:07 +0000 (20:28 +0200)]
Fix AIX Makefile

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix AIX compile
Michael Perzl [Wed, 13 Jul 2011 16:43:57 +0000 (18:43 +0200)]
Fix AIX compile

When adding HPUX support the compile for AIX was broken in "lib/getopt.h".

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFio 1.56 fio-1.56
Jens Axboe [Wed, 13 Jul 2011 10:42:26 +0000 (12:42 +0200)]
Fio 1.56

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agogettid() for NetBSD
Jens Axboe [Tue, 12 Jul 2011 21:49:16 +0000 (23:49 +0200)]
gettid() for NetBSD

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd gettid() for FreeBSD/OSX/Solaris
Jens Axboe [Tue, 12 Jul 2011 20:33:53 +0000 (22:33 +0200)]
Add gettid() for FreeBSD/OSX/Solaris

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd gettid() for proper thread affinity on Linux
Jens Axboe [Tue, 12 Jul 2011 19:17:49 +0000 (21:17 +0200)]
Add gettid() for proper thread affinity on Linux

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix compile on older systems that don't have fallocate() on Linux
Jens Axboe [Tue, 12 Jul 2011 18:49:46 +0000 (20:49 +0200)]
Fix compile on older systems that don't have fallocate() on Linux

Commit a596f047 broke build en eg CentOS 5:

filesetup.c:17:26: error: linux/falloc.h: No such file or directory
filesetup.c: In function 'extend_file':
filesetup.c:95: warning: implicit declaration of function 'fallocate'
filesetup.c:95: error: 'FALLOC_FL_KEEP_SIZE' undeclared (first use in this function)
filesetup.c:95: error: (Each undeclared identifier is reported only once
filesetup.c:95: error: for each function it appears in.)
make: *** [filesetup.o] Error 1

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAllow percentage setting for size=
Jens Axboe [Tue, 12 Jul 2011 17:47:03 +0000 (19:47 +0200)]
Allow percentage setting for size=

Sometimes it's useful to set this to a particular size of a device.
Allowing percentages makes this more easy, as one does not have to
do the math outside of fio and pass in as environment variables
or custom job files.

To use, simply add a

size=15%

or whatever is needed, then fio will use 15% of the total size of
the device(s) or file(s) given. Percentage can be from 1 to 100.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoHP-UX: add fdatasync()
Jens Axboe [Mon, 11 Jul 2011 12:43:26 +0000 (14:43 +0200)]
HP-UX: add fdatasync()

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoHP-UX: has aio_fsync() and fallocate()
Jens Axboe [Mon, 11 Jul 2011 08:56:32 +0000 (10:56 +0200)]
HP-UX: has aio_fsync() and fallocate()

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoHP-UX disk query size
Jens Axboe [Mon, 11 Jul 2011 08:48:51 +0000 (10:48 +0200)]
HP-UX disk query size

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRemove old debug printf()
Jens Axboe [Mon, 11 Jul 2011 08:26:00 +0000 (10:26 +0200)]
Remove old debug printf()

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFill in os_phys_mem() stub for HP-UX
Jens Axboe [Mon, 11 Jul 2011 08:25:35 +0000 (10:25 +0200)]
Fill in os_phys_mem() stub for HP-UX

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix bug in $mb_memory keyword
Jens Axboe [Mon, 11 Jul 2011 08:24:20 +0000 (10:24 +0200)]
Fix bug in $mb_memory keyword

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoTake __weak out of the compiler namespace
Bruce Cran [Sun, 10 Jul 2011 18:56:23 +0000 (20:56 +0200)]
Take __weak out of the compiler namespace

With Xcode 4 on OS X shipping LLVM by default, I tried building fio with
clang and found that the definition of __weak conflicts with something
clang defines.  I've attached a patch which replaces the double
underscores with a single underscore, removing it from the
compiler-dependant namespace.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoposixaio: fix for HP-UX
Jens Axboe [Sat, 9 Jul 2011 11:33:38 +0000 (13:33 +0200)]
posixaio: fix for HP-UX

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoHP-UX typo
Jens Axboe [Sat, 9 Jul 2011 11:28:19 +0000 (13:28 +0200)]
HP-UX typo

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd note saying that HP-UX should work
Jens Axboe [Sat, 9 Jul 2011 06:58:44 +0000 (08:58 +0200)]
Add note saying that HP-UX should work

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoA few HP-UX fixes
Jens Axboe [Sat, 9 Jul 2011 06:54:26 +0000 (08:54 +0200)]
A few HP-UX fixes

Enable posixaio and net IO engine

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMake processes work on HP-UX
Jens Axboe [Sat, 9 Jul 2011 06:31:53 +0000 (08:31 +0200)]
Make processes work on HP-UX

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoImprove Windows windowsaio engine performance
Bruce Cran [Sat, 9 Jul 2011 06:20:47 +0000 (08:20 +0200)]
Improve Windows windowsaio engine performance

Always use IO completion ports on Windows since some drives benefit from
using it even with direct or sync io.
Remove PrintError function since logging of errors is done in the core.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix integer overflow in calculating large IOPS on 32-bit platforms
Bruce Cran [Sat, 9 Jul 2011 06:19:53 +0000 (08:19 +0200)]
Fix integer overflow in calculating large IOPS on 32-bit platforms

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoGet rid of warning on platforms for casting char -> int
Jens Axboe [Fri, 8 Jul 2011 19:14:57 +0000 (21:14 +0200)]
Get rid of warning on platforms for casting char -> int

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd block device size detection for HP-UX
Jens Axboe [Fri, 8 Jul 2011 19:10:30 +0000 (21:10 +0200)]
Add block device size detection for HP-UX

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoInitial HP-UX port
Jens Axboe [Fri, 8 Jul 2011 18:56:06 +0000 (20:56 +0200)]
Initial HP-UX port

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix bad start_delay type
Jens Axboe [Fri, 8 Jul 2011 18:47:03 +0000 (20:47 +0200)]
Fix bad start_delay type

Should be unsigned long long, causes a bus error on HP-UX.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoSet affinity before doing buffer and io_u allocs
Jens Axboe [Fri, 8 Jul 2011 17:25:04 +0000 (19:25 +0200)]
Set affinity before doing buffer and io_u allocs

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRewrite posixaio back off comment to be closer to actual English
Jens Axboe [Fri, 8 Jul 2011 06:33:37 +0000 (08:33 +0200)]
Rewrite posixaio back off comment to be closer to actual English

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoEnsure that we honor aio_read/write() returning EAGAIN
Jens Axboe [Thu, 7 Jul 2011 19:06:40 +0000 (21:06 +0200)]
Ensure that we honor aio_read/write() returning EAGAIN

This fixes a problem on OSX, where the number of resources for
aio is woefully small.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix ramp time random screwup
Jens Axboe [Thu, 7 Jul 2011 13:35:27 +0000 (15:35 +0200)]
Fix ramp time random screwup

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix ramp time bug
Jens Axboe [Thu, 7 Jul 2011 10:36:59 +0000 (12:36 +0200)]
Fix ramp time bug

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMerge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Jens Axboe [Wed, 6 Jul 2011 18:13:27 +0000 (20:13 +0200)]
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio

12 years agoAdd --max-jobs/-j command line option
Jens Axboe [Wed, 6 Jul 2011 18:12:54 +0000 (20:12 +0200)]
Add --max-jobs/-j command line option

And shrink OSX max default number of jobs supported. OSX has,
by default, a very small shared memory segment available.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix for terminating threads in ramp time
Jens Axboe [Wed, 6 Jul 2011 07:05:31 +0000 (09:05 +0200)]
Fix for terminating threads in ramp time

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMake smalloc use anonymous memory mmaps
Jens Axboe [Wed, 29 Jun 2011 07:50:08 +0000 (09:50 +0200)]
Make smalloc use anonymous memory mmaps

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agopatch from debian fio package to fix syntax errors in manpage.
Martin Steigerwald [Mon, 27 Jun 2011 14:07:24 +0000 (16:07 +0200)]
patch from debian fio package to fix syntax errors in manpage.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoman page: fix incorrect description for disable_clat option
Steven Noonan [Wed, 22 Jun 2011 07:47:09 +0000 (09:47 +0200)]
man page: fix incorrect description for disable_clat option

Signed-off-by: Steven Noonan <snoonan@amazon.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd ability to invoke fallocate() FALLOC_FL_KEEP_SIZE.
Eric Gouriou [Fri, 17 Jun 2011 07:11:45 +0000 (09:11 +0200)]
Add ability to invoke fallocate() FALLOC_FL_KEEP_SIZE.

Linux offers fallocate() and the FALLOC_FL_KEEP_SIZE option as
an alternative to posix_fallocate(). When FALLOC_FL_KEEP_SIZE is
specified for an falloc request going beyond the end of the file,
the requested blocks get preallocated without changing the apparent
size of the file. This is is a commonly recommended use of fallocate()
for workloads performing append writes.

This patch modifies the fallocate option from a boolean option
to a string option accepting none/posix/keep/0/1. 'keep' is only
made available on systems where FALLOC_FL_KEEP_SIZE is available
(i.e., Linux at this time). If specified, fallocate() is used
with FALLOC_FL_KEEP_SIZE set. 'none' disables pre-allocation while
'posix' uses posix_fallocate(). The default behavior remains unchaned,
i.e., invoking posix_fallocate. The settings '0'/'1' are there to
provide backward compatibility for users who had explicitly set the
boolean option.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix fill_device with queue depth higher than 1
Steven Lang [Mon, 13 Jun 2011 07:47:36 +0000 (09:47 +0200)]
Fix fill_device with queue depth higher than 1

I found an interesting combination of using fill_device when the
iodepth is greater than 1.  All outstanding IO causes an ENOSPC error,
but only the first is treated specially.  The remainder come through
and cause an error exit condition when the IO queue is being cleared.
So it is impossible to use deep IO with fill device.

This patch should fix the issue.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFixup wrong enum used for __check_min_rate()
Steven Lang [Fri, 3 Jun 2011 19:15:50 +0000 (21:15 +0200)]
Fixup wrong enum used for __check_min_rate()

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix Makefile depend issue
Michael Zappe [Wed, 1 Jun 2011 18:15:18 +0000 (20:15 +0200)]
Fix Makefile depend issue

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFio 1.55 fio-1.55
Jens Axboe [Thu, 26 May 2011 18:57:30 +0000 (20:57 +0200)]
Fio 1.55

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMerge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Jens Axboe [Tue, 24 May 2011 19:36:35 +0000 (21:36 +0200)]
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio

12 years agoSilence gcc 4.6 warnings
Jens Axboe [Tue, 24 May 2011 19:36:24 +0000 (21:36 +0200)]
Silence gcc 4.6 warnings

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix overlap io_u into outside regions
Jens Axboe [Tue, 24 May 2011 09:26:16 +0000 (11:26 +0200)]
Fix overlap io_u into outside regions

Test case is a job file ala this:

[global]
ioengine=posixaio
direct=0
filename=testfile
iodepth=128
size=50M
loops=10000000000
group_reporting=1
readwrite=randwrite
do_verify=1
verify=md5
verify_fatal=1
numjobs=1
thread
bsrange=4k:1M

[thread0]
offset=0G

[thread1]
offset=50M

[thread2]
offset=100M

[thread3]
offset=150M

[thread4]
offset=200M

[thread5]
offset=250M

[thread6]
offset=300M

[thread7]
offset=350M

where io_u units from threadN ends up crossing into the zone of threadN+1.
This is due to using file->real_file_size as the boundary check for the
buffer length, where the offset itself is correctly calculated. When
using mixed block sizes, this can cause a blocksize larger than the
minimum size to span into the next region.

Fix this by using file->io_size + offset as the end delimeter. Also
improve the logic of dropping to a smaller allowed block size if we do
end up being close to spanning into the next region.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agosplice: use ->o.memalign to indicate we want aligned buffers
Jens Axboe [Fri, 13 May 2011 19:19:25 +0000 (21:19 +0200)]
splice: use ->o.memalign to indicate we want aligned buffers

Vasilis Liaskovitis reports:

---

I am trying to use the splice ioengine to read/write from/to tmpfs (/dev/shm).

Writing works fine e.g. with the following fio config:
[sw]
rw=write
size=1g
directory=/dev/shm
iodepth=32
direct=0
blocksize=512k
numjobs=1
nrfiles=1
ioengine=splice
loops=1
group_reporting
create_on_open=1
create_serialize=0

But reading the same file afterwards with the splice ioengine fails:
[sw]
rw=read
size=1g
directory=/dev/shm
iodepth=32
direct=0
blocksize=512k
numjobs=1
nrfiles=1
ioengine=splice
loops=1
group_reporting

root@server1:~/fio# ./fio  /root/fior_splice.fio
sw: (g=0): rw=read, bs=512K-512K/512K-512K, ioengine=splice, iodepth=32
fio 1.53
Starting 1 process
fio: pid=17504, err=22/file:filesetup.c:502,
func=open(/dev/shm/sw.1.0), error=Invalid argument
Run status group 0 (all jobs):

Is something misconfigured in the fio read config?
The --debug=all output is:

Starting 1 process
file     17517 setup files
file     17517 get file size for 0x7f2f87451028/0/0x7f2f87451108
diskutil 17517 /dev/shm/sw.1.0 belongs to maj/min 0/17
process  17517 pid=0: runstate 0 -> 1
process  17517 will fork
mutex    17517 wait on startup_mutex
process  17519 jobs pid=17519 started
process  17519 pid=17519: runstate 1 -> 2
mutex    17519 up startup_mutex
mutex    17519 wait on td->mutex
mutex    17517 done waiting on startup_mutex
process  17517 pid=17519: runstate 2 -> 4
mutex    17519 done waiting on td->mutex
mem      17519 Alloc 16777216 for buffers
[...]
file     17519 trying file /dev/shm/sw.1.0 10
file     17519 fd open /dev/shm/sw.1.0
file     17519 file not found in hash /dev/shm/sw.1.0
file     17519 get file /dev/shm/sw.1.0, ref=0
io       17519 invalidate cache /dev/shm/sw.1.0: 0/1073741824
file     17519 fd close /dev/shm/sw.1.0
file     17519 error 1 on open of /dev/shm/sw.1.0
file     17519 get_next_file_rr: (nil)
fio: pid=17519, got signal=11
process  17517 pid=17519: runstate 4 -> 9
process  17517 terminate group_id=-1
process  17517 setting terminate on sw/17519
diskutil 17517 update io ticks

Other fio ioengines (sync, vsync) work fine for both reading/writing
on tmpfs. Also, other splice tests can do both reads and writes to
tmpfs (e.g. splice-cp).

This happens with current fio-master or fio-1.38-1 (debian package)
thanks for any comments,

---

The reason is that splice uses ->o.odirect to set that we want aligned
buffers, but we actually have a flag for that now. So just use that.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFio 1.54 fio-1.54
Jens Axboe [Thu, 12 May 2011 18:06:57 +0000 (20:06 +0200)]
Fio 1.54

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix crash on specifying bad IO engine on the command line
Jens Axboe [Thu, 12 May 2011 08:14:57 +0000 (10:14 +0200)]
Fix crash on specifying bad IO engine on the command line

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agowindowsaio: fix race condition between IOCP and queue functions
Bruce Cran [Thu, 12 May 2011 08:06:10 +0000 (10:06 +0200)]
windowsaio: fix race condition between IOCP and queue functions

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoCast l_opts string names to char *
Jens Axboe [Wed, 11 May 2011 11:28:30 +0000 (13:28 +0200)]
Cast l_opts string names to char *

Avoids warning on Solaris

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRevert "Constify l_opts strings"
Jens Axboe [Wed, 11 May 2011 11:27:38 +0000 (13:27 +0200)]
Revert "Constify l_opts strings"

This reverts commit e7d841768b8b6d5e081134e6e2f04f43ac870348.

12 years agoEnsure we quit on SIGTERM
Jens Axboe [Wed, 11 May 2011 11:23:01 +0000 (13:23 +0200)]
Ensure we quit on SIGTERM

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoConstify l_opts strings
Jens Axboe [Wed, 11 May 2011 06:20:21 +0000 (08:20 +0200)]
Constify l_opts strings

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix signed int/long truncation on 32-bit architectures
Jens Axboe [Wed, 11 May 2011 06:15:18 +0000 (08:15 +0200)]
Fix signed int/long truncation on 32-bit architectures

With using our internal random generator, we generate
unsigned ints. But by mistake this was assigned to
a signed long, that doesn't work so well on 32-bit machines.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFio 1.53 fio-1.53
Jens Axboe [Thu, 5 May 2011 18:07:24 +0000 (12:07 -0600)]
Fio 1.53

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRevert "parser: get rid of useless is_time variable"
Jens Axboe [Thu, 5 May 2011 18:05:10 +0000 (12:05 -0600)]
Revert "parser: get rid of useless is_time variable"

This reverts commit 1a1137d9ba2603e295aaac579777ab0d3524faa6.

12 years agoExit with error on signal
Jens Axboe [Thu, 5 May 2011 14:17:03 +0000 (08:17 -0600)]
Exit with error on signal

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agosscanf fixup
Bruce Cran [Thu, 5 May 2011 14:14:09 +0000 (08:14 -0600)]
sscanf fixup

I noticed that a job of:

[sequential write at  1k block size.]

Gets reported as "sequentia".

I think we need to use %255[^\n] in sscanf instead.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agowindowsaio: skip uncompleted requests
Bruce Cran [Thu, 5 May 2011 14:13:37 +0000 (08:13 -0600)]
windowsaio: skip uncompleted requests

Windows sometimes gives us an IO request which hasn't completed yet,
which we need to ignore.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoWindows fixes
Bruce Cran [Wed, 4 May 2011 13:54:13 +0000 (07:54 -0600)]
Windows fixes

- Fix XP support: get pointer to CancelIoEx at runtime.
- Fix overlapped IO.
- Don't use overlapped IO if direct or synchronous options are set.
- Check if write option is set before opening file in read-only mode:
  fixes 'rw=rw'.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoConvert left-over manual ->runstate setting to td_set_runstate()
Jens Axboe [Mon, 2 May 2011 19:14:26 +0000 (13:14 -0600)]
Convert left-over manual ->runstate setting to td_set_runstate()

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoBump max job count to 2048
Jens Axboe [Mon, 2 May 2011 19:05:02 +0000 (13:05 -0600)]
Bump max job count to 2048

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoSwitch mutex to using anonymous mmap
Jens Axboe [Mon, 2 May 2011 16:10:56 +0000 (10:10 -0600)]
Switch mutex to using anonymous mmap

We don't need an fd backing for this, saves on file descriptors
in use.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFio 1.52 fio-1.52
Jens Axboe [Fri, 29 Apr 2011 09:40:06 +0000 (11:40 +0200)]
Fio 1.52

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd space between -m and 755 for install
Jens Axboe [Fri, 29 Apr 2011 06:24:10 +0000 (08:24 +0200)]
Add space between -m and 755 for install

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRemove solaris posix_memalign() helper
Jens Axboe [Mon, 25 Apr 2011 18:49:45 +0000 (20:49 +0200)]
Remove solaris posix_memalign() helper

Not used in core code anymore.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd simple aligned alloc helper
Jens Axboe [Mon, 25 Apr 2011 18:46:58 +0000 (20:46 +0200)]
Add simple aligned alloc helper

We don't have posix_memalign() on some Solaris and Darwin, so just
add a poor mans implementation of it. Outside of arch code where
we have proper posix_memalign(), this is only used to ensure good
alignment of the io_u in the core code.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoos-mac.h: implement fio_set_odirect()
Steven Noonan [Sat, 23 Apr 2011 06:08:13 +0000 (23:08 -0700)]
os-mac.h: implement fio_set_odirect()

Signed-off-by: Steven Noonan <snoonan@amazon.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoos-mac.h: implement blockdev_size()
Steven Noonan [Sat, 23 Apr 2011 06:07:46 +0000 (23:07 -0700)]
os-mac.h: implement blockdev_size()

Signed-off-by: Steven Noonan <snoonan@amazon.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoSwitch all random generators to be decided by use_os_rand
Jens Axboe [Mon, 28 Mar 2011 07:51:09 +0000 (09:51 +0200)]
Switch all random generators to be decided by use_os_rand

This includes file sizing, next file, block size selection,
trim state, and verify state.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoSwitch the latter part of the offset generation to __rand() too
Jens Axboe [Mon, 28 Mar 2011 07:37:41 +0000 (09:37 +0200)]
Switch the latter part of the offset generation to __rand() too

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoSwitch to using our internal Tausworthe based random generator for offsets
Jens Axboe [Mon, 28 Mar 2011 07:35:09 +0000 (09:35 +0200)]
Switch to using our internal Tausworthe based random generator for offsets

It's both faster and more exhaustive than what is available on
glibc on my test systems. So no downsides, and the upside of having
the same offset generator across all platforms.

This will change the random series, so could alter performance for
your workload since the pattern will be different in sequence. There's
an option to revert to the OS generator, you can add use_us_rand=1
on your job files to retain the old generator offsets.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoFix parser bug dealing with range options and postfix
Jens Axboe [Sun, 27 Mar 2011 18:55:09 +0000 (20:55 +0200)]
Fix parser bug dealing with range options and postfix

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoGet rid of mixed rw and verify warning
Jens Axboe [Sun, 27 Mar 2011 18:53:39 +0000 (20:53 +0200)]
Get rid of mixed rw and verify warning

Should workd fine.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoparser: get rid of useless is_time variable
Jens Axboe [Sun, 27 Mar 2011 18:43:20 +0000 (20:43 +0200)]
parser: get rid of useless is_time variable

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoFix unsigned integer overflow in IO buffer allocator
Jens Axboe [Fri, 25 Mar 2011 20:36:28 +0000 (21:36 +0100)]
Fix unsigned integer overflow in IO buffer allocator

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoFio 1.51 fio-1.51
Jens Axboe [Tue, 22 Mar 2011 13:33:04 +0000 (14:33 +0100)]
Fio 1.51

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoFix linking of fio executable
Diego Elio Pettenò [Mon, 21 Mar 2011 19:13:53 +0000 (20:13 +0100)]
Fix linking of fio executable

First of all make sure that $(LDFLAGS) are used during linking so that the
user can set the linker's flags.

Then also make sure that libraries are listed after the objects, so that
GNU ld's --as-needed option will not cause fio linking to fail.

Cc: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoAdd support for giving multiple --section options
Jens Axboe [Fri, 11 Mar 2011 09:16:17 +0000 (10:16 +0100)]
Add support for giving multiple --section options

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoWindows: add missing files needed for msi build
Bruce Cran [Fri, 28 Jan 2011 07:41:42 +0000 (08:41 +0100)]
Windows: add missing files needed for msi build

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoReinstate unified Makefile
Bruce Cran [Fri, 28 Jan 2011 07:39:09 +0000 (08:39 +0100)]
Reinstate unified Makefile

Don't use ifeq statements.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoFio 1.50.2 fio-1.50.2
Jens Axboe [Thu, 27 Jan 2011 21:26:29 +0000 (22:26 +0100)]
Fio 1.50.2

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>