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