[PATCH] fio: Remove jobs on command line
[disktools.git] / README.fio
CommitLineData
e709787c
JA
1fio
2---
3
4fio is a tool that will spawn a number of thread doing a particular
5type of io action as specified by the user. fio takes a number of
6global parameters, each inherited by the thread unless otherwise
7parameters given to them overriding that setting is given.
8
9Options
10-------
11
12$ fio
13 -s IO is sequential
86184d14 14 -b block size in KiB for each io
e709787c 15 -t <sec> Runtime in seconds
e709787c 16 -r For random io, sequence must be repeatable
02bdd9ba 17 -R <on> If one thread fails to meet rate, quit all
e709787c 18 -o <on> Use direct IO is 1, buffered if 0
a0a9b35b
JA
19 -l Generate per-job latency logs
20 -w Generate per-job bandwidth logs
7dd1389e 21 -f <file> Read <file> for job descriptions
e709787c 22
e709787c
JA
23The <jobs> format is as follows:
24
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
8c033f93 29 bs=x Thread blocksize is x bytes
7889f07b 30 bsrange=x-y Mix thread block sizes randomly between x and y
e709787c 31 direct=x 1 for direct IO, 0 for buffered IO
e97712ed 32 thinktime=x "Think" x usec after each io
e709787c
JA
33 random IO is randomized
34 sequential IO is sequential
86184d14 35 rate=x Throttle rate to x KiB/sec
4240cfa1
JA
36 ratemin=x Quit if rate of x KiB/sec can't be met
37 ratecycle=x ratemin averaged over x msecs
18e0b78c 38 cpumask=x Allow job to run on CPUs defined by mask
4240cfa1 39 fsync=x If writing, fsync after every x blocks have been written
fc24389f 40 startdelay=x Start this thread x seconds after startup
67903a2e 41 timeout=x Terminate x seconds after startup
43000118
JA
42 aio Use Linux async io
43 aio_depth=x Allow x iocbs in flight
02983297
JA
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)
b95799ca 46 invalidate=x Invalidate page cache for file prior to doing io
74b4b5fb 47 sync=x Use sync writes if x and writing
99c6704f
JA
48 mem=x If x == malloc, use malloc for buffers. If x == shm,
49 use shm for buffers.
98dd52d6 50 exitall When one thread quits, terminate the others
1d035750 51 bwavgtime=x Average bandwidth stats over x msec
b6794fbf
JA
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.
e709787c
JA
55
56
7dd1389e
JA
57Examples using a job file
58-------------------------
59
60A sample job file doing the same as above would look like this:
61
62[read_file]
63rw=0
64bs=4096
65
66[write_file]
67rw=1
68bs=16384
69
70And fio would be invoked as:
71
72$ fio -o1 -s -f file_with_above
73
74The second example would look like this:
75
76[rf1]
77rw=0
78prio=6
79
80[rf2]
81rw=0
82prio=3
83
84[rf3]
85rw=0
86prio=0
87direct=1
88
89And fio would be invoked as:
90
91$ fio -o0 -s -b4096 -f file_with_above
92
47d45203
JA
93'global' is a reserved keyword. When used as the filename, it sets the
94default options for the threads following that section. It is possible
95to have more than one global section in the file, as it only affects
96subsequent jobs.
ed864e24
JA
97
98Also see the examples/ dir for sample job files.
47d45203 99