fio --- fio is a tool that will spawn a number of thread doing a particular type of io action as specified by the user. fio takes a number of global parameters, each inherited by the thread unless otherwise parameters given to them overriding that setting is given. Options ------- $ fio -s IO is sequential -b block size in KiB for each io -t Runtime in seconds -w Write statistics -r For random io, sequence must be repeatable -o Use direct IO is 1, buffered if 0 -f Read for job descriptions The format is as follows: rw=0/1 0 is read, 1 is write prio=x Run io at prio X, 0-7 is the kernel allowed range prioclass=x Run io at prio class X file=foo Do the io to file foo bs=x Thread blocksize is x KiB direct=x 1 for direct IO, 0 for buffered IO delay=x Delay x useconds before each io random IO is randomized sequential IO is sequential rate=x Throttle rate to x KiB/sec cpumask=x Allow job to run on CPUs defined by mask Examples using cmd line jobs ---------------------------- Spawn 2 threads, one read and one writer. Both threads want direct and sequential io, set these as global options. The reader wants a 4kb block size and the writer a 16kb block size, set those as thread options. $ fio -o1 -s "{rw=0,file=read_file,bs=4096}" "{rw=1,file=write_file,bs=16384}" Spawn 3 reader threads doing io at priorities 0, 3, and 6. The highest prio thread wants direct io, the others buffered. All want a 4kb block size. $ fio -o0 -s -b4096 "{rw=0,file=rf1,prio=6}" "{rw=0,file=rf2,prio=3}" "{rw=0,file=rf3,prio=0,direct=1}" Examples using a job file ------------------------- A sample job file doing the same as above would look like this: [read_file] rw=0 bs=4096 [write_file] rw=1 bs=16384 And fio would be invoked as: $ fio -o1 -s -f file_with_above The second example would look like this: [rf1] rw=0 prio=6 [rf2] rw=0 prio=3 [rf3] rw=0 prio=0 direct=1 And fio would be invoked as: $ fio -o0 -s -b4096 -f file_with_above