4 fio is a tool that will spawn a number of thread doing a particular
5 type of io action as specified by the user. fio takes a number of
6 global parameters, each inherited by the thread unless otherwise
7 parameters given to them overriding that setting is given.
14 -b block size in KiB for each io
15 -t <sec> Runtime in seconds
17 -r For random io, sequence must be repeatable
18 -o <on> Use direct IO is 1, buffered if 0
19 -f <file> Read <file> for job descriptions
23 The <jobs> format is as follows:
25 rw=0/1 0 is read, 1 is write
26 prio=x Run io at prio X, 0-7 is the kernel allowed range
27 prioclass=x Run io at prio class X
28 file=foo Do the io to file foo
29 bs=x Thread blocksize is x KiB
30 direct=x 1 for direct IO, 0 for buffered IO
31 delay=x Delay x useconds before each io
32 random IO is randomized
33 sequential IO is sequential
34 rate=x Throttle rate to x KiB/sec
35 cpumask=x Allow job to run on CPUs defined by mask
38 Examples using cmd line jobs
39 ----------------------------
41 Spawn 2 threads, one read and one writer. Both threads want direct and
42 sequential io, set these as global options. The reader wants a 4kb block
43 size and the writer a 16kb block size, set those as thread options.
45 $ fio -o1 -s "{rw=0,file=read_file,bs=4096}" "{rw=1,file=write_file,bs=16384}"
47 Spawn 3 reader threads doing io at priorities 0, 3, and 6. The highest
48 prio thread wants direct io, the others buffered. All want a 4kb block
51 $ fio -o0 -s -b4096 "{rw=0,file=rf1,prio=6}" "{rw=0,file=rf2,prio=3}" "{rw=0,file=rf3,prio=0,direct=1}"
53 Examples using a job file
54 -------------------------
56 A sample job file doing the same as above would look like this:
66 And fio would be invoked as:
68 $ fio -o1 -s -f file_with_above
70 The second example would look like this:
85 And fio would be invoked as:
87 $ fio -o0 -s -b4096 -f file_with_above