[PATCH] fio: pretty close to compiling/working on FreeBSD now
[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=x            'x' may be: read, randread, write, or randwrite
27         overwrite=x     If 'x', layout a write file first.
28         prio=x          Run io at prio X, 0-7 is the kernel allowed range
29         prioclass=x     Run io at prio class X
30         file=foo        Do the io to file foo
31         bs=x            Thread blocksize is x bytes
32         bsrange=x-y     Mix thread block sizes randomly between x and y
33         direct=x        1 for direct IO, 0 for buffered IO
34         thinktime=x     "Think" x usec after each io
35         rate=x          Throttle rate to x KiB/sec
36         ratemin=x       Quit if rate of x KiB/sec can't be met
37         ratecycle=x     ratemin averaged over x msecs
38         cpumask=x       Allow job to run on CPUs defined by mask
39         fsync=x         If writing, fsync after every x blocks have been written
40         startdelay=x    Start this thread x seconds after startup
41         timeout=x       Terminate x seconds after startup
42         aio             Use Linux async io
43         aio_depth=x     Allow x iocbs in flight
44         size=x          Set file size to x bytes (x string can include k/m/g)
45         offset=x        Start io at offset x (x string can include k/m/g)
46         invalidate=x    Invalidate page cache for file prior to doing io
47         sync=x          Use sync writes if x and writing
48         mem=x           If x == malloc, use malloc for buffers. If x == shm,
49                         use shm for buffers. If x == mmap, use anon mmap.
50         exitall         When one thread quits, terminate the others
51         bwavgtime=x     Average bandwidth stats over x msec
52         create_serialize=x      If 'x', serialize file creation.
53         create_fsync=x  If 'x', run fsync() after file creation.
54         loops=x         Run the job 'x' number of times.
55         verify=x        If 'x' == md5, use md5 for verifies. If 'x' == crc32,
56                         use crc32 for verifies.
57         stonewall       Wait for preceeding jobs to end before running.
58         numjobs=x       Create 'x' similar entries for this job
59         mmap=x          If 'x', use mmap for data transfers
60
61
62 Examples using a job file
63 -------------------------
64
65 A sample job file doing the same as above would look like this:
66
67 [read_file]
68 rw=0
69 bs=4096
70
71 [write_file]
72 rw=1
73 bs=16384
74
75 And fio would be invoked as:
76
77 $ fio -o1 -s -f file_with_above
78
79 The second example would look like this:
80
81 [rf1]
82 rw=0
83 prio=6
84
85 [rf2]
86 rw=0
87 prio=3
88
89 [rf3]
90 rw=0
91 prio=0
92 direct=1
93
94 And fio would be invoked as:
95
96 $ fio -o0 -s -b4096 -f file_with_above
97
98 'global' is a reserved keyword. When used as the filename, it sets the
99 default options for the threads following that section. It is possible
100 to have more than one global section in the file, as it only affects
101 subsequent jobs.
102
103 Also see the examples/ dir for sample job files.
104