[PATCH] fio: 'directory' option debug kill
[disktools.git] / README.fio
1 fio
2 ---
3
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.
8
9 Options
10 -------
11
12 $ fio
13         -s IO is sequential
14         -b block size in KiB for each io
15         -t <sec> Runtime in seconds
16         -r For random io, sequence must be repeatable
17         -R <on> If one thread fails to meet rate, quit all
18         -o <on> Use direct IO is 1, buffered if 0
19         -l Generate per-job latency logs
20         -w Generate per-job bandwidth logs
21         -f <file> Read <file> for job descriptions
22
23 The <jobs> format is as follows:
24
25         directory=x     Use 'x' as the top level directory for storing files
26         rw=0/1          0 is read, 1 is write
27         prio=x          Run io at prio X, 0-7 is the kernel allowed range
28         prioclass=x     Run io at prio class X
29         file=foo        Do the io to file foo
30         bs=x            Thread blocksize is x bytes
31         bsrange=x-y     Mix thread block sizes randomly between x and y
32         direct=x        1 for direct IO, 0 for buffered IO
33         thinktime=x     "Think" x usec after each io
34         random          IO is randomized
35         sequential      IO is sequential
36         rate=x          Throttle rate to x KiB/sec
37         ratemin=x       Quit if rate of x KiB/sec can't be met
38         ratecycle=x     ratemin averaged over x msecs
39         cpumask=x       Allow job to run on CPUs defined by mask
40         fsync=x         If writing, fsync after every x blocks have been written
41         startdelay=x    Start this thread x seconds after startup
42         timeout=x       Terminate x seconds after startup
43         aio             Use Linux async io
44         aio_depth=x     Allow x iocbs in flight
45         size=x          Set file size to x bytes (x string can include k/m/g)
46         offset=x        Start io at offset x (x string can include k/m/g)
47         invalidate=x    Invalidate page cache for file prior to doing io
48         sync=x          Use sync writes if x and writing
49         mem=x           If x == malloc, use malloc for buffers. If x == shm,
50                         use shm for buffers.
51         exitall         When one thread quits, terminate the others
52         bwavgtime=x     Average bandwidth stats over x msec
53         create_serialize=x      If 'x', serialize file creation.
54         create_fsync=x  If 'x', run fsync() after file creation.
55         loops=x         Run the job 'x' number of times.
56         verify=x        If 'x' and writing, verify data written.
57         stonewall       Wait for preceeding jobs to end before running.
58         numjobs=x       Create 'x' similar entries for this job
59
60
61 Examples using a job file
62 -------------------------
63
64 A sample job file doing the same as above would look like this:
65
66 [read_file]
67 rw=0
68 bs=4096
69
70 [write_file]
71 rw=1
72 bs=16384
73
74 And fio would be invoked as:
75
76 $ fio -o1 -s -f file_with_above
77
78 The second example would look like this:
79
80 [rf1]
81 rw=0
82 prio=6
83
84 [rf2]
85 rw=0
86 prio=3
87
88 [rf3]
89 rw=0
90 prio=0
91 direct=1
92
93 And fio would be invoked as:
94
95 $ fio -o0 -s -b4096 -f file_with_above
96
97 'global' is a reserved keyword. When used as the filename, it sets the
98 default options for the threads following that section. It is possible
99 to have more than one global section in the file, as it only affects
100 subsequent jobs.
101
102 Also see the examples/ dir for sample job files.
103