man: sync "JOB FILE FORMAT" section with HOWTO
[fio.git] / fio.1
... / ...
CommitLineData
1.TH fio 1 "July 2017" "User Manual"
2.SH NAME
3fio \- flexible I/O tester
4.SH SYNOPSIS
5.B fio
6[\fIoptions\fR] [\fIjobfile\fR]...
7.SH DESCRIPTION
8.B fio
9is a tool that will spawn a number of threads or processes doing a
10particular type of I/O action as specified by the user.
11The typical use of fio is to write a job file matching the I/O load
12one wants to simulate.
13.SH OPTIONS
14.TP
15.BI \-\-debug \fR=\fPtype
16Enable verbose tracing of various fio actions. May be `all' for all types
17or individual types separated by a comma (e.g. \-\-debug=file,mem will enable
18file and memory debugging). `help' will list all available tracing options.
19.TP
20.BI \-\-parse-only
21Parse options only, don't start any I/O.
22.TP
23.BI \-\-output \fR=\fPfilename
24Write output to \fIfilename\fR.
25.TP
26.BI \-\-output-format \fR=\fPformat
27Set the reporting format to \fInormal\fR, \fIterse\fR, \fIjson\fR, or
28\fIjson+\fR. Multiple formats can be selected, separate by a comma. \fIterse\fR
29is a CSV based format. \fIjson+\fR is like \fIjson\fR, except it adds a full
30dump of the latency buckets.
31.TP
32.BI \-\-runtime \fR=\fPruntime
33Limit run time to \fIruntime\fR seconds.
34.TP
35.B \-\-bandwidth\-log
36Generate aggregate bandwidth logs.
37.TP
38.B \-\-minimal
39Print statistics in a terse, semicolon-delimited format.
40.TP
41.B \-\-append-terse
42Print statistics in selected mode AND terse, semicolon-delimited format.
43Deprecated, use \-\-output-format instead to select multiple formats.
44.TP
45.BI \-\-terse\-version \fR=\fPversion
46Set terse version output format (default 3, or 2, 4, 5)
47.TP
48.B \-\-version
49Print version information and exit.
50.TP
51.B \-\-help
52Print a summary of the command line options and exit.
53.TP
54.B \-\-cpuclock-test
55Perform test and validation of internal CPU clock.
56.TP
57.BI \-\-crctest \fR=\fP[test]
58Test the speed of the built-in checksumming functions. If no argument is given,
59all of them are tested. Alternatively, a comma separated list can be passed, in which
60case the given ones are tested.
61.TP
62.BI \-\-cmdhelp \fR=\fPcommand
63Print help information for \fIcommand\fR. May be `all' for all commands.
64.TP
65.BI \-\-enghelp \fR=\fPioengine[,command]
66List all commands defined by \fIioengine\fR, or print help for \fIcommand\fR defined by \fIioengine\fR.
67If no \fIioengine\fR is given, list all available ioengines.
68.TP
69.BI \-\-showcmd \fR=\fPjobfile
70Convert \fIjobfile\fR to a set of command-line options.
71.TP
72.BI \-\-readonly
73Turn on safety read-only checks, preventing writes. The \-\-readonly
74option is an extra safety guard to prevent users from accidentally starting
75a write workload when that is not desired. Fio will only write if
76`rw=write/randwrite/rw/randrw` is given. This extra safety net can be used
77as an extra precaution as \-\-readonly will also enable a write check in
78the I/O engine core to prevent writes due to unknown user space bug(s).
79.TP
80.BI \-\-eta \fR=\fPwhen
81Specifies when real-time ETA estimate should be printed. \fIwhen\fR may
82be `always', `never' or `auto'.
83.TP
84.BI \-\-eta\-newline \fR=\fPtime
85Force a new line for every \fItime\fR period passed. When the unit is omitted,
86the value is interpreted in seconds.
87.TP
88.BI \-\-status\-interval \fR=\fPtime
89Force full status dump every \fItime\fR period passed. When the unit is omitted,
90the value is interpreted in seconds.
91.TP
92.BI \-\-section \fR=\fPname
93Only run specified section \fIname\fR in job file. Multiple sections can be specified.
94The \-\-section option allows one to combine related jobs into one file.
95E.g. one job file could define light, moderate, and heavy sections. Tell
96fio to run only the "heavy" section by giving \-\-section=heavy
97command line option. One can also specify the "write" operations in one
98section and "verify" operation in another section. The \-\-section option
99only applies to job sections. The reserved *global* section is always
100parsed and used.
101.TP
102.BI \-\-alloc\-size \fR=\fPkb
103Set the internal smalloc pool size to \fIkb\fP in KiB. The
104\-\-alloc-size switch allows one to use a larger pool size for smalloc.
105If running large jobs with randommap enabled, fio can run out of memory.
106Smalloc is an internal allocator for shared structures from a fixed size
107memory pool and can grow to 16 pools. The pool size defaults to 16MiB.
108NOTE: While running .fio_smalloc.* backing store files are visible
109in /tmp.
110.TP
111.BI \-\-warnings\-fatal
112All fio parser warnings are fatal, causing fio to exit with an error.
113.TP
114.BI \-\-max\-jobs \fR=\fPnr
115Set the maximum number of threads/processes to support.
116.TP
117.BI \-\-server \fR=\fPargs
118Start a backend server, with \fIargs\fP specifying what to listen to. See Client/Server section.
119.TP
120.BI \-\-daemonize \fR=\fPpidfile
121Background a fio server, writing the pid to the given \fIpidfile\fP file.
122.TP
123.BI \-\-client \fR=\fPhostname
124Instead of running the jobs locally, send and run them on the given host or set of hosts. See Client/Server section.
125.TP
126.BI \-\-remote-config \fR=\fPfile
127Tell fio server to load this local file.
128.TP
129.BI \-\-idle\-prof \fR=\fPoption
130Report CPU idleness. \fIoption\fP is one of the following:
131.RS
132.RS
133.TP
134.B calibrate
135Run unit work calibration only and exit.
136.TP
137.B system
138Show aggregate system idleness and unit work.
139.TP
140.B percpu
141As "system" but also show per CPU idleness.
142.RE
143.RE
144.TP
145.BI \-\-inflate-log \fR=\fPlog
146Inflate and output compressed log.
147.TP
148.BI \-\-trigger-file \fR=\fPfile
149Execute trigger cmd when file exists.
150.TP
151.BI \-\-trigger-timeout \fR=\fPt
152Execute trigger at this time.
153.TP
154.BI \-\-trigger \fR=\fPcmd
155Set this command as local trigger.
156.TP
157.BI \-\-trigger-remote \fR=\fPcmd
158Set this command as remote trigger.
159.TP
160.BI \-\-aux-path \fR=\fPpath
161Use this path for fio state generated files.
162.SH "JOB FILE FORMAT"
163Any parameters following the options will be assumed to be job files, unless
164they match a job file parameter. Multiple job files can be listed and each job
165file will be regarded as a separate group. Fio will `stonewall` execution
166between each group.
167
168Fio accepts one or more job files describing what it is
169supposed to do. The job file format is the classic ini file, where the names
170enclosed in [] brackets define the job name. You are free to use any ASCII name
171you want, except *global* which has special meaning. Following the job name is
172a sequence of zero or more parameters, one per line, that define the behavior of
173the job. If the first character in a line is a ';' or a '#', the entire line is
174discarded as a comment.
175
176A *global* section sets defaults for the jobs described in that file. A job may
177override a *global* section parameter, and a job file may even have several
178*global* sections if so desired. A job is only affected by a *global* section
179residing above it.
180
181The \-\-cmdhelp option also lists all options. If used with an `option`
182argument, \-\-cmdhelp will detail the given `option`.
183
184See the `examples/` directory in the fio source for inspiration on how to write
185job files. Note the copyright and license requirements currently apply to
186`examples/` files.
187.SH "JOB PARAMETERS"
188.SS Types
189Some parameters may take arguments of a specific type.
190Anywhere a numeric value is required, an arithmetic expression may be used,
191provided it is surrounded by parentheses. Supported operators are:
192.RS
193.RS
194.TP
195.B addition (+)
196.TP
197.B subtraction (-)
198.TP
199.B multiplication (*)
200.TP
201.B division (/)
202.TP
203.B modulus (%)
204.TP
205.B exponentiation (^)
206.RE
207.RE
208.P
209For time values in expressions, units are microseconds by default. This is
210different than for time values not in expressions (not enclosed in
211parentheses). The types used are:
212.TP
213.I str
214String: a sequence of alphanumeric characters.
215.TP
216.I int
217Integer. A whole number value, which may contain an integer prefix
218and an integer suffix.
219
220[integer prefix]number[integer suffix]
221
222The optional integer prefix specifies the number's base. The default
223is decimal. 0x specifies hexadecimal.
224
225The optional integer suffix specifies the number's units, and includes
226an optional unit prefix and an optional unit. For quantities
227of data, the default unit is bytes. For quantities of time,
228the default unit is seconds.
229
230With \fBkb_base=1000\fR, fio follows international standards for unit prefixes.
231To specify power-of-10 decimal values defined in the International
232System of Units (SI):
233.nf
234ki means kilo (K) or 1000
235mi means mega (M) or 1000**2
236gi means giga (G) or 1000**3
237ti means tera (T) or 1000**4
238pi means peta (P) or 1000**5
239.fi
240
241To specify power-of-2 binary values defined in IEC 80000-13:
242.nf
243k means kibi (Ki) or 1024
244m means mebi (Mi) or 1024**2
245g means gibi (Gi) or 1024**3
246t means tebi (Ti) or 1024**4
247p means pebi (Pi) or 1024**5
248.fi
249
250With \fBkb_base=1024\fR (the default), the unit prefixes are opposite from
251those specified in the SI and IEC 80000-13 standards to provide
252compatibility with old scripts. For example, 4k means 4096.
253
254.nf
255Examples with \fBkb_base=1000\fR:
2564 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB
2571 MiB: 1048576, 1m, 1024k
2581 MB: 1000000, 1mi, 1000ki
2591 TiB: 1073741824, 1t, 1024m, 1048576k
2601 TB: 1000000000, 1ti, 1000mi, 1000000ki
261.fi
262
263.nf
264Examples with \fBkb_base=1024\fR (default):
2654 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB
2661 MiB: 1048576, 1m, 1024k
2671 MB: 1000000, 1mi, 1000ki
2681 TiB: 1073741824, 1t, 1024m, 1048576k
2691 TB: 1000000000, 1ti, 1000mi, 1000000ki
270.fi
271
272For quantities of data, an optional unit of 'B' may be included
273(e.g., 'kb' is the same as 'k').
274
275The integer suffix is not case sensitive (e.g., m/mi mean mebi/mega,
276not milli). 'b' and 'B' both mean byte, not bit.
277
278To specify times (units are not case sensitive):
279.nf
280D means days
281H means hours
282M mean minutes
283s or sec means seconds (default)
284ms or msec means milliseconds
285us or usec means microseconds
286.fi
287
288.TP
289.I bool
290Boolean: a true or false value. `0' denotes false, `1' denotes true.
291.TP
292.I irange
293Integer range: a range of integers specified in the format
294\fIlower\fR:\fIupper\fR or \fIlower\fR\-\fIupper\fR. \fIlower\fR and
295\fIupper\fR may contain a suffix as described above. If an option allows two
296sets of ranges, they are separated with a `,' or `/' character. For example:
297`8\-8k/8M\-4G'.
298.TP
299.I float_list
300List of floating numbers: A list of floating numbers, separated by
301a ':' character.
302.SS "Parameter List"
303.TP
304.BI name \fR=\fPstr
305May be used to override the job name. On the command line, this parameter
306has the special purpose of signalling the start of a new job.
307.TP
308.BI wait_for \fR=\fPstr
309Specifies the name of the already defined job to wait for. Single waitee name
310only may be specified. If set, the job won't be started until all workers of
311the waitee job are done. Wait_for operates on the job name basis, so there are
312a few limitations. First, the waitee must be defined prior to the waiter job
313(meaning no forward references). Second, if a job is being referenced as a
314waitee, it must have a unique name (no duplicate waitees).
315.TP
316.BI description \fR=\fPstr
317Human-readable description of the job. It is printed when the job is run, but
318otherwise has no special purpose.
319.TP
320.BI directory \fR=\fPstr
321Prefix filenames with this directory. Used to place files in a location other
322than `./'.
323You can specify a number of directories by separating the names with a ':'
324character. These directories will be assigned equally distributed to job clones
325creates with \fInumjobs\fR as long as they are using generated filenames.
326If specific \fIfilename(s)\fR are set fio will use the first listed directory,
327and thereby matching the \fIfilename\fR semantic which generates a file each
328clone if not specified, but let all clones use the same if set. See
329\fIfilename\fR for considerations regarding escaping certain characters on
330some platforms.
331.TP
332.BI filename \fR=\fPstr
333.B fio
334normally makes up a file name based on the job name, thread number, and file
335number. If you want to share files between threads in a job or several jobs,
336specify a \fIfilename\fR for each of them to override the default.
337If the I/O engine is file-based, you can specify
338a number of files by separating the names with a `:' character. `\-' is a
339reserved name, meaning stdin or stdout, depending on the read/write direction
340set. On Windows, disk devices are accessed as \\.\PhysicalDrive0 for the first
341device, \\.\PhysicalDrive1 for the second etc. Note: Windows and FreeBSD
342prevent write access to areas of the disk containing in-use data
343(e.g. filesystems). If the wanted filename does need to include a colon, then
344escape that with a '\\' character. For instance, if the filename is
345"/dev/dsk/foo@3,0:c", then you would use filename="/dev/dsk/foo@3,0\\:c".
346.TP
347.BI filename_format \fR=\fPstr
348If sharing multiple files between jobs, it is usually necessary to have
349fio generate the exact names that you want. By default, fio will name a file
350based on the default file format specification of
351\fBjobname.jobnumber.filenumber\fP. With this option, that can be
352customized. Fio will recognize and replace the following keywords in this
353string:
354.RS
355.RS
356.TP
357.B $jobname
358The name of the worker thread or process.
359.TP
360.B $jobnum
361The incremental number of the worker thread or process.
362.TP
363.B $filenum
364The incremental number of the file for that worker thread or process.
365.RE
366.P
367To have dependent jobs share a set of files, this option can be set to
368have fio generate filenames that are shared between the two. For instance,
369if \fBtestfiles.$filenum\fR is specified, file number 4 for any job will
370be named \fBtestfiles.4\fR. The default of \fB$jobname.$jobnum.$filenum\fR
371will be used if no other format specifier is given.
372.RE
373.P
374.TP
375.BI unique_filename \fR=\fPbool
376To avoid collisions between networked clients, fio defaults to prefixing
377any generated filenames (with a directory specified) with the source of
378the client connecting. To disable this behavior, set this option to 0.
379.TP
380.BI lockfile \fR=\fPstr
381Fio defaults to not locking any files before it does IO to them. If a file or
382file descriptor is shared, fio can serialize IO to that file to make the end
383result consistent. This is usual for emulating real workloads that share files.
384The lock modes are:
385.RS
386.RS
387.TP
388.B none
389No locking. This is the default.
390.TP
391.B exclusive
392Only one thread or process may do IO at a time, excluding all others.
393.TP
394.B readwrite
395Read-write locking on the file. Many readers may access the file at the same
396time, but writes get exclusive access.
397.RE
398.RE
399.P
400.BI opendir \fR=\fPstr
401Recursively open any files below directory \fIstr\fR.
402.TP
403.BI readwrite \fR=\fPstr "\fR,\fP rw" \fR=\fPstr
404Type of I/O pattern. Accepted values are:
405.RS
406.RS
407.TP
408.B read
409Sequential reads.
410.TP
411.B write
412Sequential writes.
413.TP
414.B trim
415Sequential trims (Linux block devices only).
416.TP
417.B randread
418Random reads.
419.TP
420.B randwrite
421Random writes.
422.TP
423.B randtrim
424Random trims (Linux block devices only).
425.TP
426.B rw, readwrite
427Mixed sequential reads and writes.
428.TP
429.B randrw
430Mixed random reads and writes.
431.TP
432.B trimwrite
433Sequential trim and write mixed workload. Blocks will be trimmed first, then
434the same blocks will be written to.
435.RE
436.P
437Fio defaults to read if the option is not specified.
438For mixed I/O, the default split is 50/50. For certain types of io the result
439may still be skewed a bit, since the speed may be different. It is possible to
440specify a number of IO's to do before getting a new offset, this is done by
441appending a `:\fI<nr>\fR to the end of the string given. For a random read, it
442would look like \fBrw=randread:8\fR for passing in an offset modifier with a
443value of 8. If the postfix is used with a sequential IO pattern, then the value
444specified will be added to the generated offset for each IO. For instance,
445using \fBrw=write:4k\fR will skip 4k for every write. It turns sequential IO
446into sequential IO with holes. See the \fBrw_sequencer\fR option.
447.RE
448.TP
449.BI rw_sequencer \fR=\fPstr
450If an offset modifier is given by appending a number to the \fBrw=<str>\fR line,
451then this option controls how that number modifies the IO offset being
452generated. Accepted values are:
453.RS
454.RS
455.TP
456.B sequential
457Generate sequential offset
458.TP
459.B identical
460Generate the same offset
461.RE
462.P
463\fBsequential\fR is only useful for random IO, where fio would normally
464generate a new random offset for every IO. If you append eg 8 to randread, you
465would get a new random offset for every 8 IO's. The result would be a seek for
466only every 8 IO's, instead of for every IO. Use \fBrw=randread:8\fR to specify
467that. As sequential IO is already sequential, setting \fBsequential\fR for that
468would not result in any differences. \fBidentical\fR behaves in a similar
469fashion, except it sends the same offset 8 number of times before generating a
470new offset.
471.RE
472.P
473.TP
474.BI kb_base \fR=\fPint
475The base unit for a kilobyte. The defacto base is 2^10, 1024. Storage
476manufacturers like to use 10^3 or 1000 as a base ten unit instead, for obvious
477reasons. Allowed values are 1024 or 1000, with 1024 being the default.
478.TP
479.BI unified_rw_reporting \fR=\fPbool
480Fio normally reports statistics on a per data direction basis, meaning that
481reads, writes, and trims are accounted and reported separately. If this option is
482set fio sums the results and reports them as "mixed" instead.
483.TP
484.BI randrepeat \fR=\fPbool
485Seed the random number generator used for random I/O patterns in a predictable
486way so the pattern is repeatable across runs. Default: true.
487.TP
488.BI allrandrepeat \fR=\fPbool
489Seed all random number generators in a predictable way so results are
490repeatable across runs. Default: false.
491.TP
492.BI randseed \fR=\fPint
493Seed the random number generators based on this seed value, to be able to
494control what sequence of output is being generated. If not set, the random
495sequence depends on the \fBrandrepeat\fR setting.
496.TP
497.BI fallocate \fR=\fPstr
498Whether pre-allocation is performed when laying down files. Accepted values
499are:
500.RS
501.RS
502.TP
503.B none
504Do not pre-allocate space.
505.TP
506.B native
507Use a platform's native pre-allocation call but fall back to 'none' behavior if
508it fails/is not implemented.
509.TP
510.B posix
511Pre-allocate via \fBposix_fallocate\fR\|(3).
512.TP
513.B keep
514Pre-allocate via \fBfallocate\fR\|(2) with FALLOC_FL_KEEP_SIZE set.
515.TP
516.B 0
517Backward-compatible alias for 'none'.
518.TP
519.B 1
520Backward-compatible alias for 'posix'.
521.RE
522.P
523May not be available on all supported platforms. 'keep' is only
524available on Linux. If using ZFS on Solaris this cannot be set to 'posix'
525because ZFS doesn't support it. Default: 'native' if any pre-allocation methods
526are available, 'none' if not.
527.RE
528.TP
529.BI fadvise_hint \fR=\fPstr
530Use \fBposix_fadvise\fR\|(2) to advise the kernel what I/O patterns
531are likely to be issued. Accepted values are:
532.RS
533.RS
534.TP
535.B 0
536Backwards compatible hint for "no hint".
537.TP
538.B 1
539Backwards compatible hint for "advise with fio workload type". This
540uses \fBFADV_RANDOM\fR for a random workload, and \fBFADV_SEQUENTIAL\fR
541for a sequential workload.
542.TP
543.B sequential
544Advise using \fBFADV_SEQUENTIAL\fR
545.TP
546.B random
547Advise using \fBFADV_RANDOM\fR
548.RE
549.RE
550.TP
551.BI fadvise_stream \fR=\fPint
552Use \fBposix_fadvise\fR\|(2) to advise the kernel what stream ID the
553writes issued belong to. Only supported on Linux. Note, this option
554may change going forward.
555.TP
556.BI size \fR=\fPint
557Total size of I/O for this job. \fBfio\fR will run until this many bytes have
558been transferred, unless limited by other options (\fBruntime\fR, for instance,
559or increased/descreased by \fBio_size\fR). Unless \fBnrfiles\fR and
560\fBfilesize\fR options are given, this amount will be divided between the
561available files for the job. If not set, fio will use the full size of the
562given files or devices. If the files do not exist, size must be given. It is
563also possible to give size as a percentage between 1 and 100. If size=20% is
564given, fio will use 20% of the full size of the given files or devices.
565.TP
566.BI io_size \fR=\fPint "\fR,\fB io_limit \fR=\fPint
567Normally fio operates within the region set by \fBsize\fR, which means that
568the \fBsize\fR option sets both the region and size of IO to be performed.
569Sometimes that is not what you want. With this option, it is possible to
570define just the amount of IO that fio should do. For instance, if \fBsize\fR
571is set to 20G and \fBio_limit\fR is set to 5G, fio will perform IO within
572the first 20G but exit when 5G have been done. The opposite is also
573possible - if \fBsize\fR is set to 20G, and \fBio_size\fR is set to 40G, then
574fio will do 40G of IO within the 0..20G region.
575.TP
576.BI fill_device \fR=\fPbool "\fR,\fB fill_fs" \fR=\fPbool
577Sets size to something really large and waits for ENOSPC (no space left on
578device) as the terminating condition. Only makes sense with sequential write.
579For a read workload, the mount point will be filled first then IO started on
580the result. This option doesn't make sense if operating on a raw device node,
581since the size of that is already known by the file system. Additionally,
582writing beyond end-of-device will not return ENOSPC there.
583.TP
584.BI filesize \fR=\fPirange
585Individual file sizes. May be a range, in which case \fBfio\fR will select sizes
586for files at random within the given range, limited to \fBsize\fR in total (if
587that is given). If \fBfilesize\fR is not specified, each created file is the
588same size.
589.TP
590.BI file_append \fR=\fPbool
591Perform IO after the end of the file. Normally fio will operate within the
592size of a file. If this option is set, then fio will append to the file
593instead. This has identical behavior to setting \fRoffset\fP to the size
594of a file. This option is ignored on non-regular files.
595.TP
596.BI blocksize \fR=\fPint[,int][,int] "\fR,\fB bs" \fR=\fPint[,int][,int]
597The block size in bytes for I/O units. Default: 4096.
598A single value applies to reads, writes, and trims.
599Comma-separated values may be specified for reads, writes, and trims.
600Empty values separated by commas use the default value. A value not
601terminated in a comma applies to subsequent types.
602.nf
603Examples:
604bs=256k means 256k for reads, writes and trims
605bs=8k,32k means 8k for reads, 32k for writes and trims
606bs=8k,32k, means 8k for reads, 32k for writes, and default for trims
607bs=,8k means default for reads, 8k for writes and trims
608bs=,8k, means default for reads, 8k for writes, and default for trims
609.fi
610.TP
611.BI blocksize_range \fR=\fPirange[,irange][,irange] "\fR,\fB bsrange" \fR=\fPirange[,irange][,irange]
612A range of block sizes in bytes for I/O units.
613The issued I/O unit will always be a multiple of the minimum size, unless
614\fBblocksize_unaligned\fR is set.
615Comma-separated ranges may be specified for reads, writes, and trims
616as described in \fBblocksize\fR.
617.nf
618Example: bsrange=1k-4k,2k-8k.
619.fi
620.TP
621.BI bssplit \fR=\fPstr[,str][,str]
622This option allows even finer grained control of the block sizes issued,
623not just even splits between them. With this option, you can weight various
624block sizes for exact control of the issued IO for a job that has mixed
625block sizes. The format of the option is bssplit=blocksize/percentage,
626optionally adding as many definitions as needed separated by a colon.
627Example: bssplit=4k/10:64k/50:32k/40 would issue 50% 64k blocks, 10% 4k
628blocks and 40% 32k blocks. \fBbssplit\fR also supports giving separate
629splits to reads, writes, and trims.
630Comma-separated values may be specified for reads, writes, and trims
631as described in \fBblocksize\fR.
632.TP
633.B blocksize_unaligned\fR,\fB bs_unaligned
634If set, fio will issue I/O units with any size within \fBblocksize_range\fR,
635not just multiples of the minimum size. This typically won't
636work with direct I/O, as that normally requires sector alignment.
637.TP
638.BI bs_is_seq_rand \fR=\fPbool
639If this option is set, fio will use the normal read,write blocksize settings as
640sequential,random blocksize settings instead. Any random read or write will
641use the WRITE blocksize settings, and any sequential read or write will use
642the READ blocksize settings.
643.TP
644.BI blockalign \fR=\fPint[,int][,int] "\fR,\fB ba" \fR=\fPint[,int][,int]
645Boundary to which fio will align random I/O units. Default: \fBblocksize\fR.
646Minimum alignment is typically 512b for using direct IO, though it usually
647depends on the hardware block size. This option is mutually exclusive with
648using a random map for files, so it will turn off that option.
649Comma-separated values may be specified for reads, writes, and trims
650as described in \fBblocksize\fR.
651.TP
652.B zero_buffers
653Initialize buffers with all zeros. Default: fill buffers with random data.
654.TP
655.B refill_buffers
656If this option is given, fio will refill the IO buffers on every submit. The
657default is to only fill it at init time and reuse that data. Only makes sense
658if zero_buffers isn't specified, naturally. If data verification is enabled,
659refill_buffers is also automatically enabled.
660.TP
661.BI scramble_buffers \fR=\fPbool
662If \fBrefill_buffers\fR is too costly and the target is using data
663deduplication, then setting this option will slightly modify the IO buffer
664contents to defeat normal de-dupe attempts. This is not enough to defeat
665more clever block compression attempts, but it will stop naive dedupe
666of blocks. Default: true.
667.TP
668.BI buffer_compress_percentage \fR=\fPint
669If this is set, then fio will attempt to provide IO buffer content (on WRITEs)
670that compress to the specified level. Fio does this by providing a mix of
671random data and a fixed pattern. The fixed pattern is either zeroes, or the
672pattern specified by \fBbuffer_pattern\fR. If the pattern option is used, it
673might skew the compression ratio slightly. Note that this is per block size
674unit, for file/disk wide compression level that matches this setting. Note
675that this is per block size unit, for file/disk wide compression level that
676matches this setting, you'll also want to set refill_buffers.
677.TP
678.BI buffer_compress_chunk \fR=\fPint
679See \fBbuffer_compress_percentage\fR. This setting allows fio to manage how
680big the ranges of random data and zeroed data is. Without this set, fio will
681provide \fBbuffer_compress_percentage\fR of blocksize random data, followed by
682the remaining zeroed. With this set to some chunk size smaller than the block
683size, fio can alternate random and zeroed data throughout the IO buffer.
684.TP
685.BI buffer_pattern \fR=\fPstr
686If set, fio will fill the I/O buffers with this pattern or with the contents
687of a file. If not set, the contents of I/O buffers are defined by the other
688options related to buffer contents. The setting can be any pattern of bytes,
689and can be prefixed with 0x for hex values. It may also be a string, where
690the string must then be wrapped with ``""``. Or it may also be a filename,
691where the filename must be wrapped with ``''`` in which case the file is
692opened and read. Note that not all the file contents will be read if that
693would cause the buffers to overflow. So, for example:
694.RS
695.RS
696\fBbuffer_pattern\fR='filename'
697.RS
698or
699.RE
700\fBbuffer_pattern\fR="abcd"
701.RS
702or
703.RE
704\fBbuffer_pattern\fR=-12
705.RS
706or
707.RE
708\fBbuffer_pattern\fR=0xdeadface
709.RE
710.LP
711Also you can combine everything together in any order:
712.LP
713.RS
714\fBbuffer_pattern\fR=0xdeadface"abcd"-12'filename'
715.RE
716.RE
717.TP
718.BI dedupe_percentage \fR=\fPint
719If set, fio will generate this percentage of identical buffers when writing.
720These buffers will be naturally dedupable. The contents of the buffers depend
721on what other buffer compression settings have been set. It's possible to have
722the individual buffers either fully compressible, or not at all. This option
723only controls the distribution of unique buffers.
724.TP
725.BI nrfiles \fR=\fPint
726Number of files to use for this job. Default: 1.
727.TP
728.BI openfiles \fR=\fPint
729Number of files to keep open at the same time. Default: \fBnrfiles\fR.
730.TP
731.BI file_service_type \fR=\fPstr
732Defines how files to service are selected. The following types are defined:
733.RS
734.RS
735.TP
736.B random
737Choose a file at random.
738.TP
739.B roundrobin
740Round robin over opened files (default).
741.TP
742.B sequential
743Do each file in the set sequentially.
744.TP
745.B zipf
746Use a zipfian distribution to decide what file to access.
747.TP
748.B pareto
749Use a pareto distribution to decide what file to access.
750.TP
751.B normal
752Use a Gaussian (normal) distribution to decide what file to access.
753.TP
754.B gauss
755Alias for normal.
756.RE
757.P
758For \fBrandom\fR, \fBroundrobin\fR, and \fBsequential\fR, a postfix can be
759appended to tell fio how many I/Os to issue before switching to a new file.
760For example, specifying \fBfile_service_type=random:8\fR would cause fio to
761issue \fI8\fR I/Os before selecting a new file at random. For the non-uniform
762distributions, a floating point postfix can be given to influence how the
763distribution is skewed. See \fBrandom_distribution\fR for a description of how
764that would work.
765.RE
766.TP
767.BI ioengine \fR=\fPstr
768Defines how the job issues I/O. The following types are defined:
769.RS
770.RS
771.TP
772.B sync
773Basic \fBread\fR\|(2) or \fBwrite\fR\|(2) I/O. \fBfseek\fR\|(2) is used to
774position the I/O location.
775.TP
776.B psync
777Basic \fBpread\fR\|(2) or \fBpwrite\fR\|(2) I/O.
778Default on all supported operating systems except for Windows.
779.TP
780.B vsync
781Basic \fBreadv\fR\|(2) or \fBwritev\fR\|(2) I/O. Will emulate queuing by
782coalescing adjacent IOs into a single submission.
783.TP
784.B pvsync
785Basic \fBpreadv\fR\|(2) or \fBpwritev\fR\|(2) I/O.
786.TP
787.B pvsync2
788Basic \fBpreadv2\fR\|(2) or \fBpwritev2\fR\|(2) I/O.
789.TP
790.B libaio
791Linux native asynchronous I/O. This ioengine defines engine specific options.
792.TP
793.B posixaio
794POSIX asynchronous I/O using \fBaio_read\fR\|(3) and \fBaio_write\fR\|(3).
795.TP
796.B solarisaio
797Solaris native asynchronous I/O.
798.TP
799.B windowsaio
800Windows native asynchronous I/O. Default on Windows.
801.TP
802.B mmap
803File is memory mapped with \fBmmap\fR\|(2) and data copied using
804\fBmemcpy\fR\|(3).
805.TP
806.B splice
807\fBsplice\fR\|(2) is used to transfer the data and \fBvmsplice\fR\|(2) to
808transfer data from user-space to the kernel.
809.TP
810.B sg
811SCSI generic sg v3 I/O. May be either synchronous using the SG_IO ioctl, or if
812the target is an sg character device, we use \fBread\fR\|(2) and
813\fBwrite\fR\|(2) for asynchronous I/O.
814.TP
815.B null
816Doesn't transfer any data, just pretends to. Mainly used to exercise \fBfio\fR
817itself and for debugging and testing purposes.
818.TP
819.B net
820Transfer over the network. The protocol to be used can be defined with the
821\fBprotocol\fR parameter. Depending on the protocol, \fBfilename\fR,
822\fBhostname\fR, \fBport\fR, or \fBlisten\fR must be specified.
823This ioengine defines engine specific options.
824.TP
825.B netsplice
826Like \fBnet\fR, but uses \fBsplice\fR\|(2) and \fBvmsplice\fR\|(2) to map data
827and send/receive. This ioengine defines engine specific options.
828.TP
829.B cpuio
830Doesn't transfer any data, but burns CPU cycles according to \fBcpuload\fR and
831\fBcpuchunks\fR parameters. A job never finishes unless there is at least one
832non-cpuio job.
833.TP
834.B guasi
835The GUASI I/O engine is the Generic Userspace Asynchronous Syscall Interface
836approach to asynchronous I/O.
837.br
838See <http://www.xmailserver.org/guasi\-lib.html>.
839.TP
840.B rdma
841The RDMA I/O engine supports both RDMA memory semantics (RDMA_WRITE/RDMA_READ)
842and channel semantics (Send/Recv) for the InfiniBand, RoCE and iWARP protocols.
843.TP
844.B external
845Loads an external I/O engine object file. Append the engine filename as
846`:\fIenginepath\fR'.
847.TP
848.B falloc
849 IO engine that does regular linux native fallocate call to simulate data
850transfer as fio ioengine
851.br
852 DDIR_READ does fallocate(,mode = FALLOC_FL_KEEP_SIZE,)
853.br
854 DIR_WRITE does fallocate(,mode = 0)
855.br
856 DDIR_TRIM does fallocate(,mode = FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE)
857.TP
858.B e4defrag
859IO engine that does regular EXT4_IOC_MOVE_EXT ioctls to simulate defragment activity
860request to DDIR_WRITE event
861.TP
862.B rbd
863IO engine supporting direct access to Ceph Rados Block Devices (RBD) via librbd
864without the need to use the kernel rbd driver. This ioengine defines engine specific
865options.
866.TP
867.B gfapi
868Using Glusterfs libgfapi sync interface to direct access to Glusterfs volumes without
869having to go through FUSE. This ioengine defines engine specific
870options.
871.TP
872.B gfapi_async
873Using Glusterfs libgfapi async interface to direct access to Glusterfs volumes without
874having to go through FUSE. This ioengine defines engine specific
875options.
876.TP
877.B libhdfs
878Read and write through Hadoop (HDFS). The \fBfilename\fR option is used to
879specify host,port of the hdfs name-node to connect. This engine interprets
880offsets a little differently. In HDFS, files once created cannot be modified.
881So random writes are not possible. To imitate this, libhdfs engine expects
882bunch of small files to be created over HDFS, and engine will randomly pick a
883file out of those files based on the offset generated by fio backend. (see the
884example job file to create such files, use rw=write option). Please note, you
885might want to set necessary environment variables to work with hdfs/libhdfs
886properly.
887.TP
888.B mtd
889Read, write and erase an MTD character device (e.g., /dev/mtd0). Discards are
890treated as erases. Depending on the underlying device type, the I/O may have
891to go in a certain pattern, e.g., on NAND, writing sequentially to erase blocks
892and discarding before overwriting. The trimwrite mode works well for this
893constraint.
894.TP
895.B pmemblk
896Read and write using filesystem DAX to a file on a filesystem mounted with
897DAX on a persistent memory device through the NVML libpmemblk library.
898.TP
899.B dev-dax
900Read and write using device DAX to a persistent memory device
901(e.g., /dev/dax0.0) through the NVML libpmem library.
902.RE
903.P
904.RE
905.TP
906.BI iodepth \fR=\fPint
907Number of I/O units to keep in flight against the file. Note that increasing
908iodepth beyond 1 will not affect synchronous ioengines (except for small
909degress when verify_async is in use). Even async engines may impose OS
910restrictions causing the desired depth not to be achieved. This may happen on
911Linux when using libaio and not setting \fBdirect\fR=1, since buffered IO is
912not async on that OS. Keep an eye on the IO depth distribution in the
913fio output to verify that the achieved depth is as expected. Default: 1.
914.TP
915.BI iodepth_batch \fR=\fPint "\fR,\fP iodepth_batch_submit" \fR=\fPint
916This defines how many pieces of IO to submit at once. It defaults to 1
917which means that we submit each IO as soon as it is available, but can
918be raised to submit bigger batches of IO at the time. If it is set to 0
919the \fBiodepth\fR value will be used.
920.TP
921.BI iodepth_batch_complete_min \fR=\fPint "\fR,\fP iodepth_batch_complete" \fR=\fPint
922This defines how many pieces of IO to retrieve at once. It defaults to 1 which
923 means that we'll ask for a minimum of 1 IO in the retrieval process from the
924kernel. The IO retrieval will go on until we hit the limit set by
925\fBiodepth_low\fR. If this variable is set to 0, then fio will always check for
926completed events before queuing more IO. This helps reduce IO latency, at the
927cost of more retrieval system calls.
928.TP
929.BI iodepth_batch_complete_max \fR=\fPint
930This defines maximum pieces of IO to
931retrieve at once. This variable should be used along with
932\fBiodepth_batch_complete_min\fR=int variable, specifying the range
933of min and max amount of IO which should be retrieved. By default
934it is equal to \fBiodepth_batch_complete_min\fR value.
935
936Example #1:
937.RS
938.RS
939\fBiodepth_batch_complete_min\fR=1
940.LP
941\fBiodepth_batch_complete_max\fR=<iodepth>
942.RE
943
944which means that we will retrieve at least 1 IO and up to the
945whole submitted queue depth. If none of IO has been completed
946yet, we will wait.
947
948Example #2:
949.RS
950\fBiodepth_batch_complete_min\fR=0
951.LP
952\fBiodepth_batch_complete_max\fR=<iodepth>
953.RE
954
955which means that we can retrieve up to the whole submitted
956queue depth, but if none of IO has been completed yet, we will
957NOT wait and immediately exit the system call. In this example
958we simply do polling.
959.RE
960.TP
961.BI iodepth_low \fR=\fPint
962Low watermark indicating when to start filling the queue again. Default:
963\fBiodepth\fR.
964.TP
965.BI io_submit_mode \fR=\fPstr
966This option controls how fio submits the IO to the IO engine. The default is
967\fBinline\fR, which means that the fio job threads submit and reap IO directly.
968If set to \fBoffload\fR, the job threads will offload IO submission to a
969dedicated pool of IO threads. This requires some coordination and thus has a
970bit of extra overhead, especially for lower queue depth IO where it can
971increase latencies. The benefit is that fio can manage submission rates
972independently of the device completion rates. This avoids skewed latency
973reporting if IO gets back up on the device side (the coordinated omission
974problem).
975.TP
976.BI direct \fR=\fPbool
977If true, use non-buffered I/O (usually O_DIRECT). Default: false.
978.TP
979.BI atomic \fR=\fPbool
980If value is true, attempt to use atomic direct IO. Atomic writes are guaranteed
981to be stable once acknowledged by the operating system. Only Linux supports
982O_ATOMIC right now.
983.TP
984.BI buffered \fR=\fPbool
985If true, use buffered I/O. This is the opposite of the \fBdirect\fR parameter.
986Default: true.
987.TP
988.BI offset \fR=\fPint
989Start I/O at the provided offset in the file, given as either a fixed size in
990bytes or a percentage. If a percentage is given, the next \fBblockalign\fR-ed
991offset will be used. Data before the given offset will not be touched. This
992effectively caps the file size at (real_size - offset). Can be combined with
993\fBsize\fR to constrain the start and end range of the I/O workload. A percentage
994can be specified by a number between 1 and 100 followed by '%', for example,
995offset=20% to specify 20%.
996.TP
997.BI offset_increment \fR=\fPint
998If this is provided, then the real offset becomes the
999offset + offset_increment * thread_number, where the thread number is a
1000counter that starts at 0 and is incremented for each sub-job (i.e. when
1001numjobs option is specified). This option is useful if there are several jobs
1002which are intended to operate on a file in parallel disjoint segments, with
1003even spacing between the starting points.
1004.TP
1005.BI number_ios \fR=\fPint
1006Fio will normally perform IOs until it has exhausted the size of the region
1007set by \fBsize\fR, or if it exhaust the allocated time (or hits an error
1008condition). With this setting, the range/size can be set independently of
1009the number of IOs to perform. When fio reaches this number, it will exit
1010normally and report status. Note that this does not extend the amount
1011of IO that will be done, it will only stop fio if this condition is met
1012before other end-of-job criteria.
1013.TP
1014.BI fsync \fR=\fPint
1015How many I/Os to perform before issuing an \fBfsync\fR\|(2) of dirty data. If
10160, don't sync. Default: 0.
1017.TP
1018.BI fdatasync \fR=\fPint
1019Like \fBfsync\fR, but uses \fBfdatasync\fR\|(2) instead to only sync the
1020data parts of the file. Default: 0.
1021.TP
1022.BI write_barrier \fR=\fPint
1023Make every Nth write a barrier write.
1024.TP
1025.BI sync_file_range \fR=\fPstr:int
1026Use \fBsync_file_range\fR\|(2) for every \fRval\fP number of write operations. Fio will
1027track range of writes that have happened since the last \fBsync_file_range\fR\|(2) call.
1028\fRstr\fP can currently be one or more of:
1029.RS
1030.TP
1031.B wait_before
1032SYNC_FILE_RANGE_WAIT_BEFORE
1033.TP
1034.B write
1035SYNC_FILE_RANGE_WRITE
1036.TP
1037.B wait_after
1038SYNC_FILE_RANGE_WRITE
1039.TP
1040.RE
1041.P
1042So if you do sync_file_range=wait_before,write:8, fio would use
1043\fBSYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE\fP for every 8 writes.
1044Also see the \fBsync_file_range\fR\|(2) man page. This option is Linux specific.
1045.TP
1046.BI overwrite \fR=\fPbool
1047If writing, setup the file first and do overwrites. Default: false.
1048.TP
1049.BI end_fsync \fR=\fPbool
1050Sync file contents when a write stage has completed. Default: false.
1051.TP
1052.BI fsync_on_close \fR=\fPbool
1053If true, sync file contents on close. This differs from \fBend_fsync\fR in that
1054it will happen on every close, not just at the end of the job. Default: false.
1055.TP
1056.BI rwmixread \fR=\fPint
1057Percentage of a mixed workload that should be reads. Default: 50.
1058.TP
1059.BI rwmixwrite \fR=\fPint
1060Percentage of a mixed workload that should be writes. If \fBrwmixread\fR and
1061\fBrwmixwrite\fR are given and do not sum to 100%, the latter of the two
1062overrides the first. This may interfere with a given rate setting, if fio is
1063asked to limit reads or writes to a certain rate. If that is the case, then
1064the distribution may be skewed. Default: 50.
1065.TP
1066.BI random_distribution \fR=\fPstr:float
1067By default, fio will use a completely uniform random distribution when asked
1068to perform random IO. Sometimes it is useful to skew the distribution in
1069specific ways, ensuring that some parts of the data is more hot than others.
1070Fio includes the following distribution models:
1071.RS
1072.TP
1073.B random
1074Uniform random distribution
1075.TP
1076.B zipf
1077Zipf distribution
1078.TP
1079.B pareto
1080Pareto distribution
1081.TP
1082.B normal
1083Normal (Gaussian) distribution
1084.TP
1085.B zoned
1086Zoned random distribution
1087.TP
1088.RE
1089When using a \fBzipf\fR or \fBpareto\fR distribution, an input value is also
1090needed to define the access pattern. For \fBzipf\fR, this is the zipf theta.
1091For \fBpareto\fR, it's the pareto power. Fio includes a test program, genzipf,
1092that can be used visualize what the given input values will yield in terms of
1093hit rates. If you wanted to use \fBzipf\fR with a theta of 1.2, you would use
1094random_distribution=zipf:1.2 as the option. If a non-uniform model is used,
1095fio will disable use of the random map. For the \fBnormal\fR distribution, a
1096normal (Gaussian) deviation is supplied as a value between 0 and 100.
1097.P
1098.RS
1099For a \fBzoned\fR distribution, fio supports specifying percentages of IO
1100access that should fall within what range of the file or device. For example,
1101given a criteria of:
1102.P
1103.RS
110460% of accesses should be to the first 10%
1105.RE
1106.RS
110730% of accesses should be to the next 20%
1108.RE
1109.RS
11108% of accesses should be to to the next 30%
1111.RE
1112.RS
11132% of accesses should be to the next 40%
1114.RE
1115.P
1116we can define that through zoning of the random accesses. For the above
1117example, the user would do:
1118.P
1119.RS
1120.B random_distribution=zoned:60/10:30/20:8/30:2/40
1121.RE
1122.P
1123similarly to how \fBbssplit\fR works for setting ranges and percentages of block
1124sizes. Like \fBbssplit\fR, it's possible to specify separate zones for reads,
1125writes, and trims. If just one set is given, it'll apply to all of them.
1126.RE
1127.TP
1128.BI percentage_random \fR=\fPint[,int][,int]
1129For a random workload, set how big a percentage should be random. This defaults
1130to 100%, in which case the workload is fully random. It can be set from
1131anywhere from 0 to 100. Setting it to 0 would make the workload fully
1132sequential. It is possible to set different values for reads, writes, and
1133trim. To do so, simply use a comma separated list. See \fBblocksize\fR.
1134.TP
1135.B norandommap
1136Normally \fBfio\fR will cover every block of the file when doing random I/O. If
1137this parameter is given, a new offset will be chosen without looking at past
1138I/O history. This parameter is mutually exclusive with \fBverify\fR.
1139.TP
1140.BI softrandommap \fR=\fPbool
1141See \fBnorandommap\fR. If fio runs with the random block map enabled and it
1142fails to allocate the map, if this option is set it will continue without a
1143random block map. As coverage will not be as complete as with random maps, this
1144option is disabled by default.
1145.TP
1146.BI random_generator \fR=\fPstr
1147Fio supports the following engines for generating IO offsets for random IO:
1148.RS
1149.TP
1150.B tausworthe
1151Strong 2^88 cycle random number generator
1152.TP
1153.B lfsr
1154Linear feedback shift register generator
1155.TP
1156.B tausworthe64
1157Strong 64-bit 2^258 cycle random number generator
1158.TP
1159.RE
1160.P
1161Tausworthe is a strong random number generator, but it requires tracking on the
1162side if we want to ensure that blocks are only read or written once. LFSR
1163guarantees that we never generate the same offset twice, and it's also less
1164computationally expensive. It's not a true random generator, however, though
1165for IO purposes it's typically good enough. LFSR only works with single block
1166sizes, not with workloads that use multiple block sizes. If used with such a
1167workload, fio may read or write some blocks multiple times. The default
1168value is tausworthe, unless the required space exceeds 2^32 blocks. If it does,
1169then tausworthe64 is selected automatically.
1170.TP
1171.BI nice \fR=\fPint
1172Run job with given nice value. See \fBnice\fR\|(2).
1173.TP
1174.BI prio \fR=\fPint
1175Set I/O priority value of this job between 0 (highest) and 7 (lowest). See
1176\fBionice\fR\|(1).
1177.TP
1178.BI prioclass \fR=\fPint
1179Set I/O priority class. See \fBionice\fR\|(1).
1180.TP
1181.BI thinktime \fR=\fPint
1182Stall job for given number of microseconds between issuing I/Os.
1183.TP
1184.BI thinktime_spin \fR=\fPint
1185Pretend to spend CPU time for given number of microseconds, sleeping the rest
1186of the time specified by \fBthinktime\fR. Only valid if \fBthinktime\fR is set.
1187.TP
1188.BI thinktime_blocks \fR=\fPint
1189Only valid if thinktime is set - control how many blocks to issue, before
1190waiting \fBthinktime\fR microseconds. If not set, defaults to 1 which will
1191make fio wait \fBthinktime\fR microseconds after every block. This
1192effectively makes any queue depth setting redundant, since no more than 1 IO
1193will be queued before we have to complete it and do our thinktime. In other
1194words, this setting effectively caps the queue depth if the latter is larger.
1195Default: 1.
1196.TP
1197.BI rate \fR=\fPint[,int][,int]
1198Cap bandwidth used by this job. The number is in bytes/sec, the normal postfix
1199rules apply. You can use \fBrate\fR=500k to limit reads and writes to 500k each,
1200or you can specify reads, write, and trim limits separately.
1201Using \fBrate\fR=1m,500k would
1202limit reads to 1MiB/sec and writes to 500KiB/sec. Capping only reads or writes
1203can be done with \fBrate\fR=,500k or \fBrate\fR=500k,. The former will only
1204limit writes (to 500KiB/sec), the latter will only limit reads.
1205.TP
1206.BI rate_min \fR=\fPint[,int][,int]
1207Tell \fBfio\fR to do whatever it can to maintain at least the given bandwidth.
1208Failing to meet this requirement will cause the job to exit. The same format
1209as \fBrate\fR is used for read vs write vs trim separation.
1210.TP
1211.BI rate_iops \fR=\fPint[,int][,int]
1212Cap the bandwidth to this number of IOPS. Basically the same as rate, just
1213specified independently of bandwidth. The same format as \fBrate\fR is used for
1214read vs write vs trim separation. If \fBblocksize\fR is a range, the smallest block
1215size is used as the metric.
1216.TP
1217.BI rate_iops_min \fR=\fPint[,int][,int]
1218If this rate of I/O is not met, the job will exit. The same format as \fBrate\fR
1219is used for read vs write vs trim separation.
1220.TP
1221.BI rate_process \fR=\fPstr
1222This option controls how fio manages rated IO submissions. The default is
1223\fBlinear\fR, which submits IO in a linear fashion with fixed delays between
1224IOs that gets adjusted based on IO completion rates. If this is set to
1225\fBpoisson\fR, fio will submit IO based on a more real world random request
1226flow, known as the Poisson process
1227(https://en.wikipedia.org/wiki/Poisson_process). The lambda will be
122810^6 / IOPS for the given workload.
1229.TP
1230.BI rate_cycle \fR=\fPint
1231Average bandwidth for \fBrate\fR and \fBrate_min\fR over this number of
1232milliseconds. Default: 1000ms.
1233.TP
1234.BI latency_target \fR=\fPint
1235If set, fio will attempt to find the max performance point that the given
1236workload will run at while maintaining a latency below this target. The
1237values is given in microseconds. See \fBlatency_window\fR and
1238\fBlatency_percentile\fR.
1239.TP
1240.BI latency_window \fR=\fPint
1241Used with \fBlatency_target\fR to specify the sample window that the job
1242is run at varying queue depths to test the performance. The value is given
1243in microseconds.
1244.TP
1245.BI latency_percentile \fR=\fPfloat
1246The percentage of IOs that must fall within the criteria specified by
1247\fBlatency_target\fR and \fBlatency_window\fR. If not set, this defaults
1248to 100.0, meaning that all IOs must be equal or below to the value set
1249by \fBlatency_target\fR.
1250.TP
1251.BI max_latency \fR=\fPint
1252If set, fio will exit the job if it exceeds this maximum latency. It will exit
1253with an ETIME error.
1254.TP
1255.BI cpumask \fR=\fPint
1256Set CPU affinity for this job. \fIint\fR is a bitmask of allowed CPUs the job
1257may run on. See \fBsched_setaffinity\fR\|(2).
1258.TP
1259.BI cpus_allowed \fR=\fPstr
1260Same as \fBcpumask\fR, but allows a comma-delimited list of CPU numbers.
1261.TP
1262.BI cpus_allowed_policy \fR=\fPstr
1263Set the policy of how fio distributes the CPUs specified by \fBcpus_allowed\fR
1264or \fBcpumask\fR. Two policies are supported:
1265.RS
1266.RS
1267.TP
1268.B shared
1269All jobs will share the CPU set specified.
1270.TP
1271.B split
1272Each job will get a unique CPU from the CPU set.
1273.RE
1274.P
1275\fBshared\fR is the default behaviour, if the option isn't specified. If
1276\fBsplit\fR is specified, then fio will assign one cpu per job. If not enough
1277CPUs are given for the jobs listed, then fio will roundrobin the CPUs in
1278the set.
1279.RE
1280.P
1281.TP
1282.BI numa_cpu_nodes \fR=\fPstr
1283Set this job running on specified NUMA nodes' CPUs. The arguments allow
1284comma delimited list of cpu numbers, A-B ranges, or 'all'.
1285.TP
1286.BI numa_mem_policy \fR=\fPstr
1287Set this job's memory policy and corresponding NUMA nodes. Format of
1288the arguments:
1289.RS
1290.TP
1291.B <mode>[:<nodelist>]
1292.TP
1293.B mode
1294is one of the following memory policy:
1295.TP
1296.B default, prefer, bind, interleave, local
1297.TP
1298.RE
1299For \fBdefault\fR and \fBlocal\fR memory policy, no \fBnodelist\fR is
1300needed to be specified. For \fBprefer\fR, only one node is
1301allowed. For \fBbind\fR and \fBinterleave\fR, \fBnodelist\fR allows
1302comma delimited list of numbers, A-B ranges, or 'all'.
1303.TP
1304.BI startdelay \fR=\fPirange
1305Delay start of job for the specified number of seconds. Supports all time
1306suffixes to allow specification of hours, minutes, seconds and
1307milliseconds - seconds are the default if a unit is omitted.
1308Can be given as a range which causes each thread to choose randomly out of the
1309range.
1310.TP
1311.BI runtime \fR=\fPint
1312Terminate processing after the specified number of seconds.
1313.TP
1314.B time_based
1315If given, run for the specified \fBruntime\fR duration even if the files are
1316completely read or written. The same workload will be repeated as many times
1317as \fBruntime\fR allows.
1318.TP
1319.BI ramp_time \fR=\fPint
1320If set, fio will run the specified workload for this amount of time before
1321logging any performance numbers. Useful for letting performance settle before
1322logging results, thus minimizing the runtime required for stable results. Note
1323that the \fBramp_time\fR is considered lead in time for a job, thus it will
1324increase the total runtime if a special timeout or runtime is specified.
1325.TP
1326.BI steadystate \fR=\fPstr:float "\fR,\fP ss" \fR=\fPstr:float
1327Define the criterion and limit for assessing steady state performance. The
1328first parameter designates the criterion whereas the second parameter sets the
1329threshold. When the criterion falls below the threshold for the specified
1330duration, the job will stop. For example, iops_slope:0.1% will direct fio
1331to terminate the job when the least squares regression slope falls below 0.1%
1332of the mean IOPS. If group_reporting is enabled this will apply to all jobs in
1333the group. All assessments are carried out using only data from the rolling
1334collection window. Threshold limits can be expressed as a fixed value or as a
1335percentage of the mean in the collection window. Below are the available steady
1336state assessment criteria.
1337.RS
1338.RS
1339.TP
1340.B iops
1341Collect IOPS data. Stop the job if all individual IOPS measurements are within
1342the specified limit of the mean IOPS (e.g., iops:2 means that all individual
1343IOPS values must be within 2 of the mean, whereas iops:0.2% means that all
1344individual IOPS values must be within 0.2% of the mean IOPS to terminate the
1345job).
1346.TP
1347.B iops_slope
1348Collect IOPS data and calculate the least squares regression slope. Stop the
1349job if the slope falls below the specified limit.
1350.TP
1351.B bw
1352Collect bandwidth data. Stop the job if all individual bandwidth measurements
1353are within the specified limit of the mean bandwidth.
1354.TP
1355.B bw_slope
1356Collect bandwidth data and calculate the least squares regression slope. Stop
1357the job if the slope falls below the specified limit.
1358.RE
1359.RE
1360.TP
1361.BI steadystate_duration \fR=\fPtime "\fR,\fP ss_dur" \fR=\fPtime
1362A rolling window of this duration will be used to judge whether steady state
1363has been reached. Data will be collected once per second. The default is 0
1364which disables steady state detection.
1365.TP
1366.BI steadystate_ramp_time \fR=\fPtime "\fR,\fP ss_ramp" \fR=\fPtime
1367Allow the job to run for the specified duration before beginning data collection
1368for checking the steady state job termination criterion. The default is 0.
1369.TP
1370.BI invalidate \fR=\fPbool
1371Invalidate buffer-cache for the file prior to starting I/O. Default: true.
1372.TP
1373.BI sync \fR=\fPbool
1374Use synchronous I/O for buffered writes. For the majority of I/O engines,
1375this means using O_SYNC. Default: false.
1376.TP
1377.BI iomem \fR=\fPstr "\fR,\fP mem" \fR=\fPstr
1378Allocation method for I/O unit buffer. Allowed values are:
1379.RS
1380.RS
1381.TP
1382.B malloc
1383Allocate memory with \fBmalloc\fR\|(3). Default memory type.
1384.TP
1385.B shm
1386Use shared memory buffers allocated through \fBshmget\fR\|(2).
1387.TP
1388.B shmhuge
1389Same as \fBshm\fR, but use huge pages as backing.
1390.TP
1391.B mmap
1392Use \fBmmap\fR\|(2) for allocation. Uses anonymous memory unless a filename
1393is given after the option in the format `:\fIfile\fR'.
1394.TP
1395.B mmaphuge
1396Same as \fBmmap\fR, but use huge files as backing.
1397.TP
1398.B mmapshared
1399Same as \fBmmap\fR, but use a MMAP_SHARED mapping.
1400.TP
1401.B cudamalloc
1402Use GPU memory as the buffers for GPUDirect RDMA benchmark. The ioengine must be \fBrdma\fR.
1403.RE
1404.P
1405The amount of memory allocated is the maximum allowed \fBblocksize\fR for the
1406job multiplied by \fBiodepth\fR. For \fBshmhuge\fR or \fBmmaphuge\fR to work,
1407the system must have free huge pages allocated. \fBmmaphuge\fR also needs to
1408have hugetlbfs mounted, and \fIfile\fR must point there. At least on Linux,
1409huge pages must be manually allocated. See \fB/proc/sys/vm/nr_hugehages\fR
1410and the documentation for that. Normally you just need to echo an appropriate
1411number, eg echoing 8 will ensure that the OS has 8 huge pages ready for
1412use.
1413.RE
1414.TP
1415.BI iomem_align \fR=\fPint "\fR,\fP mem_align" \fR=\fPint
1416This indicates the memory alignment of the IO memory buffers. Note that the
1417given alignment is applied to the first IO unit buffer, if using \fBiodepth\fR
1418the alignment of the following buffers are given by the \fBbs\fR used. In
1419other words, if using a \fBbs\fR that is a multiple of the page sized in the
1420system, all buffers will be aligned to this value. If using a \fBbs\fR that
1421is not page aligned, the alignment of subsequent IO memory buffers is the
1422sum of the \fBiomem_align\fR and \fBbs\fR used.
1423.TP
1424.BI hugepage\-size \fR=\fPint
1425Defines the size of a huge page. Must be at least equal to the system setting.
1426Should be a multiple of 1MiB. Default: 4MiB.
1427.TP
1428.B exitall
1429Terminate all jobs when one finishes. Default: wait for each job to finish.
1430.TP
1431.B exitall_on_error \fR=\fPbool
1432Terminate all jobs if one job finishes in error. Default: wait for each job
1433to finish.
1434.TP
1435.BI bwavgtime \fR=\fPint
1436Average bandwidth calculations over the given time in milliseconds. If the job
1437also does bandwidth logging through \fBwrite_bw_log\fR, then the minimum of
1438this option and \fBlog_avg_msec\fR will be used. Default: 500ms.
1439.TP
1440.BI iopsavgtime \fR=\fPint
1441Average IOPS calculations over the given time in milliseconds. If the job
1442also does IOPS logging through \fBwrite_iops_log\fR, then the minimum of
1443this option and \fBlog_avg_msec\fR will be used. Default: 500ms.
1444.TP
1445.BI create_serialize \fR=\fPbool
1446If true, serialize file creation for the jobs. Default: true.
1447.TP
1448.BI create_fsync \fR=\fPbool
1449\fBfsync\fR\|(2) data file after creation. Default: true.
1450.TP
1451.BI create_on_open \fR=\fPbool
1452If true, the files are not created until they are opened for IO by the job.
1453.TP
1454.BI create_only \fR=\fPbool
1455If true, fio will only run the setup phase of the job. If files need to be
1456laid out or updated on disk, only that will be done. The actual job contents
1457are not executed.
1458.TP
1459.BI allow_file_create \fR=\fPbool
1460If true, fio is permitted to create files as part of its workload. This is
1461the default behavior. If this option is false, then fio will error out if the
1462files it needs to use don't already exist. Default: true.
1463.TP
1464.BI allow_mounted_write \fR=\fPbool
1465If this isn't set, fio will abort jobs that are destructive (eg that write)
1466to what appears to be a mounted device or partition. This should help catch
1467creating inadvertently destructive tests, not realizing that the test will
1468destroy data on the mounted file system. Default: false.
1469.TP
1470.BI pre_read \fR=\fPbool
1471If this is given, files will be pre-read into memory before starting the given
1472IO operation. This will also clear the \fR \fBinvalidate\fR flag, since it is
1473pointless to pre-read and then drop the cache. This will only work for IO
1474engines that are seekable, since they allow you to read the same data
1475multiple times. Thus it will not work on eg network or splice IO.
1476.TP
1477.BI unlink \fR=\fPbool
1478Unlink job files when done. Default: false.
1479.TP
1480.BI unlink_each_loop \fR=\fPbool
1481Unlink job files after each iteration or loop. Default: false.
1482.TP
1483.BI loops \fR=\fPint
1484Specifies the number of iterations (runs of the same workload) of this job.
1485Default: 1.
1486.TP
1487.BI verify_only \fR=\fPbool
1488Do not perform the specified workload, only verify data still matches previous
1489invocation of this workload. This option allows one to check data multiple
1490times at a later date without overwriting it. This option makes sense only for
1491workloads that write data, and does not support workloads with the
1492\fBtime_based\fR option set.
1493.TP
1494.BI do_verify \fR=\fPbool
1495Run the verify phase after a write phase. Only valid if \fBverify\fR is set.
1496Default: true.
1497.TP
1498.BI verify \fR=\fPstr
1499Method of verifying file contents after each iteration of the job. Each
1500verification method also implies verification of special header, which is
1501written to the beginning of each block. This header also includes meta
1502information, like offset of the block, block number, timestamp when block
1503was written, etc. \fBverify\fR=str can be combined with \fBverify_pattern\fR=str
1504option. The allowed values are:
1505.RS
1506.RS
1507.TP
1508.B md5 crc16 crc32 crc32c crc32c-intel crc64 crc7 sha256 sha512 sha1 sha3-224 sha3-256 sha3-384 sha3-512 xxhash
1509Store appropriate checksum in the header of each block. crc32c-intel is
1510hardware accelerated SSE4.2 driven, falls back to regular crc32c if
1511not supported by the system.
1512.TP
1513.B meta
1514This option is deprecated, since now meta information is included in generic
1515verification header and meta verification happens by default. For detailed
1516information see the description of the \fBverify\fR=str setting. This option
1517is kept because of compatibility's sake with old configurations. Do not use it.
1518.TP
1519.B pattern
1520Verify a strict pattern. Normally fio includes a header with some basic
1521information and checksumming, but if this option is set, only the
1522specific pattern set with \fBverify_pattern\fR is verified.
1523.TP
1524.B null
1525Pretend to verify. Used for testing internals.
1526.RE
1527
1528This option can be used for repeated burn-in tests of a system to make sure
1529that the written data is also correctly read back. If the data direction given
1530is a read or random read, fio will assume that it should verify a previously
1531written file. If the data direction includes any form of write, the verify will
1532be of the newly written data.
1533.RE
1534.TP
1535.BI verifysort \fR=\fPbool
1536If true, written verify blocks are sorted if \fBfio\fR deems it to be faster to
1537read them back in a sorted manner. Default: true.
1538.TP
1539.BI verifysort_nr \fR=\fPint
1540Pre-load and sort verify blocks for a read workload.
1541.TP
1542.BI verify_offset \fR=\fPint
1543Swap the verification header with data somewhere else in the block before
1544writing. It is swapped back before verifying.
1545.TP
1546.BI verify_interval \fR=\fPint
1547Write the verification header for this number of bytes, which should divide
1548\fBblocksize\fR. Default: \fBblocksize\fR.
1549.TP
1550.BI verify_pattern \fR=\fPstr
1551If set, fio will fill the io buffers with this pattern. Fio defaults to filling
1552with totally random bytes, but sometimes it's interesting to fill with a known
1553pattern for io verification purposes. Depending on the width of the pattern,
1554fio will fill 1/2/3/4 bytes of the buffer at the time(it can be either a
1555decimal or a hex number). The verify_pattern if larger than a 32-bit quantity
1556has to be a hex number that starts with either "0x" or "0X". Use with
1557\fBverify\fP=str. Also, verify_pattern supports %o format, which means that for
1558each block offset will be written and then verified back, e.g.:
1559.RS
1560.RS
1561\fBverify_pattern\fR=%o
1562.RE
1563Or use combination of everything:
1564.LP
1565.RS
1566\fBverify_pattern\fR=0xff%o"abcd"-21
1567.RE
1568.RE
1569.TP
1570.BI verify_fatal \fR=\fPbool
1571If true, exit the job on the first observed verification failure. Default:
1572false.
1573.TP
1574.BI verify_dump \fR=\fPbool
1575If set, dump the contents of both the original data block and the data block we
1576read off disk to files. This allows later analysis to inspect just what kind of
1577data corruption occurred. Off by default.
1578.TP
1579.BI verify_async \fR=\fPint
1580Fio will normally verify IO inline from the submitting thread. This option
1581takes an integer describing how many async offload threads to create for IO
1582verification instead, causing fio to offload the duty of verifying IO contents
1583to one or more separate threads. If using this offload option, even sync IO
1584engines can benefit from using an \fBiodepth\fR setting higher than 1, as it
1585allows them to have IO in flight while verifies are running.
1586.TP
1587.BI verify_async_cpus \fR=\fPstr
1588Tell fio to set the given CPU affinity on the async IO verification threads.
1589See \fBcpus_allowed\fP for the format used.
1590.TP
1591.BI verify_backlog \fR=\fPint
1592Fio will normally verify the written contents of a job that utilizes verify
1593once that job has completed. In other words, everything is written then
1594everything is read back and verified. You may want to verify continually
1595instead for a variety of reasons. Fio stores the meta data associated with an
1596IO block in memory, so for large verify workloads, quite a bit of memory would
1597be used up holding this meta data. If this option is enabled, fio will write
1598only N blocks before verifying these blocks.
1599.TP
1600.BI verify_backlog_batch \fR=\fPint
1601Control how many blocks fio will verify if verify_backlog is set. If not set,
1602will default to the value of \fBverify_backlog\fR (meaning the entire queue is
1603read back and verified). If \fBverify_backlog_batch\fR is less than
1604\fBverify_backlog\fR then not all blocks will be verified, if
1605\fBverify_backlog_batch\fR is larger than \fBverify_backlog\fR, some blocks
1606will be verified more than once.
1607.TP
1608.BI trim_percentage \fR=\fPint
1609Number of verify blocks to discard/trim.
1610.TP
1611.BI trim_verify_zero \fR=\fPbool
1612Verify that trim/discarded blocks are returned as zeroes.
1613.TP
1614.BI trim_backlog \fR=\fPint
1615Trim after this number of blocks are written.
1616.TP
1617.BI trim_backlog_batch \fR=\fPint
1618Trim this number of IO blocks.
1619.TP
1620.BI experimental_verify \fR=\fPbool
1621Enable experimental verification.
1622.TP
1623.BI verify_state_save \fR=\fPbool
1624When a job exits during the write phase of a verify workload, save its
1625current state. This allows fio to replay up until that point, if the
1626verify state is loaded for the verify read phase.
1627.TP
1628.BI verify_state_load \fR=\fPbool
1629If a verify termination trigger was used, fio stores the current write
1630state of each thread. This can be used at verification time so that fio
1631knows how far it should verify. Without this information, fio will run
1632a full verification pass, according to the settings in the job file used.
1633.TP
1634.B stonewall "\fR,\fP wait_for_previous"
1635Wait for preceding jobs in the job file to exit before starting this one.
1636\fBstonewall\fR implies \fBnew_group\fR.
1637.TP
1638.B new_group
1639Start a new reporting group. If not given, all jobs in a file will be part
1640of the same reporting group, unless separated by a stonewall.
1641.TP
1642.BI stats \fR=\fPbool
1643By default, fio collects and shows final output results for all jobs that run.
1644If this option is set to 0, then fio will ignore it in the final stat output.
1645.TP
1646.BI numjobs \fR=\fPint
1647Number of clones (processes/threads performing the same workload) of this job.
1648Default: 1.
1649.TP
1650.B group_reporting
1651If set, display per-group reports instead of per-job when \fBnumjobs\fR is
1652specified.
1653.TP
1654.B thread
1655Use threads created with \fBpthread_create\fR\|(3) instead of processes created
1656with \fBfork\fR\|(2).
1657.TP
1658.BI zonesize \fR=\fPint
1659Divide file into zones of the specified size in bytes. See \fBzoneskip\fR.
1660.TP
1661.BI zonerange \fR=\fPint
1662Give size of an IO zone. See \fBzoneskip\fR.
1663.TP
1664.BI zoneskip \fR=\fPint
1665Skip the specified number of bytes when \fBzonesize\fR bytes of data have been
1666read.
1667.TP
1668.BI write_iolog \fR=\fPstr
1669Write the issued I/O patterns to the specified file. Specify a separate file
1670for each job, otherwise the iologs will be interspersed and the file may be
1671corrupt.
1672.TP
1673.BI read_iolog \fR=\fPstr
1674Replay the I/O patterns contained in the specified file generated by
1675\fBwrite_iolog\fR, or may be a \fBblktrace\fR binary file.
1676.TP
1677.BI replay_no_stall \fR=\fPint
1678While replaying I/O patterns using \fBread_iolog\fR the default behavior
1679attempts to respect timing information between I/Os. Enabling
1680\fBreplay_no_stall\fR causes I/Os to be replayed as fast as possible while
1681still respecting ordering.
1682.TP
1683.BI replay_redirect \fR=\fPstr
1684While replaying I/O patterns using \fBread_iolog\fR the default behavior
1685is to replay the IOPS onto the major/minor device that each IOP was recorded
1686from. Setting \fBreplay_redirect\fR causes all IOPS to be replayed onto the
1687single specified device regardless of the device it was recorded from.
1688.TP
1689.BI replay_align \fR=\fPint
1690Force alignment of IO offsets and lengths in a trace to this power of 2 value.
1691.TP
1692.BI replay_scale \fR=\fPint
1693Scale sector offsets down by this factor when replaying traces.
1694.TP
1695.BI per_job_logs \fR=\fPbool
1696If set, this generates bw/clat/iops log with per file private filenames. If
1697not set, jobs with identical names will share the log filename. Default: true.
1698.TP
1699.BI write_bw_log \fR=\fPstr
1700If given, write a bandwidth log for this job. Can be used to store data of the
1701bandwidth of the jobs in their lifetime. The included fio_generate_plots script
1702uses gnuplot to turn these text files into nice graphs. See \fBwrite_lat_log\fR
1703for behaviour of given filename. For this option, the postfix is _bw.x.log,
1704where x is the index of the job (1..N, where N is the number of jobs). If
1705\fBper_job_logs\fR is false, then the filename will not include the job index.
1706See the \fBLOG FILE FORMATS\fR
1707section.
1708.TP
1709.BI write_lat_log \fR=\fPstr
1710Same as \fBwrite_bw_log\fR, but writes I/O completion latencies. If no
1711filename is given with this option, the default filename of
1712"jobname_type.x.log" is used, where x is the index of the job (1..N, where
1713N is the number of jobs). Even if the filename is given, fio will still
1714append the type of log. If \fBper_job_logs\fR is false, then the filename will
1715not include the job index. See the \fBLOG FILE FORMATS\fR section.
1716.TP
1717.BI write_hist_log \fR=\fPstr
1718Same as \fBwrite_lat_log\fR, but writes I/O completion latency histograms. If
1719no filename is given with this option, the default filename of
1720"jobname_clat_hist.x.log" is used, where x is the index of the job (1..N, where
1721N is the number of jobs). Even if the filename is given, fio will still append
1722the type of log. If \fBper_job_logs\fR is false, then the filename will not
1723include the job index. See the \fBLOG FILE FORMATS\fR section.
1724.TP
1725.BI write_iops_log \fR=\fPstr
1726Same as \fBwrite_bw_log\fR, but writes IOPS. If no filename is given with this
1727option, the default filename of "jobname_type.x.log" is used, where x is the
1728index of the job (1..N, where N is the number of jobs). Even if the filename
1729is given, fio will still append the type of log. If \fBper_job_logs\fR is false,
1730then the filename will not include the job index. See the \fBLOG FILE FORMATS\fR
1731section.
1732.TP
1733.BI log_avg_msec \fR=\fPint
1734By default, fio will log an entry in the iops, latency, or bw log for every
1735IO that completes. When writing to the disk log, that can quickly grow to a
1736very large size. Setting this option makes fio average the each log entry
1737over the specified period of time, reducing the resolution of the log. See
1738\fBlog_max_value\fR as well. Defaults to 0, logging all entries.
1739.TP
1740.BI log_max_value \fR=\fPbool
1741If \fBlog_avg_msec\fR is set, fio logs the average over that window. If you
1742instead want to log the maximum value, set this option to 1. Defaults to
17430, meaning that averaged values are logged.
1744.TP
1745.BI log_hist_msec \fR=\fPint
1746Same as \fBlog_avg_msec\fR, but logs entries for completion latency histograms.
1747Computing latency percentiles from averages of intervals using \fBlog_avg_msec\fR
1748is innacurate. Setting this option makes fio log histogram entries over the
1749specified period of time, reducing log sizes for high IOPS devices while
1750retaining percentile accuracy. See \fBlog_hist_coarseness\fR as well. Defaults
1751to 0, meaning histogram logging is disabled.
1752.TP
1753.BI log_hist_coarseness \fR=\fPint
1754Integer ranging from 0 to 6, defining the coarseness of the resolution of the
1755histogram logs enabled with \fBlog_hist_msec\fR. For each increment in
1756coarseness, fio outputs half as many bins. Defaults to 0, for which histogram
1757logs contain 1216 latency bins. See the \fBLOG FILE FORMATS\fR section.
1758.TP
1759.BI log_offset \fR=\fPbool
1760If this is set, the iolog options will include the byte offset for the IO
1761entry as well as the other data values.
1762.TP
1763.BI log_compression \fR=\fPint
1764If this is set, fio will compress the IO logs as it goes, to keep the memory
1765footprint lower. When a log reaches the specified size, that chunk is removed
1766and compressed in the background. Given that IO logs are fairly highly
1767compressible, this yields a nice memory savings for longer runs. The downside
1768is that the compression will consume some background CPU cycles, so it may
1769impact the run. This, however, is also true if the logging ends up consuming
1770most of the system memory. So pick your poison. The IO logs are saved
1771normally at the end of a run, by decompressing the chunks and storing them
1772in the specified log file. This feature depends on the availability of zlib.
1773.TP
1774.BI log_compression_cpus \fR=\fPstr
1775Define the set of CPUs that are allowed to handle online log compression
1776for the IO jobs. This can provide better isolation between performance
1777sensitive jobs, and background compression work.
1778.TP
1779.BI log_store_compressed \fR=\fPbool
1780If set, fio will store the log files in a compressed format. They can be
1781decompressed with fio, using the \fB\-\-inflate-log\fR command line parameter.
1782The files will be stored with a \fB\.fz\fR suffix.
1783.TP
1784.BI log_unix_epoch \fR=\fPbool
1785If set, fio will log Unix timestamps to the log files produced by enabling
1786\fBwrite_type_log\fR for each log type, instead of the default zero-based
1787timestamps.
1788.TP
1789.BI block_error_percentiles \fR=\fPbool
1790If set, record errors in trim block-sized units from writes and trims and output
1791a histogram of how many trims it took to get to errors, and what kind of error
1792was encountered.
1793.TP
1794.BI disable_lat \fR=\fPbool
1795Disable measurements of total latency numbers. Useful only for cutting
1796back the number of calls to \fBgettimeofday\fR\|(2), as that does impact performance at
1797really high IOPS rates. Note that to really get rid of a large amount of these
1798calls, this option must be used with disable_slat and disable_bw as well.
1799.TP
1800.BI disable_clat \fR=\fPbool
1801Disable measurements of completion latency numbers. See \fBdisable_lat\fR.
1802.TP
1803.BI disable_slat \fR=\fPbool
1804Disable measurements of submission latency numbers. See \fBdisable_lat\fR.
1805.TP
1806.BI disable_bw_measurement \fR=\fPbool
1807Disable measurements of throughput/bandwidth numbers. See \fBdisable_lat\fR.
1808.TP
1809.BI lockmem \fR=\fPint
1810Pin the specified amount of memory with \fBmlock\fR\|(2). Can be used to
1811simulate a smaller amount of memory. The amount specified is per worker.
1812.TP
1813.BI exec_prerun \fR=\fPstr
1814Before running the job, execute the specified command with \fBsystem\fR\|(3).
1815.RS
1816Output is redirected in a file called \fBjobname.prerun.txt\fR
1817.RE
1818.TP
1819.BI exec_postrun \fR=\fPstr
1820Same as \fBexec_prerun\fR, but the command is executed after the job completes.
1821.RS
1822Output is redirected in a file called \fBjobname.postrun.txt\fR
1823.RE
1824.TP
1825.BI ioscheduler \fR=\fPstr
1826Attempt to switch the device hosting the file to the specified I/O scheduler.
1827.TP
1828.BI disk_util \fR=\fPbool
1829Generate disk utilization statistics if the platform supports it. Default: true.
1830.TP
1831.BI clocksource \fR=\fPstr
1832Use the given clocksource as the base of timing. The supported options are:
1833.RS
1834.TP
1835.B gettimeofday
1836\fBgettimeofday\fR\|(2)
1837.TP
1838.B clock_gettime
1839\fBclock_gettime\fR\|(2)
1840.TP
1841.B cpu
1842Internal CPU clock source
1843.TP
1844.RE
1845.P
1846\fBcpu\fR is the preferred clocksource if it is reliable, as it is very fast
1847(and fio is heavy on time calls). Fio will automatically use this clocksource
1848if it's supported and considered reliable on the system it is running on,
1849unless another clocksource is specifically set. For x86/x86-64 CPUs, this
1850means supporting TSC Invariant.
1851.TP
1852.BI gtod_reduce \fR=\fPbool
1853Enable all of the \fBgettimeofday\fR\|(2) reducing options (disable_clat, disable_slat,
1854disable_bw) plus reduce precision of the timeout somewhat to really shrink the
1855\fBgettimeofday\fR\|(2) call count. With this option enabled, we only do about 0.4% of
1856the gtod() calls we would have done if all time keeping was enabled.
1857.TP
1858.BI gtod_cpu \fR=\fPint
1859Sometimes it's cheaper to dedicate a single thread of execution to just getting
1860the current time. Fio (and databases, for instance) are very intensive on
1861\fBgettimeofday\fR\|(2) calls. With this option, you can set one CPU aside for doing
1862nothing but logging current time to a shared memory location. Then the other
1863threads/processes that run IO workloads need only copy that segment, instead of
1864entering the kernel with a \fBgettimeofday\fR\|(2) call. The CPU set aside for doing
1865these time calls will be excluded from other uses. Fio will manually clear it
1866from the CPU mask of other jobs.
1867.TP
1868.BI ignore_error \fR=\fPstr
1869Sometimes you want to ignore some errors during test in that case you can specify
1870error list for each error type.
1871.br
1872ignore_error=READ_ERR_LIST,WRITE_ERR_LIST,VERIFY_ERR_LIST
1873.br
1874errors for given error type is separated with ':'.
1875Error may be symbol ('ENOSPC', 'ENOMEM') or an integer.
1876.br
1877Example: ignore_error=EAGAIN,ENOSPC:122 .
1878.br
1879This option will ignore EAGAIN from READ, and ENOSPC and 122(EDQUOT) from WRITE.
1880.TP
1881.BI error_dump \fR=\fPbool
1882If set dump every error even if it is non fatal, true by default. If disabled
1883only fatal error will be dumped
1884.TP
1885.BI profile \fR=\fPstr
1886Select a specific builtin performance test.
1887.TP
1888.BI cgroup \fR=\fPstr
1889Add job to this control group. If it doesn't exist, it will be created.
1890The system must have a mounted cgroup blkio mount point for this to work. If
1891your system doesn't have it mounted, you can do so with:
1892
1893# mount \-t cgroup \-o blkio none /cgroup
1894.TP
1895.BI cgroup_weight \fR=\fPint
1896Set the weight of the cgroup to this value. See the documentation that comes
1897with the kernel, allowed values are in the range of 100..1000.
1898.TP
1899.BI cgroup_nodelete \fR=\fPbool
1900Normally fio will delete the cgroups it has created after the job completion.
1901To override this behavior and to leave cgroups around after the job completion,
1902set cgroup_nodelete=1. This can be useful if one wants to inspect various
1903cgroup files after job completion. Default: false
1904.TP
1905.BI uid \fR=\fPint
1906Instead of running as the invoking user, set the user ID to this value before
1907the thread/process does any work.
1908.TP
1909.BI gid \fR=\fPint
1910Set group ID, see \fBuid\fR.
1911.TP
1912.BI unit_base \fR=\fPint
1913Base unit for reporting. Allowed values are:
1914.RS
1915.TP
1916.B 0
1917Use auto-detection (default).
1918.TP
1919.B 8
1920Byte based.
1921.TP
1922.B 1
1923Bit based.
1924.RE
1925.P
1926.TP
1927.BI flow_id \fR=\fPint
1928The ID of the flow. If not specified, it defaults to being a global flow. See
1929\fBflow\fR.
1930.TP
1931.BI flow \fR=\fPint
1932Weight in token-based flow control. If this value is used, then there is a
1933\fBflow counter\fR which is used to regulate the proportion of activity between
1934two or more jobs. fio attempts to keep this flow counter near zero. The
1935\fBflow\fR parameter stands for how much should be added or subtracted to the
1936flow counter on each iteration of the main I/O loop. That is, if one job has
1937\fBflow=8\fR and another job has \fBflow=-1\fR, then there will be a roughly
19381:8 ratio in how much one runs vs the other.
1939.TP
1940.BI flow_watermark \fR=\fPint
1941The maximum value that the absolute value of the flow counter is allowed to
1942reach before the job must wait for a lower value of the counter.
1943.TP
1944.BI flow_sleep \fR=\fPint
1945The period of time, in microseconds, to wait after the flow watermark has been
1946exceeded before retrying operations
1947.TP
1948.BI clat_percentiles \fR=\fPbool
1949Enable the reporting of percentiles of completion latencies.
1950.TP
1951.BI percentile_list \fR=\fPfloat_list
1952Overwrite the default list of percentiles for completion latencies and the
1953block error histogram. Each number is a floating number in the range (0,100],
1954and the maximum length of the list is 20. Use ':' to separate the
1955numbers. For example, \-\-percentile_list=99.5:99.9 will cause fio to
1956report the values of completion latency below which 99.5% and 99.9% of
1957the observed latencies fell, respectively.
1958.SS "Ioengine Parameters List"
1959Some parameters are only valid when a specific ioengine is in use. These are
1960used identically to normal parameters, with the caveat that when used on the
1961command line, they must come after the ioengine.
1962.TP
1963.BI (cpuio)cpuload \fR=\fPint
1964Attempt to use the specified percentage of CPU cycles.
1965.TP
1966.BI (cpuio)cpuchunks \fR=\fPint
1967Split the load into cycles of the given time. In microseconds.
1968.TP
1969.BI (cpuio)exit_on_io_done \fR=\fPbool
1970Detect when IO threads are done, then exit.
1971.TP
1972.BI (libaio)userspace_reap
1973Normally, with the libaio engine in use, fio will use
1974the io_getevents system call to reap newly returned events.
1975With this flag turned on, the AIO ring will be read directly
1976from user-space to reap events. The reaping mode is only
1977enabled when polling for a minimum of 0 events (eg when
1978iodepth_batch_complete=0).
1979.TP
1980.BI (pvsync2)hipri
1981Set RWF_HIPRI on IO, indicating to the kernel that it's of
1982higher priority than normal.
1983.TP
1984.BI (net,netsplice)hostname \fR=\fPstr
1985The host name or IP address to use for TCP or UDP based IO.
1986If the job is a TCP listener or UDP reader, the hostname is not
1987used and must be omitted unless it is a valid UDP multicast address.
1988.TP
1989.BI (net,netsplice)port \fR=\fPint
1990The TCP or UDP port to bind to or connect to. If this is used with
1991\fBnumjobs\fR to spawn multiple instances of the same job type, then
1992this will be the starting port number since fio will use a range of ports.
1993.TP
1994.BI (net,netsplice)interface \fR=\fPstr
1995The IP address of the network interface used to send or receive UDP multicast
1996packets.
1997.TP
1998.BI (net,netsplice)ttl \fR=\fPint
1999Time-to-live value for outgoing UDP multicast packets. Default: 1
2000.TP
2001.BI (net,netsplice)nodelay \fR=\fPbool
2002Set TCP_NODELAY on TCP connections.
2003.TP
2004.BI (net,netsplice)protocol \fR=\fPstr "\fR,\fP proto" \fR=\fPstr
2005The network protocol to use. Accepted values are:
2006.RS
2007.RS
2008.TP
2009.B tcp
2010Transmission control protocol
2011.TP
2012.B tcpv6
2013Transmission control protocol V6
2014.TP
2015.B udp
2016User datagram protocol
2017.TP
2018.B udpv6
2019User datagram protocol V6
2020.TP
2021.B unix
2022UNIX domain socket
2023.RE
2024.P
2025When the protocol is TCP or UDP, the port must also be given,
2026as well as the hostname if the job is a TCP listener or UDP
2027reader. For unix sockets, the normal filename option should be
2028used and the port is invalid.
2029.RE
2030.TP
2031.BI (net,netsplice)listen
2032For TCP network connections, tell fio to listen for incoming
2033connections rather than initiating an outgoing connection. The
2034hostname must be omitted if this option is used.
2035.TP
2036.BI (net, pingpong) \fR=\fPbool
2037Normally a network writer will just continue writing data, and a network reader
2038will just consume packets. If pingpong=1 is set, a writer will send its normal
2039payload to the reader, then wait for the reader to send the same payload back.
2040This allows fio to measure network latencies. The submission and completion
2041latencies then measure local time spent sending or receiving, and the
2042completion latency measures how long it took for the other end to receive and
2043send back. For UDP multicast traffic pingpong=1 should only be set for a single
2044reader when multiple readers are listening to the same address.
2045.TP
2046.BI (net, window_size) \fR=\fPint
2047Set the desired socket buffer size for the connection.
2048.TP
2049.BI (net, mss) \fR=\fPint
2050Set the TCP maximum segment size (TCP_MAXSEG).
2051.TP
2052.BI (e4defrag,donorname) \fR=\fPstr
2053File will be used as a block donor (swap extents between files)
2054.TP
2055.BI (e4defrag,inplace) \fR=\fPint
2056Configure donor file block allocation strategy
2057.RS
2058.BI 0(default) :
2059Preallocate donor's file on init
2060.TP
2061.BI 1:
2062allocate space immediately inside defragment event, and free right after event
2063.RE
2064.TP
2065.BI (rbd)clustername \fR=\fPstr
2066Specifies the name of the ceph cluster.
2067.TP
2068.BI (rbd)rbdname \fR=\fPstr
2069Specifies the name of the RBD.
2070.TP
2071.BI (rbd)pool \fR=\fPstr
2072Specifies the name of the Ceph pool containing the RBD.
2073.TP
2074.BI (rbd)clientname \fR=\fPstr
2075Specifies the username (without the 'client.' prefix) used to access the Ceph
2076cluster. If the clustername is specified, the clientname shall be the full
2077type.id string. If no type. prefix is given, fio will add 'client.' by default.
2078.TP
2079.BI (mtd)skipbad \fR=\fPbool
2080Skip operations against known bad blocks.
2081.SH OUTPUT
2082While running, \fBfio\fR will display the status of the created jobs. For
2083example:
2084.RS
2085.P
2086Jobs: 1: [_r] [24.8% done] [ 13509/ 8334 kb/s] [eta 00h:01m:31s]
2087.RE
2088.P
2089The characters in the first set of brackets denote the current status of each
2090threads. The possible values are:
2091.P
2092.PD 0
2093.RS
2094.TP
2095.B P
2096Setup but not started.
2097.TP
2098.B C
2099Thread created.
2100.TP
2101.B I
2102Initialized, waiting.
2103.TP
2104.B R
2105Running, doing sequential reads.
2106.TP
2107.B r
2108Running, doing random reads.
2109.TP
2110.B W
2111Running, doing sequential writes.
2112.TP
2113.B w
2114Running, doing random writes.
2115.TP
2116.B M
2117Running, doing mixed sequential reads/writes.
2118.TP
2119.B m
2120Running, doing mixed random reads/writes.
2121.TP
2122.B F
2123Running, currently waiting for \fBfsync\fR\|(2).
2124.TP
2125.B V
2126Running, verifying written data.
2127.TP
2128.B E
2129Exited, not reaped by main thread.
2130.TP
2131.B \-
2132Exited, thread reaped.
2133.RE
2134.PD
2135.P
2136The second set of brackets shows the estimated completion percentage of
2137the current group. The third set shows the read and write I/O rate,
2138respectively. Finally, the estimated run time of the job is displayed.
2139.P
2140When \fBfio\fR completes (or is interrupted by Ctrl-C), it will show data
2141for each thread, each group of threads, and each disk, in that order.
2142.P
2143Per-thread statistics first show the threads client number, group-id, and
2144error code. The remaining figures are as follows:
2145.RS
2146.TP
2147.B io
2148Number of megabytes of I/O performed.
2149.TP
2150.B bw
2151Average data rate (bandwidth).
2152.TP
2153.B runt
2154Threads run time.
2155.TP
2156.B slat
2157Submission latency minimum, maximum, average and standard deviation. This is
2158the time it took to submit the I/O.
2159.TP
2160.B clat
2161Completion latency minimum, maximum, average and standard deviation. This
2162is the time between submission and completion.
2163.TP
2164.B bw
2165Bandwidth minimum, maximum, percentage of aggregate bandwidth received, average
2166and standard deviation.
2167.TP
2168.B cpu
2169CPU usage statistics. Includes user and system time, number of context switches
2170this thread went through and number of major and minor page faults. The CPU
2171utilization numbers are averages for the jobs in that reporting group, while
2172the context and fault counters are summed.
2173.TP
2174.B IO depths
2175Distribution of I/O depths. Each depth includes everything less than (or equal)
2176to it, but greater than the previous depth.
2177.TP
2178.B IO issued
2179Number of read/write requests issued, and number of short read/write requests.
2180.TP
2181.B IO latencies
2182Distribution of I/O completion latencies. The numbers follow the same pattern
2183as \fBIO depths\fR.
2184.RE
2185.P
2186The group statistics show:
2187.PD 0
2188.RS
2189.TP
2190.B io
2191Number of megabytes I/O performed.
2192.TP
2193.B aggrb
2194Aggregate bandwidth of threads in the group.
2195.TP
2196.B minb
2197Minimum average bandwidth a thread saw.
2198.TP
2199.B maxb
2200Maximum average bandwidth a thread saw.
2201.TP
2202.B mint
2203Shortest runtime of threads in the group.
2204.TP
2205.B maxt
2206Longest runtime of threads in the group.
2207.RE
2208.PD
2209.P
2210Finally, disk statistics are printed with reads first:
2211.PD 0
2212.RS
2213.TP
2214.B ios
2215Number of I/Os performed by all groups.
2216.TP
2217.B merge
2218Number of merges in the I/O scheduler.
2219.TP
2220.B ticks
2221Number of ticks we kept the disk busy.
2222.TP
2223.B io_queue
2224Total time spent in the disk queue.
2225.TP
2226.B util
2227Disk utilization.
2228.RE
2229.PD
2230.P
2231It is also possible to get fio to dump the current output while it is
2232running, without terminating the job. To do that, send fio the \fBUSR1\fR
2233signal.
2234.SH TERSE OUTPUT
2235If the \fB\-\-minimal\fR / \fB\-\-append-terse\fR options are given, the
2236results will be printed/appended in a semicolon-delimited format suitable for
2237scripted use.
2238A job description (if provided) follows on a new line. Note that the first
2239number in the line is the version number. If the output has to be changed
2240for some reason, this number will be incremented by 1 to signify that
2241change. Numbers in brackets (e.g. "[v3]") indicate which terse version
2242introduced a field. The fields are:
2243.P
2244.RS
2245.B terse version, fio version [v3], jobname, groupid, error
2246.P
2247Read status:
2248.RS
2249.B Total I/O \fR(KiB)\fP, bandwidth \fR(KiB/s)\fP, IOPS, runtime \fR(ms)\fP
2250.P
2251Submission latency:
2252.RS
2253.B min, max, mean, standard deviation
2254.RE
2255Completion latency:
2256.RS
2257.B min, max, mean, standard deviation
2258.RE
2259Completion latency percentiles (20 fields):
2260.RS
2261.B Xth percentile=usec
2262.RE
2263Total latency:
2264.RS
2265.B min, max, mean, standard deviation
2266.RE
2267Bandwidth:
2268.RS
2269.B min, max, aggregate percentage of total, mean, standard deviation, number of samples [v5]
2270.RE
2271IOPS [v5]:
2272.RS
2273.B min, max, mean, standard deviation, number of samples
2274.RE
2275.RE
2276.P
2277Write status:
2278.RS
2279.B Total I/O \fR(KiB)\fP, bandwidth \fR(KiB/s)\fP, IOPS, runtime \fR(ms)\fP
2280.P
2281Submission latency:
2282.RS
2283.B min, max, mean, standard deviation
2284.RE
2285Completion latency:
2286.RS
2287.B min, max, mean, standard deviation
2288.RE
2289Completion latency percentiles (20 fields):
2290.RS
2291.B Xth percentile=usec
2292.RE
2293Total latency:
2294.RS
2295.B min, max, mean, standard deviation
2296.RE
2297Bandwidth:
2298.RS
2299.B min, max, aggregate percentage of total, mean, standard deviation, number of samples [v5]
2300.RE
2301IOPS [v5]:
2302.RS
2303.B min, max, mean, standard deviation, number of samples
2304.RE
2305.RE
2306.P
2307Trim status [all but version 3]:
2308.RS
2309Similar to Read/Write status but for trims.
2310.RE
2311.P
2312CPU usage:
2313.RS
2314.B user, system, context switches, major page faults, minor page faults
2315.RE
2316.P
2317IO depth distribution:
2318.RS
2319.B <=1, 2, 4, 8, 16, 32, >=64
2320.RE
2321.P
2322IO latency distribution:
2323.RS
2324Microseconds:
2325.RS
2326.B <=2, 4, 10, 20, 50, 100, 250, 500, 750, 1000
2327.RE
2328Milliseconds:
2329.RS
2330.B <=2, 4, 10, 20, 50, 100, 250, 500, 750, 1000, 2000, >=2000
2331.RE
2332.RE
2333.P
2334Disk utilization (1 for each disk used) [v3]:
2335.RS
2336.B name, read ios, write ios, read merges, write merges, read ticks, write ticks, read in-queue time, write in-queue time, disk utilization percentage
2337.RE
2338.P
2339Error Info (dependent on continue_on_error, default off):
2340.RS
2341.B total # errors, first error code
2342.RE
2343.P
2344.B text description (if provided in config - appears on newline)
2345.RE
2346.P
2347Below is a single line containing short names for each of the fields in
2348the minimal output v3, separated by semicolons:
2349.RS
2350.P
2351.nf
2352terse_version_3;fio_version;jobname;groupid;error;read_kb;read_bandwidth;read_iops;read_runtime_ms;read_slat_min;read_slat_max;read_slat_mean;read_slat_dev;read_clat_max;read_clat_min;read_clat_mean;read_clat_dev;read_clat_pct01;read_clat_pct02;read_clat_pct03;read_clat_pct04;read_clat_pct05;read_clat_pct06;read_clat_pct07;read_clat_pct08;read_clat_pct09;read_clat_pct10;read_clat_pct11;read_clat_pct12;read_clat_pct13;read_clat_pct14;read_clat_pct15;read_clat_pct16;read_clat_pct17;read_clat_pct18;read_clat_pct19;read_clat_pct20;read_tlat_min;read_lat_max;read_lat_mean;read_lat_dev;read_bw_min;read_bw_max;read_bw_agg_pct;read_bw_mean;read_bw_dev;write_kb;write_bandwidth;write_iops;write_runtime_ms;write_slat_min;write_slat_max;write_slat_mean;write_slat_dev;write_clat_max;write_clat_min;write_clat_mean;write_clat_dev;write_clat_pct01;write_clat_pct02;write_clat_pct03;write_clat_pct04;write_clat_pct05;write_clat_pct06;write_clat_pct07;write_clat_pct08;write_clat_pct09;write_clat_pct10;write_clat_pct11;write_clat_pct12;write_clat_pct13;write_clat_pct14;write_clat_pct15;write_clat_pct16;write_clat_pct17;write_clat_pct18;write_clat_pct19;write_clat_pct20;write_tlat_min;write_lat_max;write_lat_mean;write_lat_dev;write_bw_min;write_bw_max;write_bw_agg_pct;write_bw_mean;write_bw_dev;cpu_user;cpu_sys;cpu_csw;cpu_mjf;pu_minf;iodepth_1;iodepth_2;iodepth_4;iodepth_8;iodepth_16;iodepth_32;iodepth_64;lat_2us;lat_4us;lat_10us;lat_20us;lat_50us;lat_100us;lat_250us;lat_500us;lat_750us;lat_1000us;lat_2ms;lat_4ms;lat_10ms;lat_20ms;lat_50ms;lat_100ms;lat_250ms;lat_500ms;lat_750ms;lat_1000ms;lat_2000ms;lat_over_2000ms;disk_name;disk_read_iops;disk_write_iops;disk_read_merges;disk_write_merges;disk_read_ticks;write_ticks;disk_queue_time;disk_util
2353.fi
2354.RE
2355.SH TRACE FILE FORMAT
2356There are two trace file format that you can encounter. The older (v1) format
2357is unsupported since version 1.20-rc3 (March 2008). It will still be described
2358below in case that you get an old trace and want to understand it.
2359
2360In any case the trace is a simple text file with a single action per line.
2361
2362.P
2363.B Trace file format v1
2364.RS
2365Each line represents a single io action in the following format:
2366
2367rw, offset, length
2368
2369where rw=0/1 for read/write, and the offset and length entries being in bytes.
2370
2371This format is not supported in Fio versions => 1.20-rc3.
2372
2373.RE
2374.P
2375.B Trace file format v2
2376.RS
2377The second version of the trace file format was added in Fio version 1.17.
2378It allows one to access more then one file per trace and has a bigger set of
2379possible file actions.
2380
2381The first line of the trace file has to be:
2382
2383\fBfio version 2 iolog\fR
2384
2385Following this can be lines in two different formats, which are described below.
2386The file management format:
2387
2388\fBfilename action\fR
2389
2390The filename is given as an absolute path. The action can be one of these:
2391
2392.P
2393.PD 0
2394.RS
2395.TP
2396.B add
2397Add the given filename to the trace
2398.TP
2399.B open
2400Open the file with the given filename. The filename has to have been previously
2401added with the \fBadd\fR action.
2402.TP
2403.B close
2404Close the file with the given filename. The file must have previously been
2405opened.
2406.RE
2407.PD
2408.P
2409
2410The file io action format:
2411
2412\fBfilename action offset length\fR
2413
2414The filename is given as an absolute path, and has to have been added and opened
2415before it can be used with this format. The offset and length are given in
2416bytes. The action can be one of these:
2417
2418.P
2419.PD 0
2420.RS
2421.TP
2422.B wait
2423Wait for 'offset' microseconds. Everything below 100 is discarded. The time is
2424relative to the previous wait statement.
2425.TP
2426.B read
2427Read \fBlength\fR bytes beginning from \fBoffset\fR
2428.TP
2429.B write
2430Write \fBlength\fR bytes beginning from \fBoffset\fR
2431.TP
2432.B sync
2433fsync() the file
2434.TP
2435.B datasync
2436fdatasync() the file
2437.TP
2438.B trim
2439trim the given file from the given \fBoffset\fR for \fBlength\fR bytes
2440.RE
2441.PD
2442.P
2443
2444.SH CPU IDLENESS PROFILING
2445In some cases, we want to understand CPU overhead in a test. For example,
2446we test patches for the specific goodness of whether they reduce CPU usage.
2447fio implements a balloon approach to create a thread per CPU that runs at
2448idle priority, meaning that it only runs when nobody else needs the cpu.
2449By measuring the amount of work completed by the thread, idleness of each
2450CPU can be derived accordingly.
2451
2452An unit work is defined as touching a full page of unsigned characters. Mean
2453and standard deviation of time to complete an unit work is reported in "unit
2454work" section. Options can be chosen to report detailed percpu idleness or
2455overall system idleness by aggregating percpu stats.
2456
2457.SH VERIFICATION AND TRIGGERS
2458Fio is usually run in one of two ways, when data verification is done. The
2459first is a normal write job of some sort with verify enabled. When the
2460write phase has completed, fio switches to reads and verifies everything
2461it wrote. The second model is running just the write phase, and then later
2462on running the same job (but with reads instead of writes) to repeat the
2463same IO patterns and verify the contents. Both of these methods depend
2464on the write phase being completed, as fio otherwise has no idea how much
2465data was written.
2466
2467With verification triggers, fio supports dumping the current write state
2468to local files. Then a subsequent read verify workload can load this state
2469and know exactly where to stop. This is useful for testing cases where
2470power is cut to a server in a managed fashion, for instance.
2471
2472A verification trigger consists of two things:
2473
2474.RS
2475Storing the write state of each job
2476.LP
2477Executing a trigger command
2478.RE
2479
2480The write state is relatively small, on the order of hundreds of bytes
2481to single kilobytes. It contains information on the number of completions
2482done, the last X completions, etc.
2483
2484A trigger is invoked either through creation (\fBtouch\fR) of a specified
2485file in the system, or through a timeout setting. If fio is run with
2486\fB\-\-trigger\-file=/tmp/trigger-file\fR, then it will continually check for
2487the existence of /tmp/trigger-file. When it sees this file, it will
2488fire off the trigger (thus saving state, and executing the trigger
2489command).
2490
2491For client/server runs, there's both a local and remote trigger. If
2492fio is running as a server backend, it will send the job states back
2493to the client for safe storage, then execute the remote trigger, if
2494specified. If a local trigger is specified, the server will still send
2495back the write state, but the client will then execute the trigger.
2496
2497.RE
2498.P
2499.B Verification trigger example
2500.RS
2501
2502Lets say we want to run a powercut test on the remote machine 'server'.
2503Our write workload is in write-test.fio. We want to cut power to 'server'
2504at some point during the run, and we'll run this test from the safety
2505or our local machine, 'localbox'. On the server, we'll start the fio
2506backend normally:
2507
2508server# \fBfio \-\-server\fR
2509
2510and on the client, we'll fire off the workload:
2511
2512localbox$ \fBfio \-\-client=server \-\-trigger\-file=/tmp/my\-trigger \-\-trigger-remote="bash \-c "echo b > /proc/sysrq-triger""\fR
2513
2514We set \fB/tmp/my-trigger\fR as the trigger file, and we tell fio to execute
2515
2516\fBecho b > /proc/sysrq-trigger\fR
2517
2518on the server once it has received the trigger and sent us the write
2519state. This will work, but it's not \fIreally\fR cutting power to the server,
2520it's merely abruptly rebooting it. If we have a remote way of cutting
2521power to the server through IPMI or similar, we could do that through
2522a local trigger command instead. Lets assume we have a script that does
2523IPMI reboot of a given hostname, ipmi-reboot. On localbox, we could
2524then have run fio with a local trigger instead:
2525
2526localbox$ \fBfio \-\-client=server \-\-trigger\-file=/tmp/my\-trigger \-\-trigger="ipmi-reboot server"\fR
2527
2528For this case, fio would wait for the server to send us the write state,
2529then execute 'ipmi-reboot server' when that happened.
2530
2531.RE
2532.P
2533.B Loading verify state
2534.RS
2535To load store write state, read verification job file must contain
2536the verify_state_load option. If that is set, fio will load the previously
2537stored state. For a local fio run this is done by loading the files directly,
2538and on a client/server run, the server backend will ask the client to send
2539the files over and load them from there.
2540
2541.RE
2542
2543.SH LOG FILE FORMATS
2544
2545Fio supports a variety of log file formats, for logging latencies, bandwidth,
2546and IOPS. The logs share a common format, which looks like this:
2547
2548.B time (msec), value, data direction, offset
2549
2550Time for the log entry is always in milliseconds. The value logged depends
2551on the type of log, it will be one of the following:
2552
2553.P
2554.PD 0
2555.TP
2556.B Latency log
2557Value is in latency in usecs
2558.TP
2559.B Bandwidth log
2560Value is in KiB/sec
2561.TP
2562.B IOPS log
2563Value is in IOPS
2564.PD
2565.P
2566
2567Data direction is one of the following:
2568
2569.P
2570.PD 0
2571.TP
2572.B 0
2573IO is a READ
2574.TP
2575.B 1
2576IO is a WRITE
2577.TP
2578.B 2
2579IO is a TRIM
2580.PD
2581.P
2582
2583The \fIoffset\fR is the offset, in bytes, from the start of the file, for that
2584particular IO. The logging of the offset can be toggled with \fBlog_offset\fR.
2585
2586If windowed logging is enabled through \fBlog_avg_msec\fR, then fio doesn't log
2587individual IOs. Instead of logs the average values over the specified
2588period of time. Since \fIdata direction\fR and \fIoffset\fR are per-IO values,
2589they aren't applicable if windowed logging is enabled. If windowed logging
2590is enabled and \fBlog_max_value\fR is set, then fio logs maximum values in
2591that window instead of averages.
2592
2593For histogram logging the logs look like this:
2594
2595.B time (msec), data direction, block-size, bin 0, bin 1, ..., bin 1215
2596
2597Where 'bin i' gives the frequency of IO requests with a latency falling in
2598the i-th bin. See \fBlog_hist_coarseness\fR for logging fewer bins.
2599
2600.RE
2601
2602.SH CLIENT / SERVER
2603Normally you would run fio as a stand-alone application on the machine
2604where the IO workload should be generated. However, it is also possible to
2605run the frontend and backend of fio separately. This makes it possible to
2606have a fio server running on the machine(s) where the IO workload should
2607be running, while controlling it from another machine.
2608
2609To start the server, you would do:
2610
2611\fBfio \-\-server=args\fR
2612
2613on that machine, where args defines what fio listens to. The arguments
2614are of the form 'type:hostname or IP:port'. 'type' is either 'ip' (or ip4)
2615for TCP/IP v4, 'ip6' for TCP/IP v6, or 'sock' for a local unix domain
2616socket. 'hostname' is either a hostname or IP address, and 'port' is the port to
2617listen to (only valid for TCP/IP, not a local socket). Some examples:
2618
26191) \fBfio \-\-server\fR
2620
2621 Start a fio server, listening on all interfaces on the default port (8765).
2622
26232) \fBfio \-\-server=ip:hostname,4444\fR
2624
2625 Start a fio server, listening on IP belonging to hostname and on port 4444.
2626
26273) \fBfio \-\-server=ip6:::1,4444\fR
2628
2629 Start a fio server, listening on IPv6 localhost ::1 and on port 4444.
2630
26314) \fBfio \-\-server=,4444\fR
2632
2633 Start a fio server, listening on all interfaces on port 4444.
2634
26355) \fBfio \-\-server=1.2.3.4\fR
2636
2637 Start a fio server, listening on IP 1.2.3.4 on the default port.
2638
26396) \fBfio \-\-server=sock:/tmp/fio.sock\fR
2640
2641 Start a fio server, listening on the local socket /tmp/fio.sock.
2642
2643When a server is running, you can connect to it from a client. The client
2644is run with:
2645
2646\fBfio \-\-local-args \-\-client=server \-\-remote-args <job file(s)>\fR
2647
2648where \-\-local-args are arguments that are local to the client where it is
2649running, 'server' is the connect string, and \-\-remote-args and <job file(s)>
2650are sent to the server. The 'server' string follows the same format as it
2651does on the server side, to allow IP/hostname/socket and port strings.
2652You can connect to multiple clients as well, to do that you could run:
2653
2654\fBfio \-\-client=server2 \-\-client=server2 <job file(s)>\fR
2655
2656If the job file is located on the fio server, then you can tell the server
2657to load a local file as well. This is done by using \-\-remote-config:
2658
2659\fBfio \-\-client=server \-\-remote-config /path/to/file.fio\fR
2660
2661Then fio will open this local (to the server) job file instead
2662of being passed one from the client.
2663
2664If you have many servers (example: 100 VMs/containers), you can input a pathname
2665of a file containing host IPs/names as the parameter value for the \-\-client option.
2666For example, here is an example "host.list" file containing 2 hostnames:
2667
2668host1.your.dns.domain
2669.br
2670host2.your.dns.domain
2671
2672The fio command would then be:
2673
2674\fBfio \-\-client=host.list <job file>\fR
2675
2676In this mode, you cannot input server-specific parameters or job files, and all
2677servers receive the same job file.
2678
2679In order to enable fio \-\-client runs utilizing a shared filesystem from multiple hosts,
2680fio \-\-client now prepends the IP address of the server to the filename. For example,
2681if fio is using directory /mnt/nfs/fio and is writing filename fileio.tmp,
2682with a \-\-client hostfile
2683containing two hostnames h1 and h2 with IP addresses 192.168.10.120 and 192.168.10.121, then
2684fio will create two files:
2685
2686/mnt/nfs/fio/192.168.10.120.fileio.tmp
2687.br
2688/mnt/nfs/fio/192.168.10.121.fileio.tmp
2689
2690.SH AUTHORS
2691
2692.B fio
2693was written by Jens Axboe <jens.axboe@oracle.com>,
2694now Jens Axboe <axboe@fb.com>.
2695.br
2696This man page was written by Aaron Carroll <aaronc@cse.unsw.edu.au> based
2697on documentation by Jens Axboe.
2698.SH "REPORTING BUGS"
2699Report bugs to the \fBfio\fR mailing list <fio@vger.kernel.org>.
2700See \fBREADME\fR.
2701.SH "SEE ALSO"
2702For further documentation see \fBHOWTO\fR and \fBREADME\fR.
2703.br
2704Sample jobfiles are available in the \fBexamples\fR directory.
2705.br
2706These are typically located under /usr/share/doc/fio.
2707
2708\fBHOWTO\fR: http://git.kernel.dk/cgit/fio/plain/HOWTO
2709.br
2710\fBREADME\fR: http://git.kernel.dk/cgit/fio/plain/README
2711.br