Merge branch 'wip-rados-dont-zerowrite' of https://github.com/aclamk/fio
[fio.git] / fio.1
1 .TH fio 1 "August 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 \fItype\fR of various fio actions. May be `all' for all \fItype\fRs
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 \-\-merge\-blktrace\-only
24 Merge blktraces only, don't start any I/O.
25 .TP
26 .BI \-\-output \fR=\fPfilename
27 Write output to \fIfilename\fR.
28 .TP
29 .BI \-\-output\-format \fR=\fPformat
30 Set the reporting \fIformat\fR to `normal', `terse', `json', or
31 `json+'. Multiple formats can be selected, separate by a comma. `terse'
32 is a CSV based format. `json+' is like `json', except it adds a full
33 dump of the latency buckets.
34 .TP
35 .BI \-\-bandwidth\-log
36 Generate aggregate bandwidth logs.
37 .TP
38 .BI \-\-minimal
39 Print statistics in a terse, semicolon\-delimited format.
40 .TP
41 .BI \-\-append\-terse
42 Print statistics in selected mode AND terse, semicolon\-delimited format.
43 \fBDeprecated\fR, use \fB\-\-output\-format\fR instead to select multiple formats.
44 .TP
45 .BI \-\-terse\-version \fR=\fPversion
46 Set terse \fIversion\fR output format (default `3', or `2', `4', `5').
47 .TP
48 .BI \-\-version
49 Print version information and exit.
50 .TP
51 .BI \-\-help
52 Print a summary of the command line options and exit.
53 .TP
54 .BI \-\-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=\fP[ioengine[,command]]
66 List all commands defined by \fIioengine\fR, or print help for \fIcommand\fR
67 defined by \fIioengine\fR. If no \fIioengine\fR is given, list all
68 available ioengines.
69 .TP
70 .BI \-\-showcmd \fR=\fPjobfile
71 Convert \fIjobfile\fR to a set of command\-line options.
72 .TP
73 .BI \-\-readonly
74 Turn on safety read\-only checks, preventing writes and trims. The \fB\-\-readonly\fR
75 option is an extra safety guard to prevent users from accidentally starting
76 a write or trim workload when that is not desired. Fio will only modify the
77 device under test if `rw=write/randwrite/rw/randrw/trim/randtrim/trimwrite'
78 is given. This safety net can be used as an extra precaution.
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'. `auto' is the default, it prints ETA when
83 requested if the output is a TTY. `always' disregards the output type, and
84 prints ETA when requested. `never' never prints ETA.
85 .TP
86 .BI \-\-eta\-interval \fR=\fPtime
87 By default, fio requests client ETA status roughly every second. With this
88 option, the interval is configurable. Fio imposes a minimum allowed time to
89 avoid flooding the console, less than 250 msec is not supported.
90 .TP
91 .BI \-\-eta\-newline \fR=\fPtime
92 Force a new line for every \fItime\fR period passed. When the unit is omitted,
93 the value is interpreted in seconds.
94 .TP
95 .BI \-\-status\-interval \fR=\fPtime
96 Force a full status dump of cumulative (from job start) values at \fItime\fR
97 intervals. This option does *not* provide per-period measurements. So
98 values such as bandwidth are running averages. When the time unit is omitted,
99 \fItime\fR is interpreted in seconds. Note that using this option with
100 `\-\-output-format=json' will yield output that technically isn't valid json,
101 since the output will be collated sets of valid json. It will need to be split
102 into valid sets of json after the run.
103 .TP
104 .BI \-\-section \fR=\fPname
105 Only run specified section \fIname\fR in job file. Multiple sections can be specified.
106 The \fB\-\-section\fR option allows one to combine related jobs into one file.
107 E.g. one job file could define light, moderate, and heavy sections. Tell
108 fio to run only the "heavy" section by giving `\-\-section=heavy'
109 command line option. One can also specify the "write" operations in one
110 section and "verify" operation in another section. The \fB\-\-section\fR option
111 only applies to job sections. The reserved *global* section is always
112 parsed and used.
113 .TP
114 .BI \-\-alloc\-size \fR=\fPkb
115 Allocate additional internal smalloc pools of size \fIkb\fR in KiB. The
116 \fB\-\-alloc\-size\fR option increases shared memory set aside for use by fio.
117 If running large jobs with randommap enabled, fio can run out of memory.
118 Smalloc is an internal allocator for shared structures from a fixed size
119 memory pool and can grow to 16 pools. The pool size defaults to 16MiB.
120 NOTE: While running `.fio_smalloc.*' backing store files are visible
121 in `/tmp'.
122 .TP
123 .BI \-\-warnings\-fatal
124 All fio parser warnings are fatal, causing fio to exit with an error.
125 .TP
126 .BI \-\-max\-jobs \fR=\fPnr
127 Set the maximum number of threads/processes to support to \fInr\fR.
128 NOTE: On Linux, it may be necessary to increase the shared-memory limit
129 (`/proc/sys/kernel/shmmax') if fio runs into errors while creating jobs.
130 .TP
131 .BI \-\-server \fR=\fPargs
132 Start a backend server, with \fIargs\fR specifying what to listen to.
133 See \fBCLIENT/SERVER\fR section.
134 .TP
135 .BI \-\-daemonize \fR=\fPpidfile
136 Background a fio server, writing the pid to the given \fIpidfile\fR file.
137 .TP
138 .BI \-\-client \fR=\fPhostname
139 Instead of running the jobs locally, send and run them on the given \fIhostname\fR
140 or set of \fIhostname\fRs. See \fBCLIENT/SERVER\fR section.
141 .TP
142 .BI \-\-remote\-config \fR=\fPfile
143 Tell fio server to load this local \fIfile\fR.
144 .TP
145 .BI \-\-idle\-prof \fR=\fPoption
146 Report CPU idleness. \fIoption\fR is one of the following:
147 .RS
148 .RS
149 .TP
150 .B calibrate
151 Run unit work calibration only and exit.
152 .TP
153 .B system
154 Show aggregate system idleness and unit work.
155 .TP
156 .B percpu
157 As \fBsystem\fR but also show per CPU idleness.
158 .RE
159 .RE
160 .TP
161 .BI \-\-inflate\-log \fR=\fPlog
162 Inflate and output compressed \fIlog\fR.
163 .TP
164 .BI \-\-trigger\-file \fR=\fPfile
165 Execute trigger command when \fIfile\fR exists.
166 .TP
167 .BI \-\-trigger\-timeout \fR=\fPtime
168 Execute trigger at this \fItime\fR.
169 .TP
170 .BI \-\-trigger \fR=\fPcommand
171 Set this \fIcommand\fR as local trigger.
172 .TP
173 .BI \-\-trigger\-remote \fR=\fPcommand
174 Set this \fIcommand\fR as remote trigger.
175 .TP
176 .BI \-\-aux\-path \fR=\fPpath
177 Use the directory specified by \fIpath\fP for generated state files instead
178 of the current working directory.
179 .SH "JOB FILE FORMAT"
180 Any parameters following the options will be assumed to be job files, unless
181 they match a job file parameter. Multiple job files can be listed and each job
182 file will be regarded as a separate group. Fio will \fBstonewall\fR execution
183 between each group.
184
185 Fio accepts one or more job files describing what it is
186 supposed to do. The job file format is the classic ini file, where the names
187 enclosed in [] brackets define the job name. You are free to use any ASCII name
188 you want, except *global* which has special meaning. Following the job name is
189 a sequence of zero or more parameters, one per line, that define the behavior of
190 the job. If the first character in a line is a ';' or a '#', the entire line is
191 discarded as a comment.
192
193 A *global* section sets defaults for the jobs described in that file. A job may
194 override a *global* section parameter, and a job file may even have several
195 *global* sections if so desired. A job is only affected by a *global* section
196 residing above it.
197
198 The \fB\-\-cmdhelp\fR option also lists all options. If used with an \fIcommand\fR
199 argument, \fB\-\-cmdhelp\fR will detail the given \fIcommand\fR.
200
201 See the `examples/' directory for inspiration on how to write job files. Note
202 the copyright and license requirements currently apply to
203 `examples/' files.
204
205 Note that the maximum length of a line in the job file is 8192 bytes.
206 .SH "JOB FILE PARAMETERS"
207 Some parameters take an option of a given type, such as an integer or a
208 string. Anywhere a numeric value is required, an arithmetic expression may be
209 used, provided it is surrounded by parentheses. Supported operators are:
210 .RS
211 .P
212 .B addition (+)
213 .P
214 .B subtraction (\-)
215 .P
216 .B multiplication (*)
217 .P
218 .B division (/)
219 .P
220 .B modulus (%)
221 .P
222 .B exponentiation (^)
223 .RE
224 .P
225 For time values in expressions, units are microseconds by default. This is
226 different than for time values not in expressions (not enclosed in
227 parentheses).
228 .SH "PARAMETER TYPES"
229 The following parameter types are used.
230 .TP
231 .I str
232 String. A sequence of alphanumeric characters.
233 .TP
234 .I time
235 Integer with possible time suffix. Without a unit value is interpreted as
236 seconds unless otherwise specified. Accepts a suffix of 'd' for days, 'h' for
237 hours, 'm' for minutes, 's' for seconds, 'ms' (or 'msec') for milliseconds and 'us'
238 (or 'usec') for microseconds. For example, use 10m for 10 minutes.
239 .TP
240 .I int
241 Integer. A whole number value, which may contain an integer prefix
242 and an integer suffix.
243 .RS
244 .RS
245 .P
246 [*integer prefix*] **number** [*integer suffix*]
247 .RE
248 .P
249 The optional *integer prefix* specifies the number's base. The default
250 is decimal. *0x* specifies hexadecimal.
251 .P
252 The optional *integer suffix* specifies the number's units, and includes an
253 optional unit prefix and an optional unit. For quantities of data, the
254 default unit is bytes. For quantities of time, the default unit is seconds
255 unless otherwise specified.
256 .P
257 With `kb_base=1000', fio follows international standards for unit
258 prefixes. To specify power-of-10 decimal values defined in the
259 International System of Units (SI):
260 .RS
261 .P
262 .PD 0
263 K means kilo (K) or 1000
264 .P
265 M means mega (M) or 1000**2
266 .P
267 G means giga (G) or 1000**3
268 .P
269 T means tera (T) or 1000**4
270 .P
271 P means peta (P) or 1000**5
272 .PD
273 .RE
274 .P
275 To specify power-of-2 binary values defined in IEC 80000-13:
276 .RS
277 .P
278 .PD 0
279 Ki means kibi (Ki) or 1024
280 .P
281 Mi means mebi (Mi) or 1024**2
282 .P
283 Gi means gibi (Gi) or 1024**3
284 .P
285 Ti means tebi (Ti) or 1024**4
286 .P
287 Pi means pebi (Pi) or 1024**5
288 .PD
289 .RE
290 .P
291 With `kb_base=1024' (the default), the unit prefixes are opposite
292 from those specified in the SI and IEC 80000-13 standards to provide
293 compatibility with old scripts. For example, 4k means 4096.
294 .P
295 For quantities of data, an optional unit of 'B' may be included
296 (e.g., 'kB' is the same as 'k').
297 .P
298 The *integer suffix* is not case sensitive (e.g., m/mi mean mebi/mega,
299 not milli). 'b' and 'B' both mean byte, not bit.
300 .P
301 Examples with `kb_base=1000':
302 .RS
303 .P
304 .PD 0
305 4 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB
306 .P
307 1 MiB: 1048576, 1m, 1024k
308 .P
309 1 MB: 1000000, 1mi, 1000ki
310 .P
311 1 TiB: 1073741824, 1t, 1024m, 1048576k
312 .P
313 1 TB: 1000000000, 1ti, 1000mi, 1000000ki
314 .PD
315 .RE
316 .P
317 Examples with `kb_base=1024' (default):
318 .RS
319 .P
320 .PD 0
321 4 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB
322 .P
323 1 MiB: 1048576, 1m, 1024k
324 .P
325 1 MB: 1000000, 1mi, 1000ki
326 .P
327 1 TiB: 1073741824, 1t, 1024m, 1048576k
328 .P
329 1 TB: 1000000000, 1ti, 1000mi, 1000000ki
330 .PD
331 .RE
332 .P
333 To specify times (units are not case sensitive):
334 .RS
335 .P
336 .PD 0
337 D means days
338 .P
339 H means hours
340 .P
341 M mean minutes
342 .P
343 s or sec means seconds (default)
344 .P
345 ms or msec means milliseconds
346 .P
347 us or usec means microseconds
348 .PD
349 .RE
350 .P
351 `z' suffix specifies that the value is measured in zones.
352 Value is recalculated once block device's zone size becomes known.
353 .P
354 If the option accepts an upper and lower range, use a colon ':' or
355 minus '\-' to separate such values. See \fIirange\fR parameter type.
356 If the lower value specified happens to be larger than the upper value
357 the two values are swapped.
358 .RE
359 .TP
360 .I bool
361 Boolean. Usually parsed as an integer, however only defined for
362 true and false (1 and 0).
363 .TP
364 .I irange
365 Integer range with suffix. Allows value range to be given, such as
366 1024\-4096. A colon may also be used as the separator, e.g. 1k:4k. If the
367 option allows two sets of ranges, they can be specified with a ',' or '/'
368 delimiter: 1k\-4k/8k\-32k. Also see \fIint\fR parameter type.
369 .TP
370 .I float_list
371 A list of floating point numbers, separated by a ':' character.
372 .SH "JOB PARAMETERS"
373 With the above in mind, here follows the complete list of fio job parameters.
374 .SS "Units"
375 .TP
376 .BI kb_base \fR=\fPint
377 Select the interpretation of unit prefixes in input parameters.
378 .RS
379 .RS
380 .TP
381 .B 1000
382 Inputs comply with IEC 80000-13 and the International
383 System of Units (SI). Use:
384 .RS
385 .P
386 .PD 0
387 \- power-of-2 values with IEC prefixes (e.g., KiB)
388 .P
389 \- power-of-10 values with SI prefixes (e.g., kB)
390 .PD
391 .RE
392 .TP
393 .B 1024
394 Compatibility mode (default). To avoid breaking old scripts:
395 .P
396 .RS
397 .PD 0
398 \- power-of-2 values with SI prefixes
399 .P
400 \- power-of-10 values with IEC prefixes
401 .PD
402 .RE
403 .RE
404 .P
405 See \fBbs\fR for more details on input parameters.
406 .P
407 Outputs always use correct prefixes. Most outputs include both
408 side-by-side, like:
409 .P
410 .RS
411 bw=2383.3kB/s (2327.4KiB/s)
412 .RE
413 .P
414 If only one value is reported, then kb_base selects the one to use:
415 .P
416 .RS
417 .PD 0
418 1000 \-\- SI prefixes
419 .P
420 1024 \-\- IEC prefixes
421 .PD
422 .RE
423 .RE
424 .TP
425 .BI unit_base \fR=\fPint
426 Base unit for reporting. Allowed values are:
427 .RS
428 .RS
429 .TP
430 .B 0
431 Use auto-detection (default).
432 .TP
433 .B 8
434 Byte based.
435 .TP
436 .B 1
437 Bit based.
438 .RE
439 .RE
440 .SS "Job description"
441 .TP
442 .BI name \fR=\fPstr
443 ASCII name of the job. This may be used to override the name printed by fio
444 for this job. Otherwise the job name is used. On the command line this
445 parameter has the special purpose of also signaling the start of a new job.
446 .TP
447 .BI description \fR=\fPstr
448 Text description of the job. Doesn't do anything except dump this text
449 description when this job is run. It's not parsed.
450 .TP
451 .BI loops \fR=\fPint
452 Run the specified number of iterations of this job. Used to repeat the same
453 workload a given number of times. Defaults to 1.
454 .TP
455 .BI numjobs \fR=\fPint
456 Create the specified number of clones of this job. Each clone of job
457 is spawned as an independent thread or process. May be used to setup a
458 larger number of threads/processes doing the same thing. Each thread is
459 reported separately; to see statistics for all clones as a whole, use
460 \fBgroup_reporting\fR in conjunction with \fBnew_group\fR.
461 See \fB\-\-max\-jobs\fR. Default: 1.
462 .SS "Time related parameters"
463 .TP
464 .BI runtime \fR=\fPtime
465 Tell fio to terminate processing after the specified period of time. It
466 can be quite hard to determine for how long a specified job will run, so
467 this parameter is handy to cap the total runtime to a given time. When
468 the unit is omitted, the value is interpreted in seconds.
469 .TP
470 .BI time_based
471 If set, fio will run for the duration of the \fBruntime\fR specified
472 even if the file(s) are completely read or written. It will simply loop over
473 the same workload as many times as the \fBruntime\fR allows.
474 .TP
475 .BI startdelay \fR=\fPirange(int)
476 Delay the start of job for the specified amount of time. Can be a single
477 value or a range. When given as a range, each thread will choose a value
478 randomly from within the range. Value is in seconds if a unit is omitted.
479 .TP
480 .BI ramp_time \fR=\fPtime
481 If set, fio will run the specified workload for this amount of time before
482 logging any performance numbers. Useful for letting performance settle
483 before logging results, thus minimizing the runtime required for stable
484 results. Note that the \fBramp_time\fR is considered lead in time for a job,
485 thus it will increase the total runtime if a special timeout or
486 \fBruntime\fR is specified. When the unit is omitted, the value is
487 given in seconds.
488 .TP
489 .BI clocksource \fR=\fPstr
490 Use the given clocksource as the base of timing. The supported options are:
491 .RS
492 .RS
493 .TP
494 .B gettimeofday
495 \fBgettimeofday\fR\|(2)
496 .TP
497 .B clock_gettime
498 \fBclock_gettime\fR\|(2)
499 .TP
500 .B cpu
501 Internal CPU clock source
502 .RE
503 .P
504 \fBcpu\fR is the preferred clocksource if it is reliable, as it is very fast (and
505 fio is heavy on time calls). Fio will automatically use this clocksource if
506 it's supported and considered reliable on the system it is running on,
507 unless another clocksource is specifically set. For x86/x86\-64 CPUs, this
508 means supporting TSC Invariant.
509 .RE
510 .TP
511 .BI gtod_reduce \fR=\fPbool
512 Enable all of the \fBgettimeofday\fR\|(2) reducing options
513 (\fBdisable_clat\fR, \fBdisable_slat\fR, \fBdisable_bw_measurement\fR) plus
514 reduce precision of the timeout somewhat to really shrink the
515 \fBgettimeofday\fR\|(2) call count. With this option enabled, we only do
516 about 0.4% of the \fBgettimeofday\fR\|(2) calls we would have done if all
517 time keeping was enabled.
518 .TP
519 .BI gtod_cpu \fR=\fPint
520 Sometimes it's cheaper to dedicate a single thread of execution to just
521 getting the current time. Fio (and databases, for instance) are very
522 intensive on \fBgettimeofday\fR\|(2) calls. With this option, you can set
523 one CPU aside for doing nothing but logging current time to a shared memory
524 location. Then the other threads/processes that run I/O workloads need only
525 copy that segment, instead of entering the kernel with a
526 \fBgettimeofday\fR\|(2) call. The CPU set aside for doing these time
527 calls will be excluded from other uses. Fio will manually clear it from the
528 CPU mask of other jobs.
529 .SS "Target file/device"
530 .TP
531 .BI directory \fR=\fPstr
532 Prefix \fBfilename\fRs with this directory. Used to place files in a different
533 location than `./'. You can specify a number of directories by
534 separating the names with a ':' character. These directories will be
535 assigned equally distributed to job clones created by \fBnumjobs\fR as
536 long as they are using generated filenames. If specific \fBfilename\fR(s) are
537 set fio will use the first listed directory, and thereby matching the
538 \fBfilename\fR semantic (which generates a file for each clone if not
539 specified, but lets all clones use the same file if set).
540 .RS
541 .P
542 See the \fBfilename\fR option for information on how to escape ':'
543 characters within the directory path itself.
544 .P
545 Note: To control the directory fio will use for internal state files
546 use \fB\-\-aux\-path\fR.
547 .RE
548 .TP
549 .BI filename \fR=\fPstr
550 Fio normally makes up a \fBfilename\fR based on the job name, thread number, and
551 file number (see \fBfilename_format\fR). If you want to share files
552 between threads in a job or several
553 jobs with fixed file paths, specify a \fBfilename\fR for each of them to override
554 the default. If the ioengine is file based, you can specify a number of files
555 by separating the names with a ':' colon. So if you wanted a job to open
556 `/dev/sda' and `/dev/sdb' as the two working files, you would use
557 `filename=/dev/sda:/dev/sdb'. This also means that whenever this option is
558 specified, \fBnrfiles\fR is ignored. The size of regular files specified
559 by this option will be \fBsize\fR divided by number of files unless an
560 explicit size is specified by \fBfilesize\fR.
561 .RS
562 .P
563 Each colon in the wanted path must be escaped with a '\\'
564 character. For instance, if the path is `/dev/dsk/foo@3,0:c' then you
565 would use `filename=/dev/dsk/foo@3,0\\:c' and if the path is
566 `F:\\filename' then you would use `filename=F\\:\\filename'.
567 .P
568 On Windows, disk devices are accessed as `\\\\.\\PhysicalDrive0' for
569 the first device, `\\\\.\\PhysicalDrive1' for the second etc.
570 Note: Windows and FreeBSD prevent write access to areas
571 of the disk containing in-use data (e.g. filesystems).
572 .P
573 The filename `\-' is a reserved name, meaning *stdin* or *stdout*. Which
574 of the two depends on the read/write direction set.
575 .RE
576 .TP
577 .BI filename_format \fR=\fPstr
578 If sharing multiple files between jobs, it is usually necessary to have fio
579 generate the exact names that you want. By default, fio will name a file
580 based on the default file format specification of
581 `jobname.jobnumber.filenumber'. With this option, that can be
582 customized. Fio will recognize and replace the following keywords in this
583 string:
584 .RS
585 .RS
586 .TP
587 .B $jobname
588 The name of the worker thread or process.
589 .TP
590 .B $clientuid
591 IP of the fio process when using client/server mode.
592 .TP
593 .B $jobnum
594 The incremental number of the worker thread or process.
595 .TP
596 .B $filenum
597 The incremental number of the file for that worker thread or process.
598 .RE
599 .P
600 To have dependent jobs share a set of files, this option can be set to have
601 fio generate filenames that are shared between the two. For instance, if
602 `testfiles.$filenum' is specified, file number 4 for any job will be
603 named `testfiles.4'. The default of `$jobname.$jobnum.$filenum'
604 will be used if no other format specifier is given.
605 .P
606 If you specify a path then the directories will be created up to the main
607 directory for the file.  So for example if you specify `a/b/c/$jobnum` then the
608 directories a/b/c will be created before the file setup part of the job.  If you
609 specify \fBdirectory\fR then the path will be relative that directory, otherwise
610 it is treated as the absolute path.
611 .RE
612 .TP
613 .BI unique_filename \fR=\fPbool
614 To avoid collisions between networked clients, fio defaults to prefixing any
615 generated filenames (with a directory specified) with the source of the
616 client connecting. To disable this behavior, set this option to 0.
617 .TP
618 .BI opendir \fR=\fPstr
619 Recursively open any files below directory \fIstr\fR.
620 .TP
621 .BI lockfile \fR=\fPstr
622 Fio defaults to not locking any files before it does I/O to them. If a file
623 or file descriptor is shared, fio can serialize I/O to that file to make the
624 end result consistent. This is usual for emulating real workloads that share
625 files. The lock modes are:
626 .RS
627 .RS
628 .TP
629 .B none
630 No locking. The default.
631 .TP
632 .B exclusive
633 Only one thread or process may do I/O at a time, excluding all others.
634 .TP
635 .B readwrite
636 Read\-write locking on the file. Many readers may
637 access the file at the same time, but writes get exclusive access.
638 .RE
639 .RE
640 .TP
641 .BI nrfiles \fR=\fPint
642 Number of files to use for this job. Defaults to 1. The size of files
643 will be \fBsize\fR divided by this unless explicit size is specified by
644 \fBfilesize\fR. Files are created for each thread separately, and each
645 file will have a file number within its name by default, as explained in
646 \fBfilename\fR section.
647 .TP
648 .BI openfiles \fR=\fPint
649 Number of files to keep open at the same time. Defaults to the same as
650 \fBnrfiles\fR, can be set smaller to limit the number simultaneous
651 opens.
652 .TP
653 .BI file_service_type \fR=\fPstr
654 Defines how fio decides which file from a job to service next. The following
655 types are defined:
656 .RS
657 .RS
658 .TP
659 .B random
660 Choose a file at random.
661 .TP
662 .B roundrobin
663 Round robin over opened files. This is the default.
664 .TP
665 .B sequential
666 Finish one file before moving on to the next. Multiple files can
667 still be open depending on \fBopenfiles\fR.
668 .TP
669 .B zipf
670 Use a Zipf distribution to decide what file to access.
671 .TP
672 .B pareto
673 Use a Pareto distribution to decide what file to access.
674 .TP
675 .B normal
676 Use a Gaussian (normal) distribution to decide what file to access.
677 .TP
678 .B gauss
679 Alias for normal.
680 .RE
681 .P
682 For \fBrandom\fR, \fBroundrobin\fR, and \fBsequential\fR, a postfix can be appended to
683 tell fio how many I/Os to issue before switching to a new file. For example,
684 specifying `file_service_type=random:8' would cause fio to issue
685 8 I/Os before selecting a new file at random. For the non-uniform
686 distributions, a floating point postfix can be given to influence how the
687 distribution is skewed. See \fBrandom_distribution\fR for a description
688 of how that would work.
689 .RE
690 .TP
691 .BI ioscheduler \fR=\fPstr
692 Attempt to switch the device hosting the file to the specified I/O scheduler
693 before running.
694 .TP
695 .BI create_serialize \fR=\fPbool
696 If true, serialize the file creation for the jobs. This may be handy to
697 avoid interleaving of data files, which may greatly depend on the filesystem
698 used and even the number of processors in the system. Default: true.
699 .TP
700 .BI create_fsync \fR=\fPbool
701 \fBfsync\fR\|(2) the data file after creation. This is the default.
702 .TP
703 .BI create_on_open \fR=\fPbool
704 If true, don't pre-create files but allow the job's open() to create a file
705 when it's time to do I/O. Default: false \-\- pre-create all necessary files
706 when the job starts.
707 .TP
708 .BI create_only \fR=\fPbool
709 If true, fio will only run the setup phase of the job. If files need to be
710 laid out or updated on disk, only that will be done \-\- the actual job contents
711 are not executed. Default: false.
712 .TP
713 .BI allow_file_create \fR=\fPbool
714 If true, fio is permitted to create files as part of its workload. If this
715 option is false, then fio will error out if
716 the files it needs to use don't already exist. Default: true.
717 .TP
718 .BI allow_mounted_write \fR=\fPbool
719 If this isn't set, fio will abort jobs that are destructive (e.g. that write)
720 to what appears to be a mounted device or partition. This should help catch
721 creating inadvertently destructive tests, not realizing that the test will
722 destroy data on the mounted file system. Note that some platforms don't allow
723 writing against a mounted device regardless of this option. Default: false.
724 .TP
725 .BI pre_read \fR=\fPbool
726 If this is given, files will be pre-read into memory before starting the
727 given I/O operation. This will also clear the \fBinvalidate\fR flag,
728 since it is pointless to pre-read and then drop the cache. This will only
729 work for I/O engines that are seek-able, since they allow you to read the
730 same data multiple times. Thus it will not work on non-seekable I/O engines
731 (e.g. network, splice). Default: false.
732 .TP
733 .BI unlink \fR=\fPbool
734 Unlink the job files when done. Not the default, as repeated runs of that
735 job would then waste time recreating the file set again and again. Default:
736 false.
737 .TP
738 .BI unlink_each_loop \fR=\fPbool
739 Unlink job files after each iteration or loop. Default: false.
740 .TP
741 .BI zonemode \fR=\fPstr
742 Accepted values are:
743 .RS
744 .RS
745 .TP
746 .B none
747 The \fBzonerange\fR, \fBzonesize\fR \fBzonecapacity\fR and \fBzoneskip\fR
748 parameters are ignored.
749 .TP
750 .B strided
751 I/O happens in a single zone until \fBzonesize\fR bytes have been transferred.
752 After that number of bytes has been transferred processing of the next zone
753 starts. The \fBzonecapacity\fR parameter is ignored.
754 .TP
755 .B zbd
756 Zoned block device mode. I/O happens sequentially in each zone, even if random
757 I/O has been selected. Random I/O happens across all zones instead of being
758 restricted to a single zone.
759 .RE
760 .RE
761 .TP
762 .BI zonerange \fR=\fPint
763 For \fBzonemode\fR=strided, this is the size of a single zone. See also
764 \fBzonesize\fR and \fBzoneskip\fR.
765
766 For \fBzonemode\fR=zbd, this parameter is ignored.
767 .TP
768 .BI zonesize \fR=\fPint
769 For \fBzonemode\fR=strided, this is the number of bytes to transfer before
770 skipping \fBzoneskip\fR bytes. If this parameter is smaller than
771 \fBzonerange\fR then only a fraction of each zone with \fBzonerange\fR bytes
772 will be accessed.  If this parameter is larger than \fBzonerange\fR then each
773 zone will be accessed multiple times before skipping to the next zone.
774
775 For \fBzonemode\fR=zbd, this is the size of a single zone. The
776 \fBzonerange\fR parameter is ignored in this mode. For a job accessing a
777 zoned block device, the specified \fBzonesize\fR must be 0 or equal to the
778 device zone size. For a regular block device or file, the specified
779 \fBzonesize\fR must be at least 512B.
780 .TP
781 .BI zonecapacity \fR=\fPint
782 For \fBzonemode\fR=zbd, this defines the capacity of a single zone, which is
783 the accessible area starting from the zone start address. This parameter only
784 applies when using \fBzonemode\fR=zbd in combination with regular block devices.
785 If not specified it defaults to the zone size. If the target device is a zoned
786 block device, the zone capacity is obtained from the device information and this
787 option is ignored.
788 .TP
789 .BI zoneskip \fR=\fPint[z]
790 For \fBzonemode\fR=strided, the number of bytes to skip after \fBzonesize\fR
791 bytes of data have been transferred.
792
793 For \fBzonemode\fR=zbd, the \fBzonesize\fR aligned number of bytes to skip
794 once a zone is fully written (write workloads) or all written data in the
795 zone have been read (read workloads). This parameter is valid only for
796 sequential workloads and ignored for random workloads. For read workloads,
797 see also \fBread_beyond_wp\fR.
798
799 .TP
800 .BI read_beyond_wp \fR=\fPbool
801 This parameter applies to \fBzonemode=zbd\fR only.
802
803 Zoned block devices are block devices that consist of multiple zones. Each
804 zone has a type, e.g. conventional or sequential. A conventional zone can be
805 written at any offset that is a multiple of the block size. Sequential zones
806 must be written sequentially. The position at which a write must occur is
807 called the write pointer. A zoned block device can be either host managed or
808 host aware. For host managed devices the host must ensure that writes happen
809 sequentially. Fio recognizes host managed devices and serializes writes to
810 sequential zones for these devices.
811
812 If a read occurs in a sequential zone beyond the write pointer then the zoned
813 block device will complete the read without reading any data from the storage
814 medium. Since such reads lead to unrealistically high bandwidth and IOPS
815 numbers fio only reads beyond the write pointer if explicitly told to do
816 so. Default: false.
817 .TP
818 .BI max_open_zones \fR=\fPint
819 When running a random write test across an entire drive many more zones will be
820 open than in a typical application workload. Hence this command line option
821 that allows to limit the number of open zones. The number of open zones is
822 defined as the number of zones to which write commands are issued by all
823 threads/processes.
824 .TP
825 .BI job_max_open_zones \fR=\fPint
826 Limit on the number of simultaneously opened zones per single thread/process.
827 .TP
828 .BI zone_reset_threshold \fR=\fPfloat
829 A number between zero and one that indicates the ratio of logical blocks with
830 data to the total number of logical blocks in the test above which zones
831 should be reset periodically.
832 .TP
833 .BI zone_reset_frequency \fR=\fPfloat
834 A number between zero and one that indicates how often a zone reset should be
835 issued if the zone reset threshold has been exceeded. A zone reset is
836 submitted after each (1 / zone_reset_frequency) write requests. This and the
837 previous parameter can be used to simulate garbage collection activity.
838
839 .SS "I/O type"
840 .TP
841 .BI direct \fR=\fPbool
842 If value is true, use non-buffered I/O. This is usually O_DIRECT. Note that
843 OpenBSD and ZFS on Solaris don't support direct I/O. On Windows the synchronous
844 ioengines don't support direct I/O. Default: false.
845 .TP
846 .BI atomic \fR=\fPbool
847 If value is true, attempt to use atomic direct I/O. Atomic writes are
848 guaranteed to be stable once acknowledged by the operating system. Only
849 Linux supports O_ATOMIC right now.
850 .TP
851 .BI buffered \fR=\fPbool
852 If value is true, use buffered I/O. This is the opposite of the
853 \fBdirect\fR option. Defaults to true.
854 .TP
855 .BI readwrite \fR=\fPstr "\fR,\fP rw" \fR=\fPstr
856 Type of I/O pattern. Accepted values are:
857 .RS
858 .RS
859 .TP
860 .B read
861 Sequential reads.
862 .TP
863 .B write
864 Sequential writes.
865 .TP
866 .B trim
867 Sequential trims (Linux block devices and SCSI character devices only).
868 .TP
869 .B randread
870 Random reads.
871 .TP
872 .B randwrite
873 Random writes.
874 .TP
875 .B randtrim
876 Random trims (Linux block devices and SCSI character devices only).
877 .TP
878 .B rw,readwrite
879 Sequential mixed reads and writes.
880 .TP
881 .B randrw
882 Random mixed reads and writes.
883 .TP
884 .B trimwrite
885 Sequential trim+write sequences. Blocks will be trimmed first,
886 then the same blocks will be written to.
887 .RE
888 .P
889 Fio defaults to read if the option is not specified. For the mixed I/O
890 types, the default is to split them 50/50. For certain types of I/O the
891 result may still be skewed a bit, since the speed may be different.
892 .P
893 It is possible to specify the number of I/Os to do before getting a new
894 offset by appending `:<nr>' to the end of the string given. For a
895 random read, it would look like `rw=randread:8' for passing in an offset
896 modifier with a value of 8. If the suffix is used with a sequential I/O
897 pattern, then the `<nr>' value specified will be added to the generated
898 offset for each I/O turning sequential I/O into sequential I/O with holes.
899 For instance, using `rw=write:4k' will skip 4k for every write. Also see
900 the \fBrw_sequencer\fR option.
901 .RE
902 .TP
903 .BI rw_sequencer \fR=\fPstr
904 If an offset modifier is given by appending a number to the `rw=\fIstr\fR'
905 line, then this option controls how that number modifies the I/O offset
906 being generated. Accepted values are:
907 .RS
908 .RS
909 .TP
910 .B sequential
911 Generate sequential offset.
912 .TP
913 .B identical
914 Generate the same offset.
915 .RE
916 .P
917 \fBsequential\fR is only useful for random I/O, where fio would normally
918 generate a new random offset for every I/O. If you append e.g. 8 to randread,
919 you would get a new random offset for every 8 I/Os. The result would be a
920 seek for only every 8 I/Os, instead of for every I/O. Use `rw=randread:8'
921 to specify that. As sequential I/O is already sequential, setting
922 \fBsequential\fR for that would not result in any differences. \fBidentical\fR
923 behaves in a similar fashion, except it sends the same offset 8 number of
924 times before generating a new offset.
925 .RE
926 .TP
927 .BI unified_rw_reporting \fR=\fPstr
928 Fio normally reports statistics on a per data direction basis, meaning that
929 reads, writes, and trims are accounted and reported separately. This option
930 determines whether fio reports the results normally, summed together, or as
931 both options.
932 Accepted values are:
933 .RS
934 .TP
935 .B none
936 Normal statistics reporting.
937 .TP
938 .B mixed
939 Statistics are summed per data direction and reported together.
940 .TP
941 .B both
942 Statistics are reported normally, followed by the mixed statistics.
943 .TP
944 .B 0
945 Backward-compatible alias for \fBnone\fR.
946 .TP
947 .B 1
948 Backward-compatible alias for \fBmixed\fR.
949 .TP
950 .B 2
951 Alias for \fBboth\fR.
952 .RE
953 .TP
954 .BI randrepeat \fR=\fPbool
955 Seed the random number generator used for random I/O patterns in a
956 predictable way so the pattern is repeatable across runs. Default: true.
957 .TP
958 .BI allrandrepeat \fR=\fPbool
959 Seed all random number generators in a predictable way so results are
960 repeatable across runs. Default: false.
961 .TP
962 .BI randseed \fR=\fPint
963 Seed the random number generators based on this seed value, to be able to
964 control what sequence of output is being generated. If not set, the random
965 sequence depends on the \fBrandrepeat\fR setting.
966 .TP
967 .BI fallocate \fR=\fPstr
968 Whether pre-allocation is performed when laying down files.
969 Accepted values are:
970 .RS
971 .RS
972 .TP
973 .B none
974 Do not pre-allocate space.
975 .TP
976 .B native
977 Use a platform's native pre-allocation call but fall back to
978 \fBnone\fR behavior if it fails/is not implemented.
979 .TP
980 .B posix
981 Pre-allocate via \fBposix_fallocate\fR\|(3).
982 .TP
983 .B keep
984 Pre-allocate via \fBfallocate\fR\|(2) with
985 FALLOC_FL_KEEP_SIZE set.
986 .TP
987 .B truncate
988 Extend file to final size using \fBftruncate\fR|(2)
989 instead of allocating.
990 .TP
991 .B 0
992 Backward-compatible alias for \fBnone\fR.
993 .TP
994 .B 1
995 Backward-compatible alias for \fBposix\fR.
996 .RE
997 .P
998 May not be available on all supported platforms. \fBkeep\fR is only available
999 on Linux. If using ZFS on Solaris this cannot be set to \fBposix\fR
1000 because ZFS doesn't support pre-allocation. Default: \fBnative\fR if any
1001 pre-allocation methods except \fBtruncate\fR are available, \fBnone\fR if not.
1002 .P
1003 Note that using \fBtruncate\fR on Windows will interact surprisingly
1004 with non-sequential write patterns. When writing to a file that has
1005 been extended by setting the end-of-file information, Windows will
1006 backfill the unwritten portion of the file up to that offset with
1007 zeroes before issuing the new write. This means that a single small
1008 write to the end of an extended file will stall until the entire
1009 file has been filled with zeroes.
1010 .RE
1011 .TP
1012 .BI fadvise_hint \fR=\fPstr
1013 Use \fBposix_fadvise\fR\|(2) or \fBposix_madvise\fR\|(2) to advise the kernel
1014 what I/O patterns are likely to be issued. Accepted values are:
1015 .RS
1016 .RS
1017 .TP
1018 .B 0
1019 Backwards compatible hint for "no hint".
1020 .TP
1021 .B 1
1022 Backwards compatible hint for "advise with fio workload type". This
1023 uses FADV_RANDOM for a random workload, and FADV_SEQUENTIAL
1024 for a sequential workload.
1025 .TP
1026 .B sequential
1027 Advise using FADV_SEQUENTIAL.
1028 .TP
1029 .B random
1030 Advise using FADV_RANDOM.
1031 .RE
1032 .RE
1033 .TP
1034 .BI write_hint \fR=\fPstr
1035 Use \fBfcntl\fR\|(2) to advise the kernel what life time to expect
1036 from a write. Only supported on Linux, as of version 4.13. Accepted
1037 values are:
1038 .RS
1039 .RS
1040 .TP
1041 .B none
1042 No particular life time associated with this file.
1043 .TP
1044 .B short
1045 Data written to this file has a short life time.
1046 .TP
1047 .B medium
1048 Data written to this file has a medium life time.
1049 .TP
1050 .B long
1051 Data written to this file has a long life time.
1052 .TP
1053 .B extreme
1054 Data written to this file has a very long life time.
1055 .RE
1056 .P
1057 The values are all relative to each other, and no absolute meaning
1058 should be associated with them.
1059 .RE
1060 .TP
1061 .BI offset \fR=\fPint[%|z]
1062 Start I/O at the provided offset in the file, given as either a fixed size in
1063 bytes or a percentage. If a percentage is given, the generated offset will be
1064 aligned to the minimum \fBblocksize\fR or to the value of \fBoffset_align\fR if
1065 provided. Data before the given offset will not be touched. This
1066 effectively caps the file size at `real_size \- offset'. Can be combined with
1067 \fBsize\fR to constrain the start and end range of the I/O workload.
1068 A percentage can be specified by a number between 1 and 100 followed by '%',
1069 for example, `offset=20%' to specify 20%.
1070 .TP
1071 .BI offset_align \fR=\fPint
1072 If set to non-zero value, the byte offset generated by a percentage \fBoffset\fR
1073 is aligned upwards to this value. Defaults to 0 meaning that a percentage
1074 offset is aligned to the minimum block size.
1075 .TP
1076 .BI offset_increment \fR=\fPint[%|z]
1077 If this is provided, then the real offset becomes `\fBoffset\fR + \fBoffset_increment\fR
1078 * thread_number', where the thread number is a counter that starts at 0 and
1079 is incremented for each sub-job (i.e. when \fBnumjobs\fR option is
1080 specified). This option is useful if there are several jobs which are
1081 intended to operate on a file in parallel disjoint segments, with even
1082 spacing between the starting points. Percentages can be used for this option.
1083 If a percentage is given, the generated offset will be aligned to the minimum
1084 \fBblocksize\fR or to the value of \fBoffset_align\fR if provided.
1085 .TP
1086 .BI number_ios \fR=\fPint
1087 Fio will normally perform I/Os until it has exhausted the size of the region
1088 set by \fBsize\fR, or if it exhaust the allocated time (or hits an error
1089 condition). With this setting, the range/size can be set independently of
1090 the number of I/Os to perform. When fio reaches this number, it will exit
1091 normally and report status. Note that this does not extend the amount of I/O
1092 that will be done, it will only stop fio if this condition is met before
1093 other end-of-job criteria.
1094 .TP
1095 .BI fsync \fR=\fPint
1096 If writing to a file, issue an \fBfsync\fR\|(2) (or its equivalent) of
1097 the dirty data for every number of blocks given. For example, if you give 32
1098 as a parameter, fio will sync the file after every 32 writes issued. If fio is
1099 using non-buffered I/O, we may not sync the file. The exception is the sg
1100 I/O engine, which synchronizes the disk cache anyway. Defaults to 0, which
1101 means fio does not periodically issue and wait for a sync to complete. Also
1102 see \fBend_fsync\fR and \fBfsync_on_close\fR.
1103 .TP
1104 .BI fdatasync \fR=\fPint
1105 Like \fBfsync\fR but uses \fBfdatasync\fR\|(2) to only sync data and
1106 not metadata blocks. In Windows, FreeBSD, DragonFlyBSD or OSX there is no
1107 \fBfdatasync\fR\|(2) so this falls back to using \fBfsync\fR\|(2).
1108 Defaults to 0, which means fio does not periodically issue and wait for a
1109 data-only sync to complete.
1110 .TP
1111 .BI write_barrier \fR=\fPint
1112 Make every N\-th write a barrier write.
1113 .TP
1114 .BI sync_file_range \fR=\fPstr:int
1115 Use \fBsync_file_range\fR\|(2) for every \fIint\fR number of write
1116 operations. Fio will track range of writes that have happened since the last
1117 \fBsync_file_range\fR\|(2) call. \fIstr\fR can currently be one or more of:
1118 .RS
1119 .RS
1120 .TP
1121 .B wait_before
1122 SYNC_FILE_RANGE_WAIT_BEFORE
1123 .TP
1124 .B write
1125 SYNC_FILE_RANGE_WRITE
1126 .TP
1127 .B wait_after
1128 SYNC_FILE_RANGE_WRITE_AFTER
1129 .RE
1130 .P
1131 So if you do `sync_file_range=wait_before,write:8', fio would use
1132 `SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE' for every 8
1133 writes. Also see the \fBsync_file_range\fR\|(2) man page. This option is
1134 Linux specific.
1135 .RE
1136 .TP
1137 .BI overwrite \fR=\fPbool
1138 If true, writes to a file will always overwrite existing data. If the file
1139 doesn't already exist, it will be created before the write phase begins. If
1140 the file exists and is large enough for the specified write phase, nothing
1141 will be done. Default: false.
1142 .TP
1143 .BI end_fsync \fR=\fPbool
1144 If true, \fBfsync\fR\|(2) file contents when a write stage has completed.
1145 Default: false.
1146 .TP
1147 .BI fsync_on_close \fR=\fPbool
1148 If true, fio will \fBfsync\fR\|(2) a dirty file on close. This differs
1149 from \fBend_fsync\fR in that it will happen on every file close, not
1150 just at the end of the job. Default: false.
1151 .TP
1152 .BI rwmixread \fR=\fPint
1153 Percentage of a mixed workload that should be reads. Default: 50.
1154 .TP
1155 .BI rwmixwrite \fR=\fPint
1156 Percentage of a mixed workload that should be writes. If both
1157 \fBrwmixread\fR and \fBrwmixwrite\fR is given and the values do not
1158 add up to 100%, the latter of the two will be used to override the
1159 first. This may interfere with a given rate setting, if fio is asked to
1160 limit reads or writes to a certain rate. If that is the case, then the
1161 distribution may be skewed. Default: 50.
1162 .TP
1163 .BI random_distribution \fR=\fPstr:float[:float][,str:float][,str:float]
1164 By default, fio will use a completely uniform random distribution when asked
1165 to perform random I/O. Sometimes it is useful to skew the distribution in
1166 specific ways, ensuring that some parts of the data is more hot than others.
1167 fio includes the following distribution models:
1168 .RS
1169 .RS
1170 .TP
1171 .B random
1172 Uniform random distribution
1173 .TP
1174 .B zipf
1175 Zipf distribution
1176 .TP
1177 .B pareto
1178 Pareto distribution
1179 .TP
1180 .B normal
1181 Normal (Gaussian) distribution
1182 .TP
1183 .B zoned
1184 Zoned random distribution
1185 .B zoned_abs
1186 Zoned absolute random distribution
1187 .RE
1188 .P
1189 When using a \fBzipf\fR or \fBpareto\fR distribution, an input value is also
1190 needed to define the access pattern. For \fBzipf\fR, this is the `Zipf theta'.
1191 For \fBpareto\fR, it's the `Pareto power'. Fio includes a test
1192 program, \fBfio\-genzipf\fR, that can be used visualize what the given input
1193 values will yield in terms of hit rates. If you wanted to use \fBzipf\fR with
1194 a `theta' of 1.2, you would use `random_distribution=zipf:1.2' as the
1195 option. If a non\-uniform model is used, fio will disable use of the random
1196 map. For the \fBnormal\fR distribution, a normal (Gaussian) deviation is
1197 supplied as a value between 0 and 100.
1198 .P
1199 The second, optional float is allowed for \fBpareto\fR, \fBzipf\fR and \fBnormal\fR
1200 distributions. It allows to set base of distribution in non-default place, giving
1201 more control over most probable outcome. This value is in range [0-1] which maps linearly to
1202 range of possible random values.
1203 Defaults are: random for \fBpareto\fR and \fBzipf\fR, and 0.5 for \fBnormal\fR.
1204 If you wanted to use \fBzipf\fR with a `theta` of 1.2 centered on 1/4 of allowed value range,
1205 you would use `random_distibution=zipf:1.2:0.25`.
1206 .P
1207 For a \fBzoned\fR distribution, fio supports specifying percentages of I/O
1208 access that should fall within what range of the file or device. For
1209 example, given a criteria of:
1210 .RS
1211 .P
1212 .PD 0
1213 60% of accesses should be to the first 10%
1214 .P
1215 30% of accesses should be to the next 20%
1216 .P
1217 8% of accesses should be to the next 30%
1218 .P
1219 2% of accesses should be to the next 40%
1220 .PD
1221 .RE
1222 .P
1223 we can define that through zoning of the random accesses. For the above
1224 example, the user would do:
1225 .RS
1226 .P
1227 random_distribution=zoned:60/10:30/20:8/30:2/40
1228 .RE
1229 .P
1230 A \fBzoned_abs\fR distribution works exactly like the\fBzoned\fR, except that
1231 it takes absolute sizes. For example, let's say you wanted to define access
1232 according to the following criteria:
1233 .RS
1234 .P
1235 .PD 0
1236 60% of accesses should be to the first 20G
1237 .P
1238 30% of accesses should be to the next 100G
1239 .P
1240 10% of accesses should be to the next 500G
1241 .PD
1242 .RE
1243 .P
1244 we can define an absolute zoning distribution with:
1245 .RS
1246 .P
1247 random_distribution=zoned:60/10:30/20:8/30:2/40
1248 .RE
1249 .P
1250 For both \fBzoned\fR and \fBzoned_abs\fR, fio supports defining up to 256
1251 separate zones.
1252 .P
1253 Similarly to how \fBbssplit\fR works for setting ranges and percentages
1254 of block sizes. Like \fBbssplit\fR, it's possible to specify separate
1255 zones for reads, writes, and trims. If just one set is given, it'll apply to
1256 all of them.
1257 .RE
1258 .TP
1259 .BI percentage_random \fR=\fPint[,int][,int]
1260 For a random workload, set how big a percentage should be random. This
1261 defaults to 100%, in which case the workload is fully random. It can be set
1262 from anywhere from 0 to 100. Setting it to 0 would make the workload fully
1263 sequential. Any setting in between will result in a random mix of sequential
1264 and random I/O, at the given percentages. Comma-separated values may be
1265 specified for reads, writes, and trims as described in \fBblocksize\fR.
1266 .TP
1267 .BI norandommap
1268 Normally fio will cover every block of the file when doing random I/O. If
1269 this option is given, fio will just get a new random offset without looking
1270 at past I/O history. This means that some blocks may not be read or written,
1271 and that some blocks may be read/written more than once. If this option is
1272 used with \fBverify\fR and multiple blocksizes (via \fBbsrange\fR),
1273 only intact blocks are verified, i.e., partially-overwritten blocks are
1274 ignored.  With an async I/O engine and an I/O depth > 1, it is possible for
1275 the same block to be overwritten, which can cause verification errors.  Either
1276 do not use norandommap in this case, or also use the lfsr random generator.
1277 .TP
1278 .BI softrandommap \fR=\fPbool
1279 See \fBnorandommap\fR. If fio runs with the random block map enabled and
1280 it fails to allocate the map, if this option is set it will continue without
1281 a random block map. As coverage will not be as complete as with random maps,
1282 this option is disabled by default.
1283 .TP
1284 .BI random_generator \fR=\fPstr
1285 Fio supports the following engines for generating I/O offsets for random I/O:
1286 .RS
1287 .RS
1288 .TP
1289 .B tausworthe
1290 Strong 2^88 cycle random number generator.
1291 .TP
1292 .B lfsr
1293 Linear feedback shift register generator.
1294 .TP
1295 .B tausworthe64
1296 Strong 64\-bit 2^258 cycle random number generator.
1297 .RE
1298 .P
1299 \fBtausworthe\fR is a strong random number generator, but it requires tracking
1300 on the side if we want to ensure that blocks are only read or written
1301 once. \fBlfsr\fR guarantees that we never generate the same offset twice, and
1302 it's also less computationally expensive. It's not a true random generator,
1303 however, though for I/O purposes it's typically good enough. \fBlfsr\fR only
1304 works with single block sizes, not with workloads that use multiple block
1305 sizes. If used with such a workload, fio may read or write some blocks
1306 multiple times. The default value is \fBtausworthe\fR, unless the required
1307 space exceeds 2^32 blocks. If it does, then \fBtausworthe64\fR is
1308 selected automatically.
1309 .RE
1310 .SS "Block size"
1311 .TP
1312 .BI blocksize \fR=\fPint[,int][,int] "\fR,\fB bs" \fR=\fPint[,int][,int]
1313 The block size in bytes used for I/O units. Default: 4096. A single value
1314 applies to reads, writes, and trims. Comma-separated values may be
1315 specified for reads, writes, and trims. A value not terminated in a comma
1316 applies to subsequent types. Examples:
1317 .RS
1318 .RS
1319 .P
1320 .PD 0
1321 bs=256k        means 256k for reads, writes and trims.
1322 .P
1323 bs=8k,32k      means 8k for reads, 32k for writes and trims.
1324 .P
1325 bs=8k,32k,     means 8k for reads, 32k for writes, and default for trims.
1326 .P
1327 bs=,8k         means default for reads, 8k for writes and trims.
1328 .P
1329 bs=,8k,        means default for reads, 8k for writes, and default for trims.
1330 .PD
1331 .RE
1332 .RE
1333 .TP
1334 .BI blocksize_range \fR=\fPirange[,irange][,irange] "\fR,\fB bsrange" \fR=\fPirange[,irange][,irange]
1335 A range of block sizes in bytes for I/O units. The issued I/O unit will
1336 always be a multiple of the minimum size, unless
1337 \fBblocksize_unaligned\fR is set.
1338 Comma-separated ranges may be specified for reads, writes, and trims as
1339 described in \fBblocksize\fR. Example:
1340 .RS
1341 .RS
1342 .P
1343 bsrange=1k\-4k,2k\-8k
1344 .RE
1345 .RE
1346 .TP
1347 .BI bssplit \fR=\fPstr[,str][,str]
1348 Sometimes you want even finer grained control of the block sizes issued, not
1349 just an even split between them. This option allows you to weight various
1350 block sizes, so that you are able to define a specific amount of block sizes
1351 issued. The format for this option is:
1352 .RS
1353 .RS
1354 .P
1355 bssplit=blocksize/percentage:blocksize/percentage
1356 .RE
1357 .P
1358 for as many block sizes as needed. So if you want to define a workload that
1359 has 50% 64k blocks, 10% 4k blocks, and 40% 32k blocks, you would write:
1360 .RS
1361 .P
1362 bssplit=4k/10:64k/50:32k/40
1363 .RE
1364 .P
1365 Ordering does not matter. If the percentage is left blank, fio will fill in
1366 the remaining values evenly. So a bssplit option like this one:
1367 .RS
1368 .P
1369 bssplit=4k/50:1k/:32k/
1370 .RE
1371 .P
1372 would have 50% 4k ios, and 25% 1k and 32k ios. The percentages always add up
1373 to 100, if bssplit is given a range that adds up to more, it will error out.
1374 .P
1375 Comma-separated values may be specified for reads, writes, and trims as
1376 described in \fBblocksize\fR.
1377 .P
1378 If you want a workload that has 50% 2k reads and 50% 4k reads, while having
1379 90% 4k writes and 10% 8k writes, you would specify:
1380 .RS
1381 .P
1382 bssplit=2k/50:4k/50,4k/90:8k/10
1383 .RE
1384 .P
1385 Fio supports defining up to 64 different weights for each data direction.
1386 .RE
1387 .TP
1388 .BI blocksize_unaligned "\fR,\fB bs_unaligned"
1389 If set, fio will issue I/O units with any size within
1390 \fBblocksize_range\fR, not just multiples of the minimum size. This
1391 typically won't work with direct I/O, as that normally requires sector
1392 alignment.
1393 .TP
1394 .BI bs_is_seq_rand \fR=\fPbool
1395 If this option is set, fio will use the normal read,write blocksize settings
1396 as sequential,random blocksize settings instead. Any random read or write
1397 will use the WRITE blocksize settings, and any sequential read or write will
1398 use the READ blocksize settings.
1399 .TP
1400 .BI blockalign \fR=\fPint[,int][,int] "\fR,\fB ba" \fR=\fPint[,int][,int]
1401 Boundary to which fio will align random I/O units. Default:
1402 \fBblocksize\fR. Minimum alignment is typically 512b for using direct
1403 I/O, though it usually depends on the hardware block size. This option is
1404 mutually exclusive with using a random map for files, so it will turn off
1405 that option. Comma-separated values may be specified for reads, writes, and
1406 trims as described in \fBblocksize\fR.
1407 .SS "Buffers and memory"
1408 .TP
1409 .BI zero_buffers
1410 Initialize buffers with all zeros. Default: fill buffers with random data.
1411 .TP
1412 .BI refill_buffers
1413 If this option is given, fio will refill the I/O buffers on every
1414 submit. The default is to only fill it at init time and reuse that
1415 data. Only makes sense if zero_buffers isn't specified, naturally. If data
1416 verification is enabled, \fBrefill_buffers\fR is also automatically enabled.
1417 .TP
1418 .BI scramble_buffers \fR=\fPbool
1419 If \fBrefill_buffers\fR is too costly and the target is using data
1420 deduplication, then setting this option will slightly modify the I/O buffer
1421 contents to defeat normal de-dupe attempts. This is not enough to defeat
1422 more clever block compression attempts, but it will stop naive dedupe of
1423 blocks. Default: true.
1424 .TP
1425 .BI buffer_compress_percentage \fR=\fPint
1426 If this is set, then fio will attempt to provide I/O buffer content
1427 (on WRITEs) that compresses to the specified level. Fio does this by
1428 providing a mix of random data followed by fixed pattern data. The
1429 fixed pattern is either zeros, or the pattern specified by
1430 \fBbuffer_pattern\fR. If the \fBbuffer_pattern\fR option is used, it
1431 might skew the compression ratio slightly. Setting
1432 \fBbuffer_compress_percentage\fR to a value other than 100 will also
1433 enable \fBrefill_buffers\fR in order to reduce the likelihood that
1434 adjacent blocks are so similar that they over compress when seen
1435 together. See \fBbuffer_compress_chunk\fR for how to set a finer or
1436 coarser granularity of the random/fixed data regions. Defaults to unset
1437 i.e., buffer data will not adhere to any compression level.
1438 .TP
1439 .BI buffer_compress_chunk \fR=\fPint
1440 This setting allows fio to manage how big the random/fixed data region
1441 is when using \fBbuffer_compress_percentage\fR. When
1442 \fBbuffer_compress_chunk\fR is set to some non-zero value smaller than the
1443 block size, fio can repeat the random/fixed region throughout the I/O
1444 buffer at the specified interval (which particularly useful when
1445 bigger block sizes are used for a job). When set to 0, fio will use a
1446 chunk size that matches the block size resulting in a single
1447 random/fixed region within the I/O buffer. Defaults to 512. When the
1448 unit is omitted, the value is interpreted in bytes.
1449 .TP
1450 .BI buffer_pattern \fR=\fPstr
1451 If set, fio will fill the I/O buffers with this pattern or with the contents
1452 of a file. If not set, the contents of I/O buffers are defined by the other
1453 options related to buffer contents. The setting can be any pattern of bytes,
1454 and can be prefixed with 0x for hex values. It may also be a string, where
1455 the string must then be wrapped with "". Or it may also be a filename,
1456 where the filename must be wrapped with '' in which case the file is
1457 opened and read. Note that not all the file contents will be read if that
1458 would cause the buffers to overflow. So, for example:
1459 .RS
1460 .RS
1461 .P
1462 .PD 0
1463 buffer_pattern='filename'
1464 .P
1465 or:
1466 .P
1467 buffer_pattern="abcd"
1468 .P
1469 or:
1470 .P
1471 buffer_pattern=\-12
1472 .P
1473 or:
1474 .P
1475 buffer_pattern=0xdeadface
1476 .PD
1477 .RE
1478 .P
1479 Also you can combine everything together in any order:
1480 .RS
1481 .P
1482 buffer_pattern=0xdeadface"abcd"\-12'filename'
1483 .RE
1484 .RE
1485 .TP
1486 .BI dedupe_percentage \fR=\fPint
1487 If set, fio will generate this percentage of identical buffers when
1488 writing. These buffers will be naturally dedupable. The contents of the
1489 buffers depend on what other buffer compression settings have been set. It's
1490 possible to have the individual buffers either fully compressible, or not at
1491 all \-\- this option only controls the distribution of unique buffers. Setting
1492 this option will also enable \fBrefill_buffers\fR to prevent every buffer
1493 being identical.
1494 .TP
1495 .BI invalidate \fR=\fPbool
1496 Invalidate the buffer/page cache parts of the files to be used prior to
1497 starting I/O if the platform and file type support it. Defaults to true.
1498 This will be ignored if \fBpre_read\fR is also specified for the
1499 same job.
1500 .TP
1501 .BI sync \fR=\fPstr
1502 Whether, and what type, of synchronous I/O to use for writes.  The allowed
1503 values are:
1504 .RS
1505 .RS
1506 .TP
1507 .B none
1508 Do not use synchronous IO, the default.
1509 .TP
1510 .B 0
1511 Same as \fBnone\fR.
1512 .TP
1513 .B sync
1514 Use synchronous file IO. For the majority of I/O engines,
1515 this means using O_SYNC.
1516 .TP
1517 .B 1
1518 Same as \fBsync\fR.
1519 .TP
1520 .B dsync
1521 Use synchronous data IO. For the majority of I/O engines,
1522 this means using O_DSYNC.
1523 .PD
1524 .RE
1525 .RE
1526 .TP
1527 .BI iomem \fR=\fPstr "\fR,\fP mem" \fR=\fPstr
1528 Fio can use various types of memory as the I/O unit buffer. The allowed
1529 values are:
1530 .RS
1531 .RS
1532 .TP
1533 .B malloc
1534 Use memory from \fBmalloc\fR\|(3) as the buffers. Default memory type.
1535 .TP
1536 .B shm
1537 Use shared memory as the buffers. Allocated through \fBshmget\fR\|(2).
1538 .TP
1539 .B shmhuge
1540 Same as \fBshm\fR, but use huge pages as backing.
1541 .TP
1542 .B mmap
1543 Use \fBmmap\fR\|(2) to allocate buffers. May either be anonymous memory, or can
1544 be file backed if a filename is given after the option. The format
1545 is `mem=mmap:/path/to/file'.
1546 .TP
1547 .B mmaphuge
1548 Use a memory mapped huge file as the buffer backing. Append filename
1549 after mmaphuge, ala `mem=mmaphuge:/hugetlbfs/file'.
1550 .TP
1551 .B mmapshared
1552 Same as \fBmmap\fR, but use a MMAP_SHARED mapping.
1553 .TP
1554 .B cudamalloc
1555 Use GPU memory as the buffers for GPUDirect RDMA benchmark.
1556 The \fBioengine\fR must be \fBrdma\fR.
1557 .RE
1558 .P
1559 The area allocated is a function of the maximum allowed bs size for the job,
1560 multiplied by the I/O depth given. Note that for \fBshmhuge\fR and
1561 \fBmmaphuge\fR to work, the system must have free huge pages allocated. This
1562 can normally be checked and set by reading/writing
1563 `/proc/sys/vm/nr_hugepages' on a Linux system. Fio assumes a huge page
1564 is 4MiB in size. So to calculate the number of huge pages you need for a
1565 given job file, add up the I/O depth of all jobs (normally one unless
1566 \fBiodepth\fR is used) and multiply by the maximum bs set. Then divide
1567 that number by the huge page size. You can see the size of the huge pages in
1568 `/proc/meminfo'. If no huge pages are allocated by having a non-zero
1569 number in `nr_hugepages', using \fBmmaphuge\fR or \fBshmhuge\fR will fail. Also
1570 see \fBhugepage\-size\fR.
1571 .P
1572 \fBmmaphuge\fR also needs to have hugetlbfs mounted and the file location
1573 should point there. So if it's mounted in `/huge', you would use
1574 `mem=mmaphuge:/huge/somefile'.
1575 .RE
1576 .TP
1577 .BI iomem_align \fR=\fPint "\fR,\fP mem_align" \fR=\fPint
1578 This indicates the memory alignment of the I/O memory buffers. Note that
1579 the given alignment is applied to the first I/O unit buffer, if using
1580 \fBiodepth\fR the alignment of the following buffers are given by the
1581 \fBbs\fR used. In other words, if using a \fBbs\fR that is a
1582 multiple of the page sized in the system, all buffers will be aligned to
1583 this value. If using a \fBbs\fR that is not page aligned, the alignment
1584 of subsequent I/O memory buffers is the sum of the \fBiomem_align\fR and
1585 \fBbs\fR used.
1586 .TP
1587 .BI hugepage\-size \fR=\fPint
1588 Defines the size of a huge page. Must at least be equal to the system
1589 setting, see `/proc/meminfo'. Defaults to 4MiB. Should probably
1590 always be a multiple of megabytes, so using `hugepage\-size=Xm' is the
1591 preferred way to set this to avoid setting a non-pow-2 bad value.
1592 .TP
1593 .BI lockmem \fR=\fPint
1594 Pin the specified amount of memory with \fBmlock\fR\|(2). Can be used to
1595 simulate a smaller amount of memory. The amount specified is per worker.
1596 .SS "I/O size"
1597 .TP
1598 .BI size \fR=\fPint[%|z]
1599 The total size of file I/O for each thread of this job. Fio will run until
1600 this many bytes has been transferred, unless runtime is limited by other options
1601 (such as \fBruntime\fR, for instance, or increased/decreased by \fBio_size\fR).
1602 Fio will divide this size between the available files determined by options
1603 such as \fBnrfiles\fR, \fBfilename\fR, unless \fBfilesize\fR is
1604 specified by the job. If the result of division happens to be 0, the size is
1605 set to the physical size of the given files or devices if they exist.
1606 If this option is not specified, fio will use the full size of the given
1607 files or devices. If the files do not exist, size must be given. It is also
1608 possible to give size as a percentage between 1 and 100. If `size=20%' is
1609 given, fio will use 20% of the full size of the given files or devices.
1610 Can be combined with \fBoffset\fR to constrain the start and end range
1611 that I/O will be done within.
1612 .TP
1613 .BI io_size \fR=\fPint[%|z] "\fR,\fB io_limit" \fR=\fPint[%|z]
1614 Normally fio operates within the region set by \fBsize\fR, which means
1615 that the \fBsize\fR option sets both the region and size of I/O to be
1616 performed. Sometimes that is not what you want. With this option, it is
1617 possible to define just the amount of I/O that fio should do. For instance,
1618 if \fBsize\fR is set to 20GiB and \fBio_size\fR is set to 5GiB, fio
1619 will perform I/O within the first 20GiB but exit when 5GiB have been
1620 done. The opposite is also possible \-\- if \fBsize\fR is set to 20GiB,
1621 and \fBio_size\fR is set to 40GiB, then fio will do 40GiB of I/O within
1622 the 0..20GiB region. Value can be set as percentage: \fBio_size\fR=N%.
1623 In this case \fBio_size\fR multiplies \fBsize\fR= value.
1624 .TP
1625 .BI filesize \fR=\fPirange(int)
1626 Individual file sizes. May be a range, in which case fio will select sizes
1627 for files at random within the given range and limited to \fBsize\fR in
1628 total (if that is given). If not given, each created file is the same size.
1629 This option overrides \fBsize\fR in terms of file size, which means
1630 this value is used as a fixed size or possible range of each file.
1631 .TP
1632 .BI file_append \fR=\fPbool
1633 Perform I/O after the end of the file. Normally fio will operate within the
1634 size of a file. If this option is set, then fio will append to the file
1635 instead. This has identical behavior to setting \fBoffset\fR to the size
1636 of a file. This option is ignored on non-regular files.
1637 .TP
1638 .BI fill_device \fR=\fPbool "\fR,\fB fill_fs" \fR=\fPbool
1639 Sets size to something really large and waits for ENOSPC (no space left on
1640 device) as the terminating condition. Only makes sense with sequential
1641 write. For a read workload, the mount point will be filled first then I/O
1642 started on the result. This option doesn't make sense if operating on a raw
1643 device node, since the size of that is already known by the file system.
1644 Additionally, writing beyond end-of-device will not return ENOSPC there.
1645 .SS "I/O engine"
1646 .TP
1647 .BI ioengine \fR=\fPstr
1648 Defines how the job issues I/O to the file. The following types are defined:
1649 .RS
1650 .RS
1651 .TP
1652 .B sync
1653 Basic \fBread\fR\|(2) or \fBwrite\fR\|(2)
1654 I/O. \fBlseek\fR\|(2) is used to position the I/O location.
1655 See \fBfsync\fR and \fBfdatasync\fR for syncing write I/Os.
1656 .TP
1657 .B psync
1658 Basic \fBpread\fR\|(2) or \fBpwrite\fR\|(2) I/O. Default on
1659 all supported operating systems except for Windows.
1660 .TP
1661 .B vsync
1662 Basic \fBreadv\fR\|(2) or \fBwritev\fR\|(2) I/O. Will emulate
1663 queuing by coalescing adjacent I/Os into a single submission.
1664 .TP
1665 .B pvsync
1666 Basic \fBpreadv\fR\|(2) or \fBpwritev\fR\|(2) I/O.
1667 .TP
1668 .B pvsync2
1669 Basic \fBpreadv2\fR\|(2) or \fBpwritev2\fR\|(2) I/O.
1670 .TP
1671 .B libaio
1672 Linux native asynchronous I/O. Note that Linux may only support
1673 queued behavior with non-buffered I/O (set `direct=1' or
1674 `buffered=0').
1675 This engine defines engine specific options.
1676 .TP
1677 .B posixaio
1678 POSIX asynchronous I/O using \fBaio_read\fR\|(3) and
1679 \fBaio_write\fR\|(3).
1680 .TP
1681 .B solarisaio
1682 Solaris native asynchronous I/O.
1683 .TP
1684 .B windowsaio
1685 Windows native asynchronous I/O. Default on Windows.
1686 .TP
1687 .B mmap
1688 File is memory mapped with \fBmmap\fR\|(2) and data copied
1689 to/from using \fBmemcpy\fR\|(3).
1690 .TP
1691 .B splice
1692 \fBsplice\fR\|(2) is used to transfer the data and
1693 \fBvmsplice\fR\|(2) to transfer data from user space to the
1694 kernel.
1695 .TP
1696 .B sg
1697 SCSI generic sg v3 I/O. May either be synchronous using the SG_IO
1698 ioctl, or if the target is an sg character device we use
1699 \fBread\fR\|(2) and \fBwrite\fR\|(2) for asynchronous
1700 I/O. Requires \fBfilename\fR option to specify either block or
1701 character devices. This engine supports trim operations. The
1702 sg engine includes engine specific options.
1703 .TP
1704 .B libzbc
1705 Synchronous I/O engine for SMR hard-disks using the \fBlibzbc\fR
1706 library. The target can be either an sg character device or
1707 a block device file. This engine supports the zonemode=zbd zone
1708 operations.
1709 .TP
1710 .B null
1711 Doesn't transfer any data, just pretends to. This is mainly used to
1712 exercise fio itself and for debugging/testing purposes.
1713 .TP
1714 .B net
1715 Transfer over the network to given `host:port'. Depending on the
1716 \fBprotocol\fR used, the \fBhostname\fR, \fBport\fR,
1717 \fBlisten\fR and \fBfilename\fR options are used to specify
1718 what sort of connection to make, while the \fBprotocol\fR option
1719 determines which protocol will be used. This engine defines engine
1720 specific options.
1721 .TP
1722 .B netsplice
1723 Like \fBnet\fR, but uses \fBsplice\fR\|(2) and
1724 \fBvmsplice\fR\|(2) to map data and send/receive.
1725 This engine defines engine specific options.
1726 .TP
1727 .B cpuio
1728 Doesn't transfer any data, but burns CPU cycles according to the
1729 \fBcpuload\fR, \fBcpuchunks\fR and \fBcpumode\fR options.
1730 A job never finishes unless there is at least one non-cpuio job.
1731 .RS
1732 .P
1733 .PD 0
1734 \fBcpuload\fR\=85 will cause that job to do nothing but burn 85% of the CPU.
1735 In case of SMP machines, use \fBnumjobs=<nr_of_cpu>\fR\ to get desired CPU usage,
1736 as the cpuload only loads a single CPU at the desired rate.
1737
1738 .P
1739 \fBcpumode\fR\=qsort replace the default noop instructions loop
1740 by a qsort algorithm to consume more energy.
1741
1742 .P
1743 .RE
1744 .TP
1745 .B rdma
1746 The RDMA I/O engine supports both RDMA memory semantics
1747 (RDMA_WRITE/RDMA_READ) and channel semantics (Send/Recv) for the
1748 InfiniBand, RoCE and iWARP protocols. This engine defines engine
1749 specific options.
1750 .TP
1751 .B falloc
1752 I/O engine that does regular fallocate to simulate data transfer as
1753 fio ioengine.
1754 .RS
1755 .P
1756 .PD 0
1757 DDIR_READ      does fallocate(,mode = FALLOC_FL_KEEP_SIZE,).
1758 .P
1759 DIR_WRITE      does fallocate(,mode = 0).
1760 .P
1761 DDIR_TRIM      does fallocate(,mode = FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE).
1762 .PD
1763 .RE
1764 .TP
1765 .B ftruncate
1766 I/O engine that sends \fBftruncate\fR\|(2) operations in response
1767 to write (DDIR_WRITE) events. Each ftruncate issued sets the file's
1768 size to the current block offset. \fBblocksize\fR is ignored.
1769 .TP
1770 .B e4defrag
1771 I/O engine that does regular EXT4_IOC_MOVE_EXT ioctls to simulate
1772 defragment activity in request to DDIR_WRITE event.
1773 .TP
1774 .B rados
1775 I/O engine supporting direct access to Ceph Reliable Autonomic Distributed
1776 Object Store (RADOS) via librados. This ioengine defines engine specific
1777 options.
1778 .TP
1779 .B rbd
1780 I/O engine supporting direct access to Ceph Rados Block Devices
1781 (RBD) via librbd without the need to use the kernel rbd driver. This
1782 ioengine defines engine specific options.
1783 .TP
1784 .B http
1785 I/O engine supporting GET/PUT requests over HTTP(S) with libcurl to
1786 a WebDAV or S3 endpoint.  This ioengine defines engine specific options.
1787
1788 This engine only supports direct IO of iodepth=1; you need to scale this
1789 via numjobs. blocksize defines the size of the objects to be created.
1790
1791 TRIM is translated to object deletion.
1792 .TP
1793 .B gfapi
1794 Using GlusterFS libgfapi sync interface to direct access to
1795 GlusterFS volumes without having to go through FUSE. This ioengine
1796 defines engine specific options.
1797 .TP
1798 .B gfapi_async
1799 Using GlusterFS libgfapi async interface to direct access to
1800 GlusterFS volumes without having to go through FUSE. This ioengine
1801 defines engine specific options.
1802 .TP
1803 .B libhdfs
1804 Read and write through Hadoop (HDFS). The \fBfilename\fR option
1805 is used to specify host,port of the hdfs name\-node to connect. This
1806 engine interprets offsets a little differently. In HDFS, files once
1807 created cannot be modified so random writes are not possible. To
1808 imitate this the libhdfs engine expects a bunch of small files to be
1809 created over HDFS and will randomly pick a file from them
1810 based on the offset generated by fio backend (see the example
1811 job file to create such files, use `rw=write' option). Please
1812 note, it may be necessary to set environment variables to work
1813 with HDFS/libhdfs properly. Each job uses its own connection to
1814 HDFS.
1815 .TP
1816 .B mtd
1817 Read, write and erase an MTD character device (e.g.,
1818 `/dev/mtd0'). Discards are treated as erases. Depending on the
1819 underlying device type, the I/O may have to go in a certain pattern,
1820 e.g., on NAND, writing sequentially to erase blocks and discarding
1821 before overwriting. The \fBtrimwrite\fR mode works well for this
1822 constraint.
1823 .TP
1824 .B pmemblk
1825 Read and write using filesystem DAX to a file on a filesystem
1826 mounted with DAX on a persistent memory device through the PMDK
1827 libpmemblk library.
1828 .TP
1829 .B dev\-dax
1830 Read and write using device DAX to a persistent memory device (e.g.,
1831 /dev/dax0.0) through the PMDK libpmem library.
1832 .TP
1833 .B external
1834 Prefix to specify loading an external I/O engine object file. Append
1835 the engine filename, e.g. `ioengine=external:/tmp/foo.o' to load
1836 ioengine `foo.o' in `/tmp'. The path can be either
1837 absolute or relative. See `engines/skeleton_external.c' in the fio source for
1838 details of writing an external I/O engine.
1839 .TP
1840 .B filecreate
1841 Simply create the files and do no I/O to them.  You still need to set
1842 \fBfilesize\fR so that all the accounting still occurs, but no actual I/O will be
1843 done other than creating the file.
1844 .TP
1845 .B filestat
1846 Simply do stat() and do no I/O to the file. You need to set 'filesize'
1847 and 'nrfiles', so that files will be created.
1848 This engine is to measure file lookup and meta data access.
1849 .TP
1850 .B libpmem
1851 Read and write using mmap I/O to a file on a filesystem
1852 mounted with DAX on a persistent memory device through the PMDK
1853 libpmem library.
1854 .TP
1855 .B ime_psync
1856 Synchronous read and write using DDN's Infinite Memory Engine (IME). This
1857 engine is very basic and issues calls to IME whenever an IO is queued.
1858 .TP
1859 .B ime_psyncv
1860 Synchronous read and write using DDN's Infinite Memory Engine (IME). This
1861 engine uses iovecs and will try to stack as much IOs as possible (if the IOs
1862 are "contiguous" and the IO depth is not exceeded) before issuing a call to IME.
1863 .TP
1864 .B ime_aio
1865 Asynchronous read and write using DDN's Infinite Memory Engine (IME). This
1866 engine will try to stack as much IOs as possible by creating requests for IME.
1867 FIO will then decide when to commit these requests.
1868 .TP
1869 .B libiscsi
1870 Read and write iscsi lun with libiscsi.
1871 .TP
1872 .B nbd
1873 Synchronous read and write a Network Block Device (NBD).
1874 .TP
1875 .B libcufile
1876 I/O engine supporting libcufile synchronous access to nvidia-fs and a
1877 GPUDirect Storage-supported filesystem. This engine performs
1878 I/O without transferring buffers between user-space and the kernel,
1879 unless \fBverify\fR is set or \fBcuda_io\fR is \fBposix\fR. \fBiomem\fR must
1880 not be \fBcudamalloc\fR. This ioengine defines engine specific options.
1881 .TP
1882 .B dfs
1883 I/O engine supporting asynchronous read and write operations to the DAOS File
1884 System (DFS) via libdfs.
1885 .SS "I/O engine specific parameters"
1886 In addition, there are some parameters which are only valid when a specific
1887 \fBioengine\fR is in use. These are used identically to normal parameters,
1888 with the caveat that when used on the command line, they must come after the
1889 \fBioengine\fR that defines them is selected.
1890 .TP
1891 .BI (io_uring, libaio)cmdprio_percentage \fR=\fPint
1892 Set the percentage of I/O that will be issued with higher priority by setting
1893 the priority bit. Non-read I/O is likely unaffected by ``cmdprio_percentage``.
1894 This option cannot be used with the `prio` or `prioclass` options. For this
1895 option to set the priority bit properly, NCQ priority must be supported and
1896 enabled and `direct=1' option must be used. fio must also be run as the root
1897 user.
1898 .TP
1899 .BI (io_uring)fixedbufs
1900 If fio is asked to do direct IO, then Linux will map pages for each IO call, and
1901 release them when IO is done. If this option is set, the pages are pre-mapped
1902 before IO is started. This eliminates the need to map and release for each IO.
1903 This is more efficient, and reduces the IO latency as well.
1904 .TP
1905 .BI (io_uring)hipri
1906 If this option is set, fio will attempt to use polled IO completions. Normal IO
1907 completions generate interrupts to signal the completion of IO, polled
1908 completions do not. Hence they are require active reaping by the application.
1909 The benefits are more efficient IO for high IOPS scenarios, and lower latencies
1910 for low queue depth IO.
1911 .TP
1912 .BI (io_uring)registerfiles
1913 With this option, fio registers the set of files being used with the kernel.
1914 This avoids the overhead of managing file counts in the kernel, making the
1915 submission and completion part more lightweight. Required for the below
1916 sqthread_poll option.
1917 .TP
1918 .BI (io_uring)sqthread_poll
1919 Normally fio will submit IO by issuing a system call to notify the kernel of
1920 available items in the SQ ring. If this option is set, the act of submitting IO
1921 will be done by a polling thread in the kernel. This frees up cycles for fio, at
1922 the cost of using more CPU in the system.
1923 .TP
1924 .BI (io_uring)sqthread_poll_cpu
1925 When `sqthread_poll` is set, this option provides a way to define which CPU
1926 should be used for the polling thread.
1927 .TP
1928 .BI (libaio)userspace_reap
1929 Normally, with the libaio engine in use, fio will use the
1930 \fBio_getevents\fR\|(3) system call to reap newly returned events. With
1931 this flag turned on, the AIO ring will be read directly from user-space to
1932 reap events. The reaping mode is only enabled when polling for a minimum of
1933 0 events (e.g. when `iodepth_batch_complete=0').
1934 .TP
1935 .BI (pvsync2)hipri
1936 Set RWF_HIPRI on I/O, indicating to the kernel that it's of higher priority
1937 than normal.
1938 .TP
1939 .BI (pvsync2)hipri_percentage
1940 When hipri is set this determines the probability of a pvsync2 I/O being high
1941 priority. The default is 100%.
1942 .TP
1943 .BI (pvsync2,libaio,io_uring)nowait
1944 By default if a request cannot be executed immediately (e.g. resource starvation,
1945 waiting on locks) it is queued and the initiating process will be blocked until
1946 the required resource becomes free.
1947 This option sets the RWF_NOWAIT flag (supported from the 4.14 Linux kernel) and
1948 the call will return instantly with EAGAIN or a partial result rather than waiting.
1949
1950 It is useful to also use \fBignore_error\fR=EAGAIN when using this option.
1951 Note: glibc 2.27, 2.28 have a bug in syscall wrappers preadv2, pwritev2.
1952 They return EOPNOTSUP instead of EAGAIN.
1953
1954 For cached I/O, using this option usually means a request operates only with
1955 cached data. Currently the RWF_NOWAIT flag does not supported for cached write.
1956 For direct I/O, requests will only succeed if cache invalidation isn't required,
1957 file blocks are fully allocated and the disk request could be issued immediately.
1958 .TP
1959 .BI (cpuio)cpuload \fR=\fPint
1960 Attempt to use the specified percentage of CPU cycles. This is a mandatory
1961 option when using cpuio I/O engine.
1962 .TP
1963 .BI (cpuio)cpuchunks \fR=\fPint
1964 Split the load into cycles of the given time. In microseconds.
1965 .TP
1966 .BI (cpuio)exit_on_io_done \fR=\fPbool
1967 Detect when I/O threads are done, then exit.
1968 .TP
1969 .BI (libhdfs)namenode \fR=\fPstr
1970 The hostname or IP address of a HDFS cluster namenode to contact.
1971 .TP
1972 .BI (libhdfs)port
1973 The listening port of the HFDS cluster namenode.
1974 .TP
1975 .BI (netsplice,net)port
1976 The TCP or UDP port to bind to or connect to. If this is used with
1977 \fBnumjobs\fR to spawn multiple instances of the same job type, then
1978 this will be the starting port number since fio will use a range of
1979 ports.
1980 .TP
1981 .BI (rdma, librpma_*)port
1982 The port to use for RDMA-CM communication. This should be the same
1983 value on the client and the server side.
1984 .TP
1985 .BI (netsplice,net, rdma)hostname \fR=\fPstr
1986 The hostname or IP address to use for TCP, UDP or RDMA-CM based I/O.
1987 If the job is a TCP listener or UDP reader, the hostname is not used
1988 and must be omitted unless it is a valid UDP multicast address.
1989 .TP
1990 .BI (librpma_*)serverip \fR=\fPstr
1991 The IP address to be used for RDMA-CM based I/O.
1992 .TP
1993 .BI (librpma_*_server)direct_write_to_pmem \fR=\fPbool
1994 Set to 1 only when Direct Write to PMem from the remote host is possible. Otherwise, set to 0.
1995 .TP
1996 .BI (netsplice,net)interface \fR=\fPstr
1997 The IP address of the network interface used to send or receive UDP
1998 multicast.
1999 .TP
2000 .BI (netsplice,net)ttl \fR=\fPint
2001 Time\-to\-live value for outgoing UDP multicast packets. Default: 1.
2002 .TP
2003 .BI (netsplice,net)nodelay \fR=\fPbool
2004 Set TCP_NODELAY on TCP connections.
2005 .TP
2006 .BI (netsplice,net)protocol \fR=\fPstr "\fR,\fP proto" \fR=\fPstr
2007 The network protocol to use. Accepted values are:
2008 .RS
2009 .RS
2010 .TP
2011 .B tcp
2012 Transmission control protocol.
2013 .TP
2014 .B tcpv6
2015 Transmission control protocol V6.
2016 .TP
2017 .B udp
2018 User datagram protocol.
2019 .TP
2020 .B udpv6
2021 User datagram protocol V6.
2022 .TP
2023 .B unix
2024 UNIX domain socket.
2025 .RE
2026 .P
2027 When the protocol is TCP or UDP, the port must also be given, as well as the
2028 hostname if the job is a TCP listener or UDP reader. For unix sockets, the
2029 normal \fBfilename\fR option should be used and the port is invalid.
2030 .RE
2031 .TP
2032 .BI (netsplice,net)listen
2033 For TCP network connections, tell fio to listen for incoming connections
2034 rather than initiating an outgoing connection. The \fBhostname\fR must
2035 be omitted if this option is used.
2036 .TP
2037 .BI (netsplice,net)pingpong
2038 Normally a network writer will just continue writing data, and a network
2039 reader will just consume packages. If `pingpong=1' is set, a writer will
2040 send its normal payload to the reader, then wait for the reader to send the
2041 same payload back. This allows fio to measure network latencies. The
2042 submission and completion latencies then measure local time spent sending or
2043 receiving, and the completion latency measures how long it took for the
2044 other end to receive and send back. For UDP multicast traffic
2045 `pingpong=1' should only be set for a single reader when multiple readers
2046 are listening to the same address.
2047 .TP
2048 .BI (netsplice,net)window_size \fR=\fPint
2049 Set the desired socket buffer size for the connection.
2050 .TP
2051 .BI (netsplice,net)mss \fR=\fPint
2052 Set the TCP maximum segment size (TCP_MAXSEG).
2053 .TP
2054 .BI (e4defrag)donorname \fR=\fPstr
2055 File will be used as a block donor (swap extents between files).
2056 .TP
2057 .BI (e4defrag)inplace \fR=\fPint
2058 Configure donor file blocks allocation strategy:
2059 .RS
2060 .RS
2061 .TP
2062 .B 0
2063 Default. Preallocate donor's file on init.
2064 .TP
2065 .B 1
2066 Allocate space immediately inside defragment event, and free right
2067 after event.
2068 .RE
2069 .RE
2070 .TP
2071 .BI (rbd,rados)clustername \fR=\fPstr
2072 Specifies the name of the Ceph cluster.
2073 .TP
2074 .BI (rbd)rbdname \fR=\fPstr
2075 Specifies the name of the RBD.
2076 .TP
2077 .BI (rbd,rados)pool \fR=\fPstr
2078 Specifies the name of the Ceph pool containing RBD or RADOS data.
2079 .TP
2080 .BI (rbd,rados)clientname \fR=\fPstr
2081 Specifies the username (without the 'client.' prefix) used to access the
2082 Ceph cluster. If the \fBclustername\fR is specified, the \fBclientname\fR shall be
2083 the full *type.id* string. If no type. prefix is given, fio will add 'client.'
2084 by default.
2085 .TP
2086 .BI (rbd,rados)busy_poll \fR=\fPbool
2087 Poll store instead of waiting for completion. Usually this provides better
2088 throughput at cost of higher(up to 100%) CPU utilization.
2089 .TP
2090 .BI (rados)touch_objects \fR=\fPbool
2091 During initialization, touch (create if do not exist) all objects (files).
2092 Touching all objects affects ceph caches and likely impacts test results.
2093 Enabled by default.
2094 .TP
2095 .BI (http)http_host \fR=\fPstr
2096 Hostname to connect to. For S3, this could be the bucket name. Default
2097 is \fBlocalhost\fR
2098 .TP
2099 .BI (http)http_user \fR=\fPstr
2100 Username for HTTP authentication.
2101 .TP
2102 .BI (http)http_pass \fR=\fPstr
2103 Password for HTTP authentication.
2104 .TP
2105 .BI (http)https \fR=\fPstr
2106 Whether to use HTTPS instead of plain HTTP. \fRon\fP enables HTTPS;
2107 \fRinsecure\fP will enable HTTPS, but disable SSL peer verification (use
2108 with caution!).  Default is \fBoff\fR.
2109 .TP
2110 .BI (http)http_mode \fR=\fPstr
2111 Which HTTP access mode to use: webdav, swift, or s3. Default is
2112 \fBwebdav\fR.
2113 .TP
2114 .BI (http)http_s3_region \fR=\fPstr
2115 The S3 region/zone to include in the request. Default is \fBus-east-1\fR.
2116 .TP
2117 .BI (http)http_s3_key \fR=\fPstr
2118 The S3 secret key.
2119 .TP
2120 .BI (http)http_s3_keyid \fR=\fPstr
2121 The S3 key/access id.
2122 .TP
2123 .BI (http)http_swift_auth_token \fR=\fPstr
2124 The Swift auth token. See the example configuration file on how to
2125 retrieve this.
2126 .TP
2127 .BI (http)http_verbose \fR=\fPint
2128 Enable verbose requests from libcurl. Useful for debugging. 1 turns on
2129 verbose logging from libcurl, 2 additionally enables HTTP IO tracing.
2130 Default is \fB0\fR
2131 .TP
2132 .BI (mtd)skip_bad \fR=\fPbool
2133 Skip operations against known bad blocks.
2134 .TP
2135 .BI (libhdfs)hdfsdirectory
2136 libhdfs will create chunk in this HDFS directory.
2137 .TP
2138 .BI (libhdfs)chunk_size
2139 The size of the chunk to use for each file.
2140 .TP
2141 .BI (rdma)verb \fR=\fPstr
2142 The RDMA verb to use on this side of the RDMA ioengine
2143 connection. Valid values are write, read, send and recv. These
2144 correspond to the equivalent RDMA verbs (e.g. write = rdma_write
2145 etc.). Note that this only needs to be specified on the client side of
2146 the connection. See the examples folder.
2147 .TP
2148 .BI (rdma)bindname \fR=\fPstr
2149 The name to use to bind the local RDMA-CM connection to a local RDMA
2150 device. This could be a hostname or an IPv4 or IPv6 address. On the
2151 server side this will be passed into the rdma_bind_addr() function and
2152 on the client site it will be used in the rdma_resolve_add()
2153 function. This can be useful when multiple paths exist between the
2154 client and the server or in certain loopback configurations.
2155 .TP
2156 .BI (filestat)stat_type \fR=\fPstr
2157 Specify stat system call type to measure lookup/getattr performance.
2158 Default is \fBstat\fR for \fBstat\fR\|(2).
2159 .TP
2160 .BI (sg)hipri
2161 If this option is set, fio will attempt to use polled IO completions. This
2162 will have a similar effect as (io_uring)hipri. Only SCSI READ and WRITE
2163 commands will have the SGV4_FLAG_HIPRI set (not UNMAP (trim) nor VERIFY).
2164 Older versions of the Linux sg driver that do not support hipri will simply
2165 ignore this flag and do normal IO. The Linux SCSI Low Level Driver (LLD)
2166 that "owns" the device also needs to support hipri (also known as iopoll
2167 and mq_poll). The MegaRAID driver is an example of a SCSI LLD.
2168 Default: clear (0) which does normal (interrupted based) IO.
2169 .TP
2170 .BI (sg)readfua \fR=\fPbool
2171 With readfua option set to 1, read operations include the force
2172 unit access (fua) flag. Default: 0.
2173 .TP
2174 .BI (sg)writefua \fR=\fPbool
2175 With writefua option set to 1, write operations include the force
2176 unit access (fua) flag. Default: 0.
2177 .TP
2178 .BI (sg)sg_write_mode \fR=\fPstr
2179 Specify the type of write commands to issue. This option can take three
2180 values:
2181 .RS
2182 .RS
2183 .TP
2184 .B write (default)
2185 Write opcodes are issued as usual
2186 .TP
2187 .B verify
2188 Issue WRITE AND VERIFY commands. The BYTCHK bit is set to 0. This
2189 directs the device to carry out a medium verification with no data
2190 comparison. The writefua option is ignored with this selection.
2191 .TP
2192 .B same
2193 Issue WRITE SAME commands. This transfers a single block to the device
2194 and writes this same block of data to a contiguous sequence of LBAs
2195 beginning at the specified offset. fio's block size parameter
2196 specifies the amount of data written with each command. However, the
2197 amount of data actually transferred to the device is equal to the
2198 device's block (sector) size. For a device with 512 byte sectors,
2199 blocksize=8k will write 16 sectors with each command. fio will still
2200 generate 8k of data for each command butonly the first 512 bytes will
2201 be used and transferred to the device. The writefua option is ignored
2202 with this selection.
2203 .RE
2204 .RE
2205 .TP
2206 .BI (nbd)uri \fR=\fPstr
2207 Specify the NBD URI of the server to test.
2208 The string is a standard NBD URI (see
2209 \fIhttps://github.com/NetworkBlockDevice/nbd/tree/master/doc\fR).
2210 Example URIs:
2211 .RS
2212 .RS
2213 .TP
2214 \fInbd://localhost:10809\fR
2215 .TP
2216 \fInbd+unix:///?socket=/tmp/socket\fR
2217 .TP
2218 \fInbds://tlshost/exportname\fR
2219 .RE
2220 .RE
2221 .TP
2222 .BI (libcufile)gpu_dev_ids\fR=\fPstr
2223 Specify the GPU IDs to use with CUDA. This is a colon-separated list of int.
2224 GPUs are assigned to workers roundrobin. Default is 0.
2225 .TP
2226 .BI (libcufile)cuda_io\fR=\fPstr
2227 Specify the type of I/O to use with CUDA. This option
2228 takes the following values:
2229 .RS
2230 .RS
2231 .TP
2232 .B cufile (default)
2233 Use libcufile and nvidia-fs. This option performs I/O directly
2234 between a GPUDirect Storage filesystem and GPU buffers,
2235 avoiding use of a bounce buffer. If \fBverify\fR is set,
2236 cudaMemcpy is used to copy verification data between RAM and GPU(s).
2237 Verification data is copied from RAM to GPU before a write
2238 and from GPU to RAM after a read.
2239 \fBdirect\fR must be 1.
2240 .TP
2241 .BI posix
2242 Use POSIX to perform I/O with a RAM buffer, and use
2243 cudaMemcpy to transfer data between RAM and the GPU(s).
2244 Data is copied from GPU to RAM before a write and copied
2245 from RAM to GPU after a read. \fBverify\fR does not affect
2246 the use of cudaMemcpy.
2247 .RE
2248 .RE
2249 .TP
2250 .BI (dfs)pool
2251 Specify the UUID of the DAOS pool to connect to.
2252 .TP
2253 .BI (dfs)cont
2254 Specify the UUID of the DAOS DAOS container to open.
2255 .TP
2256 .BI (dfs)chunk_size
2257 Specificy a different chunk size (in bytes) for the dfs file.
2258 Use DAOS container's chunk size by default.
2259 .TP
2260 .BI (dfs)object_class
2261 Specificy a different object class for the dfs file.
2262 Use DAOS container's object class by default.
2263 .SS "I/O depth"
2264 .TP
2265 .BI iodepth \fR=\fPint
2266 Number of I/O units to keep in flight against the file. Note that
2267 increasing \fBiodepth\fR beyond 1 will not affect synchronous ioengines (except
2268 for small degrees when \fBverify_async\fR is in use). Even async
2269 engines may impose OS restrictions causing the desired depth not to be
2270 achieved. This may happen on Linux when using libaio and not setting
2271 `direct=1', since buffered I/O is not async on that OS. Keep an
2272 eye on the I/O depth distribution in the fio output to verify that the
2273 achieved depth is as expected. Default: 1.
2274 .TP
2275 .BI iodepth_batch_submit \fR=\fPint "\fR,\fP iodepth_batch" \fR=\fPint
2276 This defines how many pieces of I/O to submit at once. It defaults to 1
2277 which means that we submit each I/O as soon as it is available, but can be
2278 raised to submit bigger batches of I/O at the time. If it is set to 0 the
2279 \fBiodepth\fR value will be used.
2280 .TP
2281 .BI iodepth_batch_complete_min \fR=\fPint "\fR,\fP iodepth_batch_complete" \fR=\fPint
2282 This defines how many pieces of I/O to retrieve at once. It defaults to 1
2283 which means that we'll ask for a minimum of 1 I/O in the retrieval process
2284 from the kernel. The I/O retrieval will go on until we hit the limit set by
2285 \fBiodepth_low\fR. If this variable is set to 0, then fio will always
2286 check for completed events before queuing more I/O. This helps reduce I/O
2287 latency, at the cost of more retrieval system calls.
2288 .TP
2289 .BI iodepth_batch_complete_max \fR=\fPint
2290 This defines maximum pieces of I/O to retrieve at once. This variable should
2291 be used along with \fBiodepth_batch_complete_min\fR=\fIint\fR variable,
2292 specifying the range of min and max amount of I/O which should be
2293 retrieved. By default it is equal to \fBiodepth_batch_complete_min\fR
2294 value. Example #1:
2295 .RS
2296 .RS
2297 .P
2298 .PD 0
2299 iodepth_batch_complete_min=1
2300 .P
2301 iodepth_batch_complete_max=<iodepth>
2302 .PD
2303 .RE
2304 .P
2305 which means that we will retrieve at least 1 I/O and up to the whole
2306 submitted queue depth. If none of I/O has been completed yet, we will wait.
2307 Example #2:
2308 .RS
2309 .P
2310 .PD 0
2311 iodepth_batch_complete_min=0
2312 .P
2313 iodepth_batch_complete_max=<iodepth>
2314 .PD
2315 .RE
2316 .P
2317 which means that we can retrieve up to the whole submitted queue depth, but
2318 if none of I/O has been completed yet, we will NOT wait and immediately exit
2319 the system call. In this example we simply do polling.
2320 .RE
2321 .TP
2322 .BI iodepth_low \fR=\fPint
2323 The low water mark indicating when to start filling the queue
2324 again. Defaults to the same as \fBiodepth\fR, meaning that fio will
2325 attempt to keep the queue full at all times. If \fBiodepth\fR is set to
2326 e.g. 16 and \fBiodepth_low\fR is set to 4, then after fio has filled the queue of
2327 16 requests, it will let the depth drain down to 4 before starting to fill
2328 it again.
2329 .TP
2330 .BI serialize_overlap \fR=\fPbool
2331 Serialize in-flight I/Os that might otherwise cause or suffer from data races.
2332 When two or more I/Os are submitted simultaneously, there is no guarantee that
2333 the I/Os will be processed or completed in the submitted order. Further, if
2334 two or more of those I/Os are writes, any overlapping region between them can
2335 become indeterminate/undefined on certain storage. These issues can cause
2336 verification to fail erratically when at least one of the racing I/Os is
2337 changing data and the overlapping region has a non-zero size. Setting
2338 \fBserialize_overlap\fR tells fio to avoid provoking this behavior by explicitly
2339 serializing in-flight I/Os that have a non-zero overlap. Note that setting
2340 this option can reduce both performance and the \fBiodepth\fR achieved.
2341 .RS
2342 .P
2343 This option only applies to I/Os issued for a single job except when it is
2344 enabled along with \fBio_submit_mode\fR=offload. In offload mode, fio
2345 will check for overlap among all I/Os submitted by offload jobs with \fBserialize_overlap\fR
2346 enabled.
2347 .P
2348 Default: false.
2349 .RE
2350 .TP
2351 .BI io_submit_mode \fR=\fPstr
2352 This option controls how fio submits the I/O to the I/O engine. The default
2353 is `inline', which means that the fio job threads submit and reap I/O
2354 directly. If set to `offload', the job threads will offload I/O submission
2355 to a dedicated pool of I/O threads. This requires some coordination and thus
2356 has a bit of extra overhead, especially for lower queue depth I/O where it
2357 can increase latencies. The benefit is that fio can manage submission rates
2358 independently of the device completion rates. This avoids skewed latency
2359 reporting if I/O gets backed up on the device side (the coordinated omission
2360 problem). Note that this option cannot reliably be used with async IO engines.
2361 .SS "I/O rate"
2362 .TP
2363 .BI thinktime \fR=\fPtime
2364 Stall the job for the specified period of time after an I/O has completed before issuing the
2365 next. May be used to simulate processing being done by an application.
2366 When the unit is omitted, the value is interpreted in microseconds. See
2367 \fBthinktime_blocks\fR and \fBthinktime_spin\fR.
2368 .TP
2369 .BI thinktime_spin \fR=\fPtime
2370 Only valid if \fBthinktime\fR is set - pretend to spend CPU time doing
2371 something with the data received, before falling back to sleeping for the
2372 rest of the period specified by \fBthinktime\fR. When the unit is
2373 omitted, the value is interpreted in microseconds.
2374 .TP
2375 .BI thinktime_blocks \fR=\fPint
2376 Only valid if \fBthinktime\fR is set - control how many blocks to issue,
2377 before waiting \fBthinktime\fR usecs. If not set, defaults to 1 which will make
2378 fio wait \fBthinktime\fR usecs after every block. This effectively makes any
2379 queue depth setting redundant, since no more than 1 I/O will be queued
2380 before we have to complete it and do our \fBthinktime\fR. In other words, this
2381 setting effectively caps the queue depth if the latter is larger.
2382 .TP
2383 .BI thinktime_blocks_type \fR=\fPstr
2384 Only valid if \fBthinktime\fR is set - control how \fBthinktime_blocks\fR triggers.
2385 The default is `complete', which triggers \fBthinktime\fR when fio completes
2386 \fBthinktime_blocks\fR blocks. If this is set to `issue', then the trigger happens
2387 at the issue side.
2388 .TP
2389 .BI rate \fR=\fPint[,int][,int]
2390 Cap the bandwidth used by this job. The number is in bytes/sec, the normal
2391 suffix rules apply. Comma-separated values may be specified for reads,
2392 writes, and trims as described in \fBblocksize\fR.
2393 .RS
2394 .P
2395 For example, using `rate=1m,500k' would limit reads to 1MiB/sec and writes to
2396 500KiB/sec. Capping only reads or writes can be done with `rate=,500k' or
2397 `rate=500k,' where the former will only limit writes (to 500KiB/sec) and the
2398 latter will only limit reads.
2399 .RE
2400 .TP
2401 .BI rate_min \fR=\fPint[,int][,int]
2402 Tell fio to do whatever it can to maintain at least this bandwidth. Failing
2403 to meet this requirement will cause the job to exit. Comma-separated values
2404 may be specified for reads, writes, and trims as described in
2405 \fBblocksize\fR.
2406 .TP
2407 .BI rate_iops \fR=\fPint[,int][,int]
2408 Cap the bandwidth to this number of IOPS. Basically the same as
2409 \fBrate\fR, just specified independently of bandwidth. If the job is
2410 given a block size range instead of a fixed value, the smallest block size
2411 is used as the metric. Comma-separated values may be specified for reads,
2412 writes, and trims as described in \fBblocksize\fR.
2413 .TP
2414 .BI rate_iops_min \fR=\fPint[,int][,int]
2415 If fio doesn't meet this rate of I/O, it will cause the job to exit.
2416 Comma-separated values may be specified for reads, writes, and trims as
2417 described in \fBblocksize\fR.
2418 .TP
2419 .BI rate_process \fR=\fPstr
2420 This option controls how fio manages rated I/O submissions. The default is
2421 `linear', which submits I/O in a linear fashion with fixed delays between
2422 I/Os that gets adjusted based on I/O completion rates. If this is set to
2423 `poisson', fio will submit I/O based on a more real world random request
2424 flow, known as the Poisson process
2425 (\fIhttps://en.wikipedia.org/wiki/Poisson_point_process\fR). The lambda will be
2426 10^6 / IOPS for the given workload.
2427 .TP
2428 .BI rate_ignore_thinktime \fR=\fPbool
2429 By default, fio will attempt to catch up to the specified rate setting, if any
2430 kind of thinktime setting was used. If this option is set, then fio will
2431 ignore the thinktime and continue doing IO at the specified rate, instead of
2432 entering a catch-up mode after thinktime is done.
2433 .SS "I/O latency"
2434 .TP
2435 .BI latency_target \fR=\fPtime
2436 If set, fio will attempt to find the max performance point that the given
2437 workload will run at while maintaining a latency below this target. When
2438 the unit is omitted, the value is interpreted in microseconds. See
2439 \fBlatency_window\fR and \fBlatency_percentile\fR.
2440 .TP
2441 .BI latency_window \fR=\fPtime
2442 Used with \fBlatency_target\fR to specify the sample window that the job
2443 is run at varying queue depths to test the performance. When the unit is
2444 omitted, the value is interpreted in microseconds.
2445 .TP
2446 .BI latency_percentile \fR=\fPfloat
2447 The percentage of I/Os that must fall within the criteria specified by
2448 \fBlatency_target\fR and \fBlatency_window\fR. If not set, this
2449 defaults to 100.0, meaning that all I/Os must be equal or below to the value
2450 set by \fBlatency_target\fR.
2451 .TP
2452 .BI latency_run \fR=\fPbool
2453 Used with \fBlatency_target\fR. If false (default), fio will find the highest
2454 queue depth that meets \fBlatency_target\fR and exit. If true, fio will continue
2455 running and try to meet \fBlatency_target\fR by adjusting queue depth.
2456 .TP
2457 .BI max_latency \fR=\fPtime[,time][,time]
2458 If set, fio will exit the job with an ETIMEDOUT error if it exceeds this
2459 maximum latency. When the unit is omitted, the value is interpreted in
2460 microseconds. Comma-separated values may be specified for reads, writes,
2461 and trims as described in \fBblocksize\fR.
2462 .TP
2463 .BI rate_cycle \fR=\fPint
2464 Average bandwidth for \fBrate\fR and \fBrate_min\fR over this number
2465 of milliseconds. Defaults to 1000.
2466 .SS "I/O replay"
2467 .TP
2468 .BI write_iolog \fR=\fPstr
2469 Write the issued I/O patterns to the specified file. See
2470 \fBread_iolog\fR. Specify a separate file for each job, otherwise the
2471 iologs will be interspersed and the file may be corrupt.
2472 .TP
2473 .BI read_iolog \fR=\fPstr
2474 Open an iolog with the specified filename and replay the I/O patterns it
2475 contains. This can be used to store a workload and replay it sometime
2476 later. The iolog given may also be a blktrace binary file, which allows fio
2477 to replay a workload captured by blktrace. See
2478 \fBblktrace\fR\|(8) for how to capture such logging data. For blktrace
2479 replay, the file needs to be turned into a blkparse binary data file first
2480 (`blkparse <device> \-o /dev/null \-d file_for_fio.bin').
2481 You can specify a number of files by separating the names with a ':' character.
2482 See the \fBfilename\fR option for information on how to escape ':'
2483 characters within the file names. These files will be sequentially assigned to
2484 job clones created by \fBnumjobs\fR. '-' is a reserved name, meaning read from
2485 stdin, notably if \fBfilename\fR is set to '-' which means stdin as well,
2486 then this flag can't be set to '-'.
2487 .TP
2488 .BI read_iolog_chunked \fR=\fPbool
2489 Determines how iolog is read. If false (default) entire \fBread_iolog\fR will
2490 be read at once. If selected true, input from iolog will be read gradually.
2491 Useful when iolog is very large, or it is generated.
2492 .TP
2493 .BI merge_blktrace_file \fR=\fPstr
2494 When specified, rather than replaying the logs passed to \fBread_iolog\fR,
2495 the logs go through a merge phase which aggregates them into a single blktrace.
2496 The resulting file is then passed on as the \fBread_iolog\fR parameter. The
2497 intention here is to make the order of events consistent. This limits the
2498 influence of the scheduler compared to replaying multiple blktraces via
2499 concurrent jobs.
2500 .TP
2501 .BI merge_blktrace_scalars \fR=\fPfloat_list
2502 This is a percentage based option that is index paired with the list of files
2503 passed to \fBread_iolog\fR. When merging is performed, scale the time of each
2504 event by the corresponding amount. For example,
2505 `\-\-merge_blktrace_scalars="50:100"' runs the first trace in halftime and the
2506 second trace in realtime. This knob is separately tunable from
2507 \fBreplay_time_scale\fR which scales the trace during runtime and will not
2508 change the output of the merge unlike this option.
2509 .TP
2510 .BI merge_blktrace_iters \fR=\fPfloat_list
2511 This is a whole number option that is index paired with the list of files
2512 passed to \fBread_iolog\fR. When merging is performed, run each trace for
2513 the specified number of iterations. For example,
2514 `\-\-merge_blktrace_iters="2:1"' runs the first trace for two iterations
2515 and the second trace for one iteration.
2516 .TP
2517 .BI replay_no_stall \fR=\fPbool
2518 When replaying I/O with \fBread_iolog\fR the default behavior is to
2519 attempt to respect the timestamps within the log and replay them with the
2520 appropriate delay between IOPS. By setting this variable fio will not
2521 respect the timestamps and attempt to replay them as fast as possible while
2522 still respecting ordering. The result is the same I/O pattern to a given
2523 device, but different timings.
2524 .TP
2525 .BI replay_time_scale \fR=\fPint
2526 When replaying I/O with \fBread_iolog\fR, fio will honor the original timing
2527 in the trace. With this option, it's possible to scale the time. It's a
2528 percentage option, if set to 50 it means run at 50% the original IO rate in
2529 the trace. If set to 200, run at twice the original IO rate. Defaults to 100.
2530 .TP
2531 .BI replay_redirect \fR=\fPstr
2532 While replaying I/O patterns using \fBread_iolog\fR the default behavior
2533 is to replay the IOPS onto the major/minor device that each IOP was recorded
2534 from. This is sometimes undesirable because on a different machine those
2535 major/minor numbers can map to a different device. Changing hardware on the
2536 same system can also result in a different major/minor mapping.
2537 \fBreplay_redirect\fR causes all I/Os to be replayed onto the single specified
2538 device regardless of the device it was recorded
2539 from. i.e. `replay_redirect=/dev/sdc' would cause all I/O
2540 in the blktrace or iolog to be replayed onto `/dev/sdc'. This means
2541 multiple devices will be replayed onto a single device, if the trace
2542 contains multiple devices. If you want multiple devices to be replayed
2543 concurrently to multiple redirected devices you must blkparse your trace
2544 into separate traces and replay them with independent fio invocations.
2545 Unfortunately this also breaks the strict time ordering between multiple
2546 device accesses.
2547 .TP
2548 .BI replay_align \fR=\fPint
2549 Force alignment of the byte offsets in a trace to this value. The value
2550 must be a power of 2.
2551 .TP
2552 .BI replay_scale \fR=\fPint
2553 Scale bye offsets down by this factor when replaying traces. Should most
2554 likely use \fBreplay_align\fR as well.
2555 .SS "Threads, processes and job synchronization"
2556 .TP
2557 .BI replay_skip \fR=\fPstr
2558 Sometimes it's useful to skip certain IO types in a replay trace. This could
2559 be, for instance, eliminating the writes in the trace. Or not replaying the
2560 trims/discards, if you are redirecting to a device that doesn't support them.
2561 This option takes a comma separated list of read, write, trim, sync.
2562 .TP
2563 .BI thread
2564 Fio defaults to creating jobs by using fork, however if this option is
2565 given, fio will create jobs by using POSIX Threads' function
2566 \fBpthread_create\fR\|(3) to create threads instead.
2567 .TP
2568 .BI wait_for \fR=\fPstr
2569 If set, the current job won't be started until all workers of the specified
2570 waitee job are done.
2571 .\" ignore blank line here from HOWTO as it looks normal without it
2572 \fBwait_for\fR operates on the job name basis, so there are a few
2573 limitations. First, the waitee must be defined prior to the waiter job
2574 (meaning no forward references). Second, if a job is being referenced as a
2575 waitee, it must have a unique name (no duplicate waitees).
2576 .TP
2577 .BI nice \fR=\fPint
2578 Run the job with the given nice value. See man \fBnice\fR\|(2).
2579 .\" ignore blank line here from HOWTO as it looks normal without it
2580 On Windows, values less than \-15 set the process class to "High"; \-1 through
2581 \-15 set "Above Normal"; 1 through 15 "Below Normal"; and above 15 "Idle"
2582 priority class.
2583 .TP
2584 .BI prio \fR=\fPint
2585 Set the I/O priority value of this job. Linux limits us to a positive value
2586 between 0 and 7, with 0 being the highest. See man
2587 \fBionice\fR\|(1). Refer to an appropriate manpage for other operating
2588 systems since meaning of priority may differ. For per-command priority
2589 setting, see I/O engine specific `cmdprio_percentage` and `hipri_percentage`
2590 options.
2591 .TP
2592 .BI prioclass \fR=\fPint
2593 Set the I/O priority class. See man \fBionice\fR\|(1). For per-command
2594 priority setting, see I/O engine specific `cmdprio_percentage` and `hipri_percent`
2595 options.
2596 .TP
2597 .BI cpus_allowed \fR=\fPstr
2598 Controls the same options as \fBcpumask\fR, but accepts a textual
2599 specification of the permitted CPUs instead and CPUs are indexed from 0. So
2600 to use CPUs 0 and 5 you would specify `cpus_allowed=0,5'. This option also
2601 allows a range of CPUs to be specified \-\- say you wanted a binding to CPUs
2602 0, 5, and 8 to 15, you would set `cpus_allowed=0,5,8\-15'.
2603 .RS
2604 .P
2605 On Windows, when `cpus_allowed' is unset only CPUs from fio's current
2606 processor group will be used and affinity settings are inherited from the
2607 system. An fio build configured to target Windows 7 makes options that set
2608 CPUs processor group aware and values will set both the processor group
2609 and a CPU from within that group. For example, on a system where processor
2610 group 0 has 40 CPUs and processor group 1 has 32 CPUs, `cpus_allowed'
2611 values between 0 and 39 will bind CPUs from processor group 0 and
2612 `cpus_allowed' values between 40 and 71 will bind CPUs from processor
2613 group 1. When using `cpus_allowed_policy=shared' all CPUs specified by a
2614 single `cpus_allowed' option must be from the same processor group. For
2615 Windows fio builds not built for Windows 7, CPUs will only be selected from
2616 (and be relative to) whatever processor group fio happens to be running in
2617 and CPUs from other processor groups cannot be used.
2618 .RE
2619 .TP
2620 .BI cpus_allowed_policy \fR=\fPstr
2621 Set the policy of how fio distributes the CPUs specified by
2622 \fBcpus_allowed\fR or \fBcpumask\fR. Two policies are supported:
2623 .RS
2624 .RS
2625 .TP
2626 .B shared
2627 All jobs will share the CPU set specified.
2628 .TP
2629 .B split
2630 Each job will get a unique CPU from the CPU set.
2631 .RE
2632 .P
2633 \fBshared\fR is the default behavior, if the option isn't specified. If
2634 \fBsplit\fR is specified, then fio will assign one cpu per job. If not
2635 enough CPUs are given for the jobs listed, then fio will roundrobin the CPUs
2636 in the set.
2637 .RE
2638 .TP
2639 .BI cpumask \fR=\fPint
2640 Set the CPU affinity of this job. The parameter given is a bit mask of
2641 allowed CPUs the job may run on. So if you want the allowed CPUs to be 1
2642 and 5, you would pass the decimal value of (1 << 1 | 1 << 5), or 34. See man
2643 \fBsched_setaffinity\fR\|(2). This may not work on all supported
2644 operating systems or kernel versions. This option doesn't work well for a
2645 higher CPU count than what you can store in an integer mask, so it can only
2646 control cpus 1\-32. For boxes with larger CPU counts, use
2647 \fBcpus_allowed\fR.
2648 .TP
2649 .BI numa_cpu_nodes \fR=\fPstr
2650 Set this job running on specified NUMA nodes' CPUs. The arguments allow
2651 comma delimited list of cpu numbers, A\-B ranges, or `all'. Note, to enable
2652 NUMA options support, fio must be built on a system with libnuma\-dev(el)
2653 installed.
2654 .TP
2655 .BI numa_mem_policy \fR=\fPstr
2656 Set this job's memory policy and corresponding NUMA nodes. Format of the
2657 arguments:
2658 .RS
2659 .RS
2660 .P
2661 <mode>[:<nodelist>]
2662 .RE
2663 .P
2664 `mode' is one of the following memory policies: `default', `prefer',
2665 `bind', `interleave' or `local'. For `default' and `local' memory
2666 policies, no node needs to be specified. For `prefer', only one node is
2667 allowed. For `bind' and `interleave' the `nodelist' may be as
2668 follows: a comma delimited list of numbers, A\-B ranges, or `all'.
2669 .RE
2670 .TP
2671 .BI cgroup \fR=\fPstr
2672 Add job to this control group. If it doesn't exist, it will be created. The
2673 system must have a mounted cgroup blkio mount point for this to work. If
2674 your system doesn't have it mounted, you can do so with:
2675 .RS
2676 .RS
2677 .P
2678 # mount \-t cgroup \-o blkio none /cgroup
2679 .RE
2680 .RE
2681 .TP
2682 .BI cgroup_weight \fR=\fPint
2683 Set the weight of the cgroup to this value. See the documentation that comes
2684 with the kernel, allowed values are in the range of 100..1000.
2685 .TP
2686 .BI cgroup_nodelete \fR=\fPbool
2687 Normally fio will delete the cgroups it has created after the job
2688 completion. To override this behavior and to leave cgroups around after the
2689 job completion, set `cgroup_nodelete=1'. This can be useful if one wants
2690 to inspect various cgroup files after job completion. Default: false.
2691 .TP
2692 .BI flow_id \fR=\fPint
2693 The ID of the flow. If not specified, it defaults to being a global
2694 flow. See \fBflow\fR.
2695 .TP
2696 .BI flow \fR=\fPint
2697 Weight in token-based flow control. If this value is used,
2698 then fio regulates the activity between two or more jobs
2699 sharing the same flow_id.
2700 Fio attempts to keep each job activity proportional to other jobs' activities
2701 in the same flow_id group, with respect to requested weight per job.
2702 That is, if one job has `flow=3', another job has `flow=2'
2703 and another with `flow=1`, then there will be a roughly 3:2:1 ratio
2704 in how much one runs vs the others.
2705 .TP
2706 .BI flow_sleep \fR=\fPint
2707 The period of time, in microseconds, to wait after the flow counter
2708 has exceeded its proportion before retrying operations.
2709 .TP
2710 .BI stonewall "\fR,\fB wait_for_previous"
2711 Wait for preceding jobs in the job file to exit, before starting this
2712 one. Can be used to insert serialization points in the job file. A stone
2713 wall also implies starting a new reporting group, see
2714 \fBgroup_reporting\fR. Optionally you can use `stonewall=0` to disable or
2715 `stonewall=1` to enable it.
2716 .TP
2717 .BI exitall
2718 By default, fio will continue running all other jobs when one job finishes.
2719 Sometimes this is not the desired action. Setting \fBexitall\fR will instead
2720 make fio terminate all jobs in the same group, as soon as one job of that
2721 group finishes.
2722 .TP
2723 .BI exit_what \fR=\fPstr
2724 By default, fio will continue running all other jobs when one job finishes.
2725 Sometimes this is not the desired action. Setting \fBexitall\fR will instead
2726 make fio terminate all jobs in the same group. The option \fBexit_what\fR
2727 allows you to control which jobs get terminated when \fBexitall\fR is enabled.
2728 The default value is \fBgroup\fR.
2729 The allowed values are:
2730 .RS
2731 .RS
2732 .TP
2733 .B all
2734 terminates all jobs.
2735 .TP
2736 .B group
2737 is the default and does not change the behaviour of \fBexitall\fR.
2738 .TP
2739 .B stonewall
2740 terminates all currently running jobs across all groups and continues
2741 execution with the next stonewalled group.
2742 .RE
2743 .RE
2744 .TP
2745 .BI exec_prerun \fR=\fPstr
2746 Before running this job, issue the command specified through
2747 \fBsystem\fR\|(3). Output is redirected in a file called `jobname.prerun.txt'.
2748 .TP
2749 .BI exec_postrun \fR=\fPstr
2750 After the job completes, issue the command specified though
2751 \fBsystem\fR\|(3). Output is redirected in a file called `jobname.postrun.txt'.
2752 .TP
2753 .BI uid \fR=\fPint
2754 Instead of running as the invoking user, set the user ID to this value
2755 before the thread/process does any work.
2756 .TP
2757 .BI gid \fR=\fPint
2758 Set group ID, see \fBuid\fR.
2759 .SS "Verification"
2760 .TP
2761 .BI verify_only
2762 Do not perform specified workload, only verify data still matches previous
2763 invocation of this workload. This option allows one to check data multiple
2764 times at a later date without overwriting it. This option makes sense only
2765 for workloads that write data, and does not support workloads with the
2766 \fBtime_based\fR option set.
2767 .TP
2768 .BI do_verify \fR=\fPbool
2769 Run the verify phase after a write phase. Only valid if \fBverify\fR is
2770 set. Default: true.
2771 .TP
2772 .BI verify \fR=\fPstr
2773 If writing to a file, fio can verify the file contents after each iteration
2774 of the job. Each verification method also implies verification of special
2775 header, which is written to the beginning of each block. This header also
2776 includes meta information, like offset of the block, block number, timestamp
2777 when block was written, etc. \fBverify\fR can be combined with
2778 \fBverify_pattern\fR option. The allowed values are:
2779 .RS
2780 .RS
2781 .TP
2782 .B md5
2783 Use an md5 sum of the data area and store it in the header of
2784 each block.
2785 .TP
2786 .B crc64
2787 Use an experimental crc64 sum of the data area and store it in the
2788 header of each block.
2789 .TP
2790 .B crc32c
2791 Use a crc32c sum of the data area and store it in the header of
2792 each block. This will automatically use hardware acceleration
2793 (e.g. SSE4.2 on an x86 or CRC crypto extensions on ARM64) but will
2794 fall back to software crc32c if none is found. Generally the
2795 fastest checksum fio supports when hardware accelerated.
2796 .TP
2797 .B crc32c\-intel
2798 Synonym for crc32c.
2799 .TP
2800 .B crc32
2801 Use a crc32 sum of the data area and store it in the header of each
2802 block.
2803 .TP
2804 .B crc16
2805 Use a crc16 sum of the data area and store it in the header of each
2806 block.
2807 .TP
2808 .B crc7
2809 Use a crc7 sum of the data area and store it in the header of each
2810 block.
2811 .TP
2812 .B xxhash
2813 Use xxhash as the checksum function. Generally the fastest software
2814 checksum that fio supports.
2815 .TP
2816 .B sha512
2817 Use sha512 as the checksum function.
2818 .TP
2819 .B sha256
2820 Use sha256 as the checksum function.
2821 .TP
2822 .B sha1
2823 Use optimized sha1 as the checksum function.
2824 .TP
2825 .B sha3\-224
2826 Use optimized sha3\-224 as the checksum function.
2827 .TP
2828 .B sha3\-256
2829 Use optimized sha3\-256 as the checksum function.
2830 .TP
2831 .B sha3\-384
2832 Use optimized sha3\-384 as the checksum function.
2833 .TP
2834 .B sha3\-512
2835 Use optimized sha3\-512 as the checksum function.
2836 .TP
2837 .B meta
2838 This option is deprecated, since now meta information is included in
2839 generic verification header and meta verification happens by
2840 default. For detailed information see the description of the
2841 \fBverify\fR setting. This option is kept because of
2842 compatibility's sake with old configurations. Do not use it.
2843 .TP
2844 .B pattern
2845 Verify a strict pattern. Normally fio includes a header with some
2846 basic information and checksumming, but if this option is set, only
2847 the specific pattern set with \fBverify_pattern\fR is verified.
2848 .TP
2849 .B null
2850 Only pretend to verify. Useful for testing internals with
2851 `ioengine=null', not for much else.
2852 .RE
2853 .P
2854 This option can be used for repeated burn\-in tests of a system to make sure
2855 that the written data is also correctly read back. If the data direction
2856 given is a read or random read, fio will assume that it should verify a
2857 previously written file. If the data direction includes any form of write,
2858 the verify will be of the newly written data.
2859 .P
2860 To avoid false verification errors, do not use the norandommap option when
2861 verifying data with async I/O engines and I/O depths > 1.  Or use the
2862 norandommap and the lfsr random generator together to avoid writing to the
2863 same offset with muliple outstanding I/Os.
2864 .RE
2865 .TP
2866 .BI verify_offset \fR=\fPint
2867 Swap the verification header with data somewhere else in the block before
2868 writing. It is swapped back before verifying.
2869 .TP
2870 .BI verify_interval \fR=\fPint
2871 Write the verification header at a finer granularity than the
2872 \fBblocksize\fR. It will be written for chunks the size of
2873 \fBverify_interval\fR. \fBblocksize\fR should divide this evenly.
2874 .TP
2875 .BI verify_pattern \fR=\fPstr
2876 If set, fio will fill the I/O buffers with this pattern. Fio defaults to
2877 filling with totally random bytes, but sometimes it's interesting to fill
2878 with a known pattern for I/O verification purposes. Depending on the width
2879 of the pattern, fio will fill 1/2/3/4 bytes of the buffer at the time (it can
2880 be either a decimal or a hex number). The \fBverify_pattern\fR if larger than
2881 a 32\-bit quantity has to be a hex number that starts with either "0x" or
2882 "0X". Use with \fBverify\fR. Also, \fBverify_pattern\fR supports %o
2883 format, which means that for each block offset will be written and then
2884 verified back, e.g.:
2885 .RS
2886 .RS
2887 .P
2888 verify_pattern=%o
2889 .RE
2890 .P
2891 Or use combination of everything:
2892 .RS
2893 .P
2894 verify_pattern=0xff%o"abcd"\-12
2895 .RE
2896 .RE
2897 .TP
2898 .BI verify_fatal \fR=\fPbool
2899 Normally fio will keep checking the entire contents before quitting on a
2900 block verification failure. If this option is set, fio will exit the job on
2901 the first observed failure. Default: false.
2902 .TP
2903 .BI verify_dump \fR=\fPbool
2904 If set, dump the contents of both the original data block and the data block
2905 we read off disk to files. This allows later analysis to inspect just what
2906 kind of data corruption occurred. Off by default.
2907 .TP
2908 .BI verify_async \fR=\fPint
2909 Fio will normally verify I/O inline from the submitting thread. This option
2910 takes an integer describing how many async offload threads to create for I/O
2911 verification instead, causing fio to offload the duty of verifying I/O
2912 contents to one or more separate threads. If using this offload option, even
2913 sync I/O engines can benefit from using an \fBiodepth\fR setting higher
2914 than 1, as it allows them to have I/O in flight while verifies are running.
2915 Defaults to 0 async threads, i.e. verification is not asynchronous.
2916 .TP
2917 .BI verify_async_cpus \fR=\fPstr
2918 Tell fio to set the given CPU affinity on the async I/O verification
2919 threads. See \fBcpus_allowed\fR for the format used.
2920 .TP
2921 .BI verify_backlog \fR=\fPint
2922 Fio will normally verify the written contents of a job that utilizes verify
2923 once that job has completed. In other words, everything is written then
2924 everything is read back and verified. You may want to verify continually
2925 instead for a variety of reasons. Fio stores the meta data associated with
2926 an I/O block in memory, so for large verify workloads, quite a bit of memory
2927 would be used up holding this meta data. If this option is enabled, fio will
2928 write only N blocks before verifying these blocks.
2929 .TP
2930 .BI verify_backlog_batch \fR=\fPint
2931 Control how many blocks fio will verify if \fBverify_backlog\fR is
2932 set. If not set, will default to the value of \fBverify_backlog\fR
2933 (meaning the entire queue is read back and verified). If
2934 \fBverify_backlog_batch\fR is less than \fBverify_backlog\fR then not all
2935 blocks will be verified, if \fBverify_backlog_batch\fR is larger than
2936 \fBverify_backlog\fR, some blocks will be verified more than once.
2937 .TP
2938 .BI verify_state_save \fR=\fPbool
2939 When a job exits during the write phase of a verify workload, save its
2940 current state. This allows fio to replay up until that point, if the verify
2941 state is loaded for the verify read phase. The format of the filename is,
2942 roughly:
2943 .RS
2944 .RS
2945 .P
2946 <type>\-<jobname>\-<jobindex>\-verify.state.
2947 .RE
2948 .P
2949 <type> is "local" for a local run, "sock" for a client/server socket
2950 connection, and "ip" (192.168.0.1, for instance) for a networked
2951 client/server connection. Defaults to true.
2952 .RE
2953 .TP
2954 .BI verify_state_load \fR=\fPbool
2955 If a verify termination trigger was used, fio stores the current write state
2956 of each thread. This can be used at verification time so that fio knows how
2957 far it should verify. Without this information, fio will run a full
2958 verification pass, according to the settings in the job file used. Default
2959 false.
2960 .TP
2961 .BI trim_percentage \fR=\fPint
2962 Number of verify blocks to discard/trim.
2963 .TP
2964 .BI trim_verify_zero \fR=\fPbool
2965 Verify that trim/discarded blocks are returned as zeros.
2966 .TP
2967 .BI trim_backlog \fR=\fPint
2968 Verify that trim/discarded blocks are returned as zeros.
2969 .TP
2970 .BI trim_backlog_batch \fR=\fPint
2971 Trim this number of I/O blocks.
2972 .TP
2973 .BI experimental_verify \fR=\fPbool
2974 Enable experimental verification.
2975 .SS "Steady state"
2976 .TP
2977 .BI steadystate \fR=\fPstr:float "\fR,\fP ss" \fR=\fPstr:float
2978 Define the criterion and limit for assessing steady state performance. The
2979 first parameter designates the criterion whereas the second parameter sets
2980 the threshold. When the criterion falls below the threshold for the
2981 specified duration, the job will stop. For example, `iops_slope:0.1%' will
2982 direct fio to terminate the job when the least squares regression slope
2983 falls below 0.1% of the mean IOPS. If \fBgroup_reporting\fR is enabled
2984 this will apply to all jobs in the group. Below is the list of available
2985 steady state assessment criteria. All assessments are carried out using only
2986 data from the rolling collection window. Threshold limits can be expressed
2987 as a fixed value or as a percentage of the mean in the collection window.
2988 .RS
2989 .P
2990 When using this feature, most jobs should include the \fBtime_based\fR
2991 and \fBruntime\fR options or the \fBloops\fR option so that fio does not
2992 stop running after it has covered the full size of the specified file(s)
2993 or device(s).
2994 .RS
2995 .RS
2996 .TP
2997 .B iops
2998 Collect IOPS data. Stop the job if all individual IOPS measurements
2999 are within the specified limit of the mean IOPS (e.g., `iops:2'
3000 means that all individual IOPS values must be within 2 of the mean,
3001 whereas `iops:0.2%' means that all individual IOPS values must be
3002 within 0.2% of the mean IOPS to terminate the job).
3003 .TP
3004 .B iops_slope
3005 Collect IOPS data and calculate the least squares regression
3006 slope. Stop the job if the slope falls below the specified limit.
3007 .TP
3008 .B bw
3009 Collect bandwidth data. Stop the job if all individual bandwidth
3010 measurements are within the specified limit of the mean bandwidth.
3011 .TP
3012 .B bw_slope
3013 Collect bandwidth data and calculate the least squares regression
3014 slope. Stop the job if the slope falls below the specified limit.
3015 .RE
3016 .RE
3017 .TP
3018 .BI steadystate_duration \fR=\fPtime "\fR,\fP ss_dur" \fR=\fPtime
3019 A rolling window of this duration will be used to judge whether steady state
3020 has been reached. Data will be collected once per second. The default is 0
3021 which disables steady state detection. When the unit is omitted, the
3022 value is interpreted in seconds.
3023 .TP
3024 .BI steadystate_ramp_time \fR=\fPtime "\fR,\fP ss_ramp" \fR=\fPtime
3025 Allow the job to run for the specified duration before beginning data
3026 collection for checking the steady state job termination criterion. The
3027 default is 0. When the unit is omitted, the value is interpreted in seconds.
3028 .SS "Measurements and reporting"
3029 .TP
3030 .BI per_job_logs \fR=\fPbool
3031 If set, this generates bw/clat/iops log with per file private filenames. If
3032 not set, jobs with identical names will share the log filename. Default:
3033 true.
3034 .TP
3035 .BI group_reporting
3036 It may sometimes be interesting to display statistics for groups of jobs as
3037 a whole instead of for each individual job. This is especially true if
3038 \fBnumjobs\fR is used; looking at individual thread/process output
3039 quickly becomes unwieldy. To see the final report per-group instead of
3040 per-job, use \fBgroup_reporting\fR. Jobs in a file will be part of the
3041 same reporting group, unless if separated by a \fBstonewall\fR, or by
3042 using \fBnew_group\fR.
3043 .TP
3044 .BI new_group
3045 Start a new reporting group. See: \fBgroup_reporting\fR. If not given,
3046 all jobs in a file will be part of the same reporting group, unless
3047 separated by a \fBstonewall\fR.
3048 .TP
3049 .BI stats \fR=\fPbool
3050 By default, fio collects and shows final output results for all jobs
3051 that run. If this option is set to 0, then fio will ignore it in
3052 the final stat output.
3053 .TP
3054 .BI write_bw_log \fR=\fPstr
3055 If given, write a bandwidth log for this job. Can be used to store data of
3056 the bandwidth of the jobs in their lifetime.
3057 .RS
3058 .P
3059 If no str argument is given, the default filename of
3060 `jobname_type.x.log' is used. Even when the argument is given, fio
3061 will still append the type of log. So if one specifies:
3062 .RS
3063 .P
3064 write_bw_log=foo
3065 .RE
3066 .P
3067 The actual log name will be `foo_bw.x.log' where `x' is the index
3068 of the job (1..N, where N is the number of jobs). If
3069 \fBper_job_logs\fR is false, then the filename will not include the
3070 `.x` job index.
3071 .P
3072 The included \fBfio_generate_plots\fR script uses gnuplot to turn these
3073 text files into nice graphs. See the \fBLOG FILE FORMATS\fR section for how data is
3074 structured within the file.
3075 .RE
3076 .TP
3077 .BI write_lat_log \fR=\fPstr
3078 Same as \fBwrite_bw_log\fR, except this option creates I/O
3079 submission (e.g., `name_slat.x.log'), completion (e.g.,
3080 `name_clat.x.log'), and total (e.g., `name_lat.x.log') latency
3081 files instead. See \fBwrite_bw_log\fR for details about the
3082 filename format and the \fBLOG FILE FORMATS\fR section for how data is structured
3083 within the files.
3084 .TP
3085 .BI write_hist_log \fR=\fPstr
3086 Same as \fBwrite_bw_log\fR but writes an I/O completion latency
3087 histogram file (e.g., `name_hist.x.log') instead. Note that this
3088 file will be empty unless \fBlog_hist_msec\fR has also been set.
3089 See \fBwrite_bw_log\fR for details about the filename format and
3090 the \fBLOG FILE FORMATS\fR section for how data is structured
3091 within the file.
3092 .TP
3093 .BI write_iops_log \fR=\fPstr
3094 Same as \fBwrite_bw_log\fR, but writes an IOPS file (e.g.
3095 `name_iops.x.log`) instead. Because fio defaults to individual
3096 I/O logging, the value entry in the IOPS log will be 1 unless windowed
3097 logging (see \fBlog_avg_msec\fR) has been enabled. See
3098 \fBwrite_bw_log\fR for details about the filename format and \fBLOG
3099 FILE FORMATS\fR for how data is structured within the file.
3100 .TP
3101 .BI log_avg_msec \fR=\fPint
3102 By default, fio will log an entry in the iops, latency, or bw log for every
3103 I/O that completes. When writing to the disk log, that can quickly grow to a
3104 very large size. Setting this option makes fio average the each log entry
3105 over the specified period of time, reducing the resolution of the log. See
3106 \fBlog_max_value\fR as well. Defaults to 0, logging all entries.
3107 Also see \fBLOG FILE FORMATS\fR section.
3108 .TP
3109 .BI log_hist_msec \fR=\fPint
3110 Same as \fBlog_avg_msec\fR, but logs entries for completion latency
3111 histograms. Computing latency percentiles from averages of intervals using
3112 \fBlog_avg_msec\fR is inaccurate. Setting this option makes fio log
3113 histogram entries over the specified period of time, reducing log sizes for
3114 high IOPS devices while retaining percentile accuracy. See
3115 \fBlog_hist_coarseness\fR and \fBwrite_hist_log\fR as well.
3116 Defaults to 0, meaning histogram logging is disabled.
3117 .TP
3118 .BI log_hist_coarseness \fR=\fPint
3119 Integer ranging from 0 to 6, defining the coarseness of the resolution of
3120 the histogram logs enabled with \fBlog_hist_msec\fR. For each increment
3121 in coarseness, fio outputs half as many bins. Defaults to 0, for which
3122 histogram logs contain 1216 latency bins. See \fBLOG FILE FORMATS\fR section.
3123 .TP
3124 .BI log_max_value \fR=\fPbool
3125 If \fBlog_avg_msec\fR is set, fio logs the average over that window. If
3126 you instead want to log the maximum value, set this option to 1. Defaults to
3127 0, meaning that averaged values are logged.
3128 .TP
3129 .BI log_offset \fR=\fPbool
3130 If this is set, the iolog options will include the byte offset for the I/O
3131 entry as well as the other data values. Defaults to 0 meaning that
3132 offsets are not present in logs. Also see \fBLOG FILE FORMATS\fR section.
3133 .TP
3134 .BI log_compression \fR=\fPint
3135 If this is set, fio will compress the I/O logs as it goes, to keep the
3136 memory footprint lower. When a log reaches the specified size, that chunk is
3137 removed and compressed in the background. Given that I/O logs are fairly
3138 highly compressible, this yields a nice memory savings for longer runs. The
3139 downside is that the compression will consume some background CPU cycles, so
3140 it may impact the run. This, however, is also true if the logging ends up
3141 consuming most of the system memory. So pick your poison. The I/O logs are
3142 saved normally at the end of a run, by decompressing the chunks and storing
3143 them in the specified log file. This feature depends on the availability of
3144 zlib.
3145 .TP
3146 .BI log_compression_cpus \fR=\fPstr
3147 Define the set of CPUs that are allowed to handle online log compression for
3148 the I/O jobs. This can provide better isolation between performance
3149 sensitive jobs, and background compression work. See \fBcpus_allowed\fR for
3150 the format used.
3151 .TP
3152 .BI log_store_compressed \fR=\fPbool
3153 If set, fio will store the log files in a compressed format. They can be
3154 decompressed with fio, using the \fB\-\-inflate\-log\fR command line
3155 parameter. The files will be stored with a `.fz' suffix.
3156 .TP
3157 .BI log_unix_epoch \fR=\fPbool
3158 If set, fio will log Unix timestamps to the log files produced by enabling
3159 write_type_log for each log type, instead of the default zero-based
3160 timestamps.
3161 .TP
3162 .BI block_error_percentiles \fR=\fPbool
3163 If set, record errors in trim block-sized units from writes and trims and
3164 output a histogram of how many trims it took to get to errors, and what kind
3165 of error was encountered.
3166 .TP
3167 .BI bwavgtime \fR=\fPint
3168 Average the calculated bandwidth over the given time. Value is specified in
3169 milliseconds. If the job also does bandwidth logging through
3170 \fBwrite_bw_log\fR, then the minimum of this option and
3171 \fBlog_avg_msec\fR will be used. Default: 500ms.
3172 .TP
3173 .BI iopsavgtime \fR=\fPint
3174 Average the calculated IOPS over the given time. Value is specified in
3175 milliseconds. If the job also does IOPS logging through
3176 \fBwrite_iops_log\fR, then the minimum of this option and
3177 \fBlog_avg_msec\fR will be used. Default: 500ms.
3178 .TP
3179 .BI disk_util \fR=\fPbool
3180 Generate disk utilization statistics, if the platform supports it.
3181 Default: true.
3182 .TP
3183 .BI disable_lat \fR=\fPbool
3184 Disable measurements of total latency numbers. Useful only for cutting back
3185 the number of calls to \fBgettimeofday\fR\|(2), as that does impact
3186 performance at really high IOPS rates. Note that to really get rid of a
3187 large amount of these calls, this option must be used with
3188 \fBdisable_slat\fR and \fBdisable_bw_measurement\fR as well.
3189 .TP
3190 .BI disable_clat \fR=\fPbool
3191 Disable measurements of completion latency numbers. See
3192 \fBdisable_lat\fR.
3193 .TP
3194 .BI disable_slat \fR=\fPbool
3195 Disable measurements of submission latency numbers. See
3196 \fBdisable_lat\fR.
3197 .TP
3198 .BI disable_bw_measurement \fR=\fPbool "\fR,\fP disable_bw" \fR=\fPbool
3199 Disable measurements of throughput/bandwidth numbers. See
3200 \fBdisable_lat\fR.
3201 .TP
3202 .BI slat_percentiles \fR=\fPbool
3203 Report submission latency percentiles. Submission latency is not recorded
3204 for synchronous ioengines.
3205 .TP
3206 .BI clat_percentiles \fR=\fPbool
3207 Report completion latency percentiles.
3208 .TP
3209 .BI lat_percentiles \fR=\fPbool
3210 Report total latency percentiles. Total latency is the sum of submission
3211 latency and completion latency.
3212 .TP
3213 .BI percentile_list \fR=\fPfloat_list
3214 Overwrite the default list of percentiles for latencies and the
3215 block error histogram. Each number is a floating point number in the range
3216 (0,100], and the maximum length of the list is 20. Use ':' to separate the
3217 numbers. For example, `\-\-percentile_list=99.5:99.9' will cause fio to
3218 report the latency durations below which 99.5% and 99.9% of the observed
3219 latencies fell, respectively.
3220 .TP
3221 .BI significant_figures \fR=\fPint
3222 If using \fB\-\-output\-format\fR of `normal', set the significant figures
3223 to this value. Higher values will yield more precise IOPS and throughput
3224 units, while lower values will round. Requires a minimum value of 1 and a
3225 maximum value of 10. Defaults to 4.
3226 .SS "Error handling"
3227 .TP
3228 .BI exitall_on_error
3229 When one job finishes in error, terminate the rest. The default is to wait
3230 for each job to finish.
3231 .TP
3232 .BI continue_on_error \fR=\fPstr
3233 Normally fio will exit the job on the first observed failure. If this option
3234 is set, fio will continue the job when there is a 'non-fatal error' (EIO or
3235 EILSEQ) until the runtime is exceeded or the I/O size specified is
3236 completed. If this option is used, there are two more stats that are
3237 appended, the total error count and the first error. The error field given
3238 in the stats is the first error that was hit during the run.
3239 The allowed values are:
3240 .RS
3241 .RS
3242 .TP
3243 .B none
3244 Exit on any I/O or verify errors.
3245 .TP
3246 .B read
3247 Continue on read errors, exit on all others.
3248 .TP
3249 .B write
3250 Continue on write errors, exit on all others.
3251 .TP
3252 .B io
3253 Continue on any I/O error, exit on all others.
3254 .TP
3255 .B verify
3256 Continue on verify errors, exit on all others.
3257 .TP
3258 .B all
3259 Continue on all errors.
3260 .TP
3261 .B 0
3262 Backward-compatible alias for 'none'.
3263 .TP
3264 .B 1
3265 Backward-compatible alias for 'all'.
3266 .RE
3267 .RE
3268 .TP
3269 .BI ignore_error \fR=\fPstr
3270 Sometimes you want to ignore some errors during test in that case you can
3271 specify error list for each error type, instead of only being able to
3272 ignore the default 'non-fatal error' using \fBcontinue_on_error\fR.
3273 `ignore_error=READ_ERR_LIST,WRITE_ERR_LIST,VERIFY_ERR_LIST' errors for
3274 given error type is separated with ':'. Error may be symbol ('ENOSPC', 'ENOMEM')
3275 or integer. Example:
3276 .RS
3277 .RS
3278 .P
3279 ignore_error=EAGAIN,ENOSPC:122
3280 .RE
3281 .P
3282 This option will ignore EAGAIN from READ, and ENOSPC and 122(EDQUOT) from
3283 WRITE. This option works by overriding \fBcontinue_on_error\fR with
3284 the list of errors for each error type if any.
3285 .RE
3286 .TP
3287 .BI error_dump \fR=\fPbool
3288 If set dump every error even if it is non fatal, true by default. If
3289 disabled only fatal error will be dumped.
3290 .SS "Running predefined workloads"
3291 Fio includes predefined profiles that mimic the I/O workloads generated by
3292 other tools.
3293 .TP
3294 .BI profile \fR=\fPstr
3295 The predefined workload to run. Current profiles are:
3296 .RS
3297 .RS
3298 .TP
3299 .B tiobench
3300 Threaded I/O bench (tiotest/tiobench) like workload.
3301 .TP
3302 .B act
3303 Aerospike Certification Tool (ACT) like workload.
3304 .RE
3305 .RE
3306 .P
3307 To view a profile's additional options use \fB\-\-cmdhelp\fR after specifying
3308 the profile. For example:
3309 .RS
3310 .TP
3311 $ fio \-\-profile=act \-\-cmdhelp
3312 .RE
3313 .SS "Act profile options"
3314 .TP
3315 .BI device\-names \fR=\fPstr
3316 Devices to use.
3317 .TP
3318 .BI load \fR=\fPint
3319 ACT load multiplier. Default: 1.
3320 .TP
3321 .BI test\-duration\fR=\fPtime
3322 How long the entire test takes to run. When the unit is omitted, the value
3323 is given in seconds. Default: 24h.
3324 .TP
3325 .BI threads\-per\-queue\fR=\fPint
3326 Number of read I/O threads per device. Default: 8.
3327 .TP
3328 .BI read\-req\-num\-512\-blocks\fR=\fPint
3329 Number of 512B blocks to read at the time. Default: 3.
3330 .TP
3331 .BI large\-block\-op\-kbytes\fR=\fPint
3332 Size of large block ops in KiB (writes). Default: 131072.
3333 .TP
3334 .BI prep
3335 Set to run ACT prep phase.
3336 .SS "Tiobench profile options"
3337 .TP
3338 .BI size\fR=\fPstr
3339 Size in MiB.
3340 .TP
3341 .BI block\fR=\fPint
3342 Block size in bytes. Default: 4096.
3343 .TP
3344 .BI numruns\fR=\fPint
3345 Number of runs.
3346 .TP
3347 .BI dir\fR=\fPstr
3348 Test directory.
3349 .TP
3350 .BI threads\fR=\fPint
3351 Number of threads.
3352 .SH OUTPUT
3353 Fio spits out a lot of output. While running, fio will display the status of the
3354 jobs created. An example of that would be:
3355 .P
3356 .nf
3357                 Jobs: 1 (f=1): [_(1),M(1)][24.8%][r=20.5MiB/s,w=23.5MiB/s][r=82,w=94 IOPS][eta 01m:31s]
3358 .fi
3359 .P
3360 The characters inside the first set of square brackets denote the current status of
3361 each thread. The first character is the first job defined in the job file, and so
3362 forth. The possible values (in typical life cycle order) are:
3363 .RS
3364 .TP
3365 .PD 0
3366 .B P
3367 Thread setup, but not started.
3368 .TP
3369 .B C
3370 Thread created.
3371 .TP
3372 .B I
3373 Thread initialized, waiting or generating necessary data.
3374 .TP
3375 .B p
3376 Thread running pre-reading file(s).
3377 .TP
3378 .B /
3379 Thread is in ramp period.
3380 .TP
3381 .B R
3382 Running, doing sequential reads.
3383 .TP
3384 .B r
3385 Running, doing random reads.
3386 .TP
3387 .B W
3388 Running, doing sequential writes.
3389 .TP
3390 .B w
3391 Running, doing random writes.
3392 .TP
3393 .B M
3394 Running, doing mixed sequential reads/writes.
3395 .TP
3396 .B m
3397 Running, doing mixed random reads/writes.
3398 .TP
3399 .B D
3400 Running, doing sequential trims.
3401 .TP
3402 .B d
3403 Running, doing random trims.
3404 .TP
3405 .B F
3406 Running, currently waiting for \fBfsync\fR\|(2).
3407 .TP
3408 .B V
3409 Running, doing verification of written data.
3410 .TP
3411 .B f
3412 Thread finishing.
3413 .TP
3414 .B E
3415 Thread exited, not reaped by main thread yet.
3416 .TP
3417 .B \-
3418 Thread reaped.
3419 .TP
3420 .B X
3421 Thread reaped, exited with an error.
3422 .TP
3423 .B K
3424 Thread reaped, exited due to signal.
3425 .PD
3426 .RE
3427 .P
3428 Fio will condense the thread string as not to take up more space on the command
3429 line than needed. For instance, if you have 10 readers and 10 writers running,
3430 the output would look like this:
3431 .P
3432 .nf
3433                 Jobs: 20 (f=20): [R(10),W(10)][4.0%][r=20.5MiB/s,w=23.5MiB/s][r=82,w=94 IOPS][eta 57m:36s]
3434 .fi
3435 .P
3436 Note that the status string is displayed in order, so it's possible to tell which of
3437 the jobs are currently doing what. In the example above this means that jobs 1\-\-10
3438 are readers and 11\-\-20 are writers.
3439 .P
3440 The other values are fairly self explanatory \-\- number of threads currently
3441 running and doing I/O, the number of currently open files (f=), the estimated
3442 completion percentage, the rate of I/O since last check (read speed listed first,
3443 then write speed and optionally trim speed) in terms of bandwidth and IOPS,
3444 and time to completion for the current running group. It's impossible to estimate
3445 runtime of the following groups (if any).
3446 .P
3447 When fio is done (or interrupted by Ctrl\-C), it will show the data for
3448 each thread, group of threads, and disks in that order. For each overall thread (or
3449 group) the output looks like:
3450 .P
3451 .nf
3452                 Client1: (groupid=0, jobs=1): err= 0: pid=16109: Sat Jun 24 12:07:54 2017
3453                   write: IOPS=88, BW=623KiB/s (638kB/s)(30.4MiB/50032msec)
3454                     slat (nsec): min=500, max=145500, avg=8318.00, stdev=4781.50
3455                     clat (usec): min=170, max=78367, avg=4019.02, stdev=8293.31
3456                      lat (usec): min=174, max=78375, avg=4027.34, stdev=8291.79
3457                     clat percentiles (usec):
3458                      |  1.00th=[  302],  5.00th=[  326], 10.00th=[  343], 20.00th=[  363],
3459                      | 30.00th=[  392], 40.00th=[  404], 50.00th=[  416], 60.00th=[  445],
3460                      | 70.00th=[  816], 80.00th=[ 6718], 90.00th=[12911], 95.00th=[21627],
3461                      | 99.00th=[43779], 99.50th=[51643], 99.90th=[68682], 99.95th=[72877],
3462                      | 99.99th=[78119]
3463                    bw (  KiB/s): min=  532, max=  686, per=0.10%, avg=622.87, stdev=24.82, samples=  100
3464                    iops        : min=   76, max=   98, avg=88.98, stdev= 3.54, samples=  100
3465                   lat (usec)   : 250=0.04%, 500=64.11%, 750=4.81%, 1000=2.79%
3466                   lat (msec)   : 2=4.16%, 4=1.84%, 10=4.90%, 20=11.33%, 50=5.37%
3467                   lat (msec)   : 100=0.65%
3468                   cpu          : usr=0.27%, sys=0.18%, ctx=12072, majf=0, minf=21
3469                   IO depths    : 1=85.0%, 2=13.1%, 4=1.8%, 8=0.1%, 16=0.0%, 32=0.0%, >=64=0.0%
3470                      submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
3471                      complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
3472                      issued rwt: total=0,4450,0, short=0,0,0, dropped=0,0,0
3473                      latency   : target=0, window=0, percentile=100.00%, depth=8
3474 .fi
3475 .P
3476 The job name (or first job's name when using \fBgroup_reporting\fR) is printed,
3477 along with the group id, count of jobs being aggregated, last error id seen (which
3478 is 0 when there are no errors), pid/tid of that thread and the time the job/group
3479 completed. Below are the I/O statistics for each data direction performed (showing
3480 writes in the example above). In the order listed, they denote:
3481 .RS
3482 .TP
3483 .B read/write/trim
3484 The string before the colon shows the I/O direction the statistics
3485 are for. \fIIOPS\fR is the average I/Os performed per second. \fIBW\fR
3486 is the average bandwidth rate shown as: value in power of 2 format
3487 (value in power of 10 format). The last two values show: (total
3488 I/O performed in power of 2 format / \fIruntime\fR of that thread).
3489 .TP
3490 .B slat
3491 Submission latency (\fImin\fR being the minimum, \fImax\fR being the
3492 maximum, \fIavg\fR being the average, \fIstdev\fR being the standard
3493 deviation). This is the time it took to submit the I/O. For
3494 sync I/O this row is not displayed as the slat is really the
3495 completion latency (since queue/complete is one operation there).
3496 This value can be in nanoseconds, microseconds or milliseconds \-\-\-
3497 fio will choose the most appropriate base and print that (in the
3498 example above nanoseconds was the best scale). Note: in \fB\-\-minimal\fR mode
3499 latencies are always expressed in microseconds.
3500 .TP
3501 .B clat
3502 Completion latency. Same names as slat, this denotes the time from
3503 submission to completion of the I/O pieces. For sync I/O, clat will
3504 usually be equal (or very close) to 0, as the time from submit to
3505 complete is basically just CPU time (I/O has already been done, see slat
3506 explanation).
3507 .TP
3508 .B lat
3509 Total latency. Same names as slat and clat, this denotes the time from
3510 when fio created the I/O unit to completion of the I/O operation.
3511 .TP
3512 .B bw
3513 Bandwidth statistics based on samples. Same names as the xlat stats,
3514 but also includes the number of samples taken (\fIsamples\fR) and an
3515 approximate percentage of total aggregate bandwidth this thread
3516 received in its group (\fIper\fR). This last value is only really
3517 useful if the threads in this group are on the same disk, since they
3518 are then competing for disk access.
3519 .TP
3520 .B iops
3521 IOPS statistics based on samples. Same names as \fBbw\fR.
3522 .TP
3523 .B lat (nsec/usec/msec)
3524 The distribution of I/O completion latencies. This is the time from when
3525 I/O leaves fio and when it gets completed. Unlike the separate
3526 read/write/trim sections above, the data here and in the remaining
3527 sections apply to all I/Os for the reporting group. 250=0.04% means that
3528 0.04% of the I/Os completed in under 250us. 500=64.11% means that 64.11%
3529 of the I/Os required 250 to 499us for completion.
3530 .TP
3531 .B cpu
3532 CPU usage. User and system time, along with the number of context
3533 switches this thread went through, usage of system and user time, and
3534 finally the number of major and minor page faults. The CPU utilization
3535 numbers are averages for the jobs in that reporting group, while the
3536 context and fault counters are summed.
3537 .TP
3538 .B IO depths
3539 The distribution of I/O depths over the job lifetime. The numbers are
3540 divided into powers of 2 and each entry covers depths from that value
3541 up to those that are lower than the next entry \-\- e.g., 16= covers
3542 depths from 16 to 31. Note that the range covered by a depth
3543 distribution entry can be different to the range covered by the
3544 equivalent \fBsubmit\fR/\fBcomplete\fR distribution entry.
3545 .TP
3546 .B IO submit
3547 How many pieces of I/O were submitting in a single submit call. Each
3548 entry denotes that amount and below, until the previous entry \-\- e.g.,
3549 16=100% means that we submitted anywhere between 9 to 16 I/Os per submit
3550 call. Note that the range covered by a \fBsubmit\fR distribution entry can
3551 be different to the range covered by the equivalent depth distribution
3552 entry.
3553 .TP
3554 .B IO complete
3555 Like the above \fBsubmit\fR number, but for completions instead.
3556 .TP
3557 .B IO issued rwt
3558 The number of \fBread/write/trim\fR requests issued, and how many of them were
3559 short or dropped.
3560 .TP
3561 .B IO latency
3562 These values are for \fBlatency_target\fR and related options. When
3563 these options are engaged, this section describes the I/O depth required
3564 to meet the specified latency target.
3565 .RE
3566 .P
3567 After each client has been listed, the group statistics are printed. They
3568 will look like this:
3569 .P
3570 .nf
3571                 Run status group 0 (all jobs):
3572                    READ: bw=20.9MiB/s (21.9MB/s), 10.4MiB/s\-10.8MiB/s (10.9MB/s\-11.3MB/s), io=64.0MiB (67.1MB), run=2973\-3069msec
3573                   WRITE: bw=1231KiB/s (1261kB/s), 616KiB/s\-621KiB/s (630kB/s\-636kB/s), io=64.0MiB (67.1MB), run=52747\-53223msec
3574 .fi
3575 .P
3576 For each data direction it prints:
3577 .RS
3578 .TP
3579 .B bw
3580 Aggregate bandwidth of threads in this group followed by the
3581 minimum and maximum bandwidth of all the threads in this group.
3582 Values outside of brackets are power-of-2 format and those
3583 within are the equivalent value in a power-of-10 format.
3584 .TP
3585 .B io
3586 Aggregate I/O performed of all threads in this group. The
3587 format is the same as \fBbw\fR.
3588 .TP
3589 .B run
3590 The smallest and longest runtimes of the threads in this group.
3591 .RE
3592 .P
3593 And finally, the disk statistics are printed. This is Linux specific.
3594 They will look like this:
3595 .P
3596 .nf
3597                   Disk stats (read/write):
3598                     sda: ios=16398/16511, merge=30/162, ticks=6853/819634, in_queue=826487, util=100.00%
3599 .fi
3600 .P
3601 Each value is printed for both reads and writes, with reads first. The
3602 numbers denote:
3603 .RS
3604 .TP
3605 .B ios
3606 Number of I/Os performed by all groups.
3607 .TP
3608 .B merge
3609 Number of merges performed by the I/O scheduler.
3610 .TP
3611 .B ticks
3612 Number of ticks we kept the disk busy.
3613 .TP
3614 .B in_queue
3615 Total time spent in the disk queue.
3616 .TP
3617 .B util
3618 The disk utilization. A value of 100% means we kept the disk
3619 busy constantly, 50% would be a disk idling half of the time.
3620 .RE
3621 .P
3622 It is also possible to get fio to dump the current output while it is running,
3623 without terminating the job. To do that, send fio the USR1 signal. You can
3624 also get regularly timed dumps by using the \fB\-\-status\-interval\fR
3625 parameter, or by creating a file in `/tmp' named
3626 `fio\-dump\-status'. If fio sees this file, it will unlink it and dump the
3627 current output status.
3628 .SH TERSE OUTPUT
3629 For scripted usage where you typically want to generate tables or graphs of the
3630 results, fio can output the results in a semicolon separated format. The format
3631 is one long line of values, such as:
3632 .P
3633 .nf
3634                 2;card0;0;0;7139336;121836;60004;1;10109;27.932460;116.933948;220;126861;3495.446807;1085.368601;226;126864;3523.635629;1089.012448;24063;99944;50.275485%;59818.274627;5540.657370;7155060;122104;60004;1;8338;29.086342;117.839068;388;128077;5032.488518;1234.785715;391;128085;5061.839412;1236.909129;23436;100928;50.287926%;59964.832030;5644.844189;14.595833%;19.394167%;123706;0;7313;0.1%;0.1%;0.1%;0.1%;0.1%;0.1%;100.0%;0.00%;0.00%;0.00%;0.00%;0.00%;0.00%;0.01%;0.02%;0.05%;0.16%;6.04%;40.40%;52.68%;0.64%;0.01%;0.00%;0.01%;0.00%;0.00%;0.00%;0.00%;0.00%
3635                 A description of this job goes here.
3636 .fi
3637 .P
3638 The job description (if provided) follows on a second line for terse v2.
3639 It appears on the same line for other terse versions.
3640 .P
3641 To enable terse output, use the \fB\-\-minimal\fR or
3642 `\-\-output\-format=terse' command line options. The
3643 first value is the version of the terse output format. If the output has to be
3644 changed for some reason, this number will be incremented by 1 to signify that
3645 change.
3646 .P
3647 Split up, the format is as follows (comments in brackets denote when a
3648 field was introduced or whether it's specific to some terse version):
3649 .P
3650 .nf
3651                         terse version, fio version [v3], jobname, groupid, error
3652 .fi
3653 .RS
3654 .P
3655 .B
3656 READ status:
3657 .RE
3658 .P
3659 .nf
3660                         Total IO (KiB), bandwidth (KiB/sec), IOPS, runtime (msec)
3661                         Submission latency: min, max, mean, stdev (usec)
3662                         Completion latency: min, max, mean, stdev (usec)
3663                         Completion latency percentiles: 20 fields (see below)
3664                         Total latency: min, max, mean, stdev (usec)
3665                         Bw (KiB/s): min, max, aggregate percentage of total, mean, stdev, number of samples [v5]
3666                         IOPS [v5]: min, max, mean, stdev, number of samples
3667 .fi
3668 .RS
3669 .P
3670 .B
3671 WRITE status:
3672 .RE
3673 .P
3674 .nf
3675                         Total IO (KiB), bandwidth (KiB/sec), IOPS, runtime (msec)
3676                         Submission latency: min, max, mean, stdev (usec)
3677                         Completion latency: min, max, mean, stdev (usec)
3678                         Completion latency percentiles: 20 fields (see below)
3679                         Total latency: min, max, mean, stdev (usec)
3680                         Bw (KiB/s): min, max, aggregate percentage of total, mean, stdev, number of samples [v5]
3681                         IOPS [v5]: min, max, mean, stdev, number of samples
3682 .fi
3683 .RS
3684 .P
3685 .B
3686 TRIM status [all but version 3]:
3687 .RE
3688 .P
3689 .nf
3690                         Fields are similar to \fBREAD/WRITE\fR status.
3691 .fi
3692 .RS
3693 .P
3694 .B
3695 CPU usage:
3696 .RE
3697 .P
3698 .nf
3699                         user, system, context switches, major faults, minor faults
3700 .fi
3701 .RS
3702 .P
3703 .B
3704 I/O depths:
3705 .RE
3706 .P
3707 .nf
3708                         <=1, 2, 4, 8, 16, 32, >=64
3709 .fi
3710 .RS
3711 .P
3712 .B
3713 I/O latencies microseconds:
3714 .RE
3715 .P
3716 .nf
3717                         <=2, 4, 10, 20, 50, 100, 250, 500, 750, 1000
3718 .fi
3719 .RS
3720 .P
3721 .B
3722 I/O latencies milliseconds:
3723 .RE
3724 .P
3725 .nf
3726                         <=2, 4, 10, 20, 50, 100, 250, 500, 750, 1000, 2000, >=2000
3727 .fi
3728 .RS
3729 .P
3730 .B
3731 Disk utilization [v3]:
3732 .RE
3733 .P
3734 .nf
3735                         disk name, read ios, write ios, read merges, write merges, read ticks, write ticks, time spent in queue, disk utilization percentage
3736 .fi
3737 .RS
3738 .P
3739 .B
3740 Additional Info (dependent on continue_on_error, default off):
3741 .RE
3742 .P
3743 .nf
3744                         total # errors, first error code
3745 .fi
3746 .RS
3747 .P
3748 .B
3749 Additional Info (dependent on description being set):
3750 .RE
3751 .P
3752 .nf
3753                         Text description
3754 .fi
3755 .P
3756 Completion latency percentiles can be a grouping of up to 20 sets, so for the
3757 terse output fio writes all of them. Each field will look like this:
3758 .P
3759 .nf
3760                 1.00%=6112
3761 .fi
3762 .P
3763 which is the Xth percentile, and the `usec' latency associated with it.
3764 .P
3765 For \fBDisk utilization\fR, all disks used by fio are shown. So for each disk there
3766 will be a disk utilization section.
3767 .P
3768 Below is a single line containing short names for each of the fields in the
3769 minimal output v3, separated by semicolons:
3770 .P
3771 .nf
3772                 terse_version_3;fio_version;jobname;groupid;error;read_kb;read_bandwidth_kb;read_iops;read_runtime_ms;read_slat_min_us;read_slat_max_us;read_slat_mean_us;read_slat_dev_us;read_clat_min_us;read_clat_max_us;read_clat_mean_us;read_clat_dev_us;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_us;read_lat_max_us;read_lat_mean_us;read_lat_dev_us;read_bw_min_kb;read_bw_max_kb;read_bw_agg_pct;read_bw_mean_kb;read_bw_dev_kb;write_kb;write_bandwidth_kb;write_iops;write_runtime_ms;write_slat_min_us;write_slat_max_us;write_slat_mean_us;write_slat_dev_us;write_clat_min_us;write_clat_max_us;write_clat_mean_us;write_clat_dev_us;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_us;write_lat_max_us;write_lat_mean_us;write_lat_dev_us;write_bw_min_kb;write_bw_max_kb;write_bw_agg_pct;write_bw_mean_kb;write_bw_dev_kb;cpu_user;cpu_sys;cpu_csw;cpu_mjf;cpu_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
3773 .fi
3774 .P
3775 In client/server mode terse output differs from what appears when jobs are run
3776 locally. Disk utilization data is omitted from the standard terse output and
3777 for v3 and later appears on its own separate line at the end of each terse
3778 reporting cycle.
3779 .SH JSON OUTPUT
3780 The \fBjson\fR output format is intended to be both human readable and convenient
3781 for automated parsing. For the most part its sections mirror those of the
3782 \fBnormal\fR output. The \fBruntime\fR value is reported in msec and the \fBbw\fR value is
3783 reported in 1024 bytes per second units.
3784 .fi
3785 .SH JSON+ OUTPUT
3786 The \fBjson+\fR output format is identical to the \fBjson\fR output format except that it
3787 adds a full dump of the completion latency bins. Each \fBbins\fR object contains a
3788 set of (key, value) pairs where keys are latency durations and values count how
3789 many I/Os had completion latencies of the corresponding duration. For example,
3790 consider:
3791 .RS
3792 .P
3793 "bins" : { "87552" : 1, "89600" : 1, "94720" : 1, "96768" : 1, "97792" : 1, "99840" : 1, "100864" : 2, "103936" : 6, "104960" : 534, "105984" : 5995, "107008" : 7529, ... }
3794 .RE
3795 .P
3796 This data indicates that one I/O required 87,552ns to complete, two I/Os required
3797 100,864ns to complete, and 7529 I/Os required 107,008ns to complete.
3798 .P
3799 Also included with fio is a Python script \fBfio_jsonplus_clat2csv\fR that takes
3800 json+ output and generates CSV-formatted latency data suitable for plotting.
3801 .P
3802 The latency durations actually represent the midpoints of latency intervals.
3803 For details refer to `stat.h' in the fio source.
3804 .SH TRACE FILE FORMAT
3805 There are two trace file format that you can encounter. The older (v1) format is
3806 unsupported since version 1.20\-rc3 (March 2008). It will still be described
3807 below in case that you get an old trace and want to understand it.
3808 .P
3809 In any case the trace is a simple text file with a single action per line.
3810 .TP
3811 .B Trace file format v1
3812 Each line represents a single I/O action in the following format:
3813 .RS
3814 .RS
3815 .P
3816 rw, offset, length
3817 .RE
3818 .P
3819 where `rw=0/1' for read/write, and the `offset' and `length' entries being in bytes.
3820 .P
3821 This format is not supported in fio versions >= 1.20\-rc3.
3822 .RE
3823 .TP
3824 .B Trace file format v2
3825 The second version of the trace file format was added in fio version 1.17. It
3826 allows to access more then one file per trace and has a bigger set of possible
3827 file actions.
3828 .RS
3829 .P
3830 The first line of the trace file has to be:
3831 .RS
3832 .P
3833 "fio version 2 iolog"
3834 .RE
3835 .P
3836 Following this can be lines in two different formats, which are described below.
3837 .P
3838 .B
3839 The file management format:
3840 .RS
3841 filename action
3842 .P
3843 The `filename' is given as an absolute path. The `action' can be one of these:
3844 .RS
3845 .TP
3846 .B add
3847 Add the given `filename' to the trace.
3848 .TP
3849 .B open
3850 Open the file with the given `filename'. The `filename' has to have
3851 been added with the \fBadd\fR action before.
3852 .TP
3853 .B close
3854 Close the file with the given `filename'. The file has to have been
3855 \fBopen\fRed before.
3856 .RE
3857 .RE
3858 .P
3859 .B
3860 The file I/O action format:
3861 .RS
3862 filename action offset length
3863 .P
3864 The `filename' is given as an absolute path, and has to have been \fBadd\fRed and
3865 \fBopen\fRed before it can be used with this format. The `offset' and `length' are
3866 given in bytes. The `action' can be one of these:
3867 .RS
3868 .TP
3869 .B wait
3870 Wait for `offset' microseconds. Everything below 100 is discarded.
3871 The time is relative to the previous `wait' statement.
3872 .TP
3873 .B read
3874 Read `length' bytes beginning from `offset'.
3875 .TP
3876 .B write
3877 Write `length' bytes beginning from `offset'.
3878 .TP
3879 .B sync
3880 \fBfsync\fR\|(2) the file.
3881 .TP
3882 .B datasync
3883 \fBfdatasync\fR\|(2) the file.
3884 .TP
3885 .B trim
3886 Trim the given file from the given `offset' for `length' bytes.
3887 .RE
3888 .RE
3889 .SH I/O REPLAY \- MERGING TRACES
3890 Colocation is a common practice used to get the most out of a machine.
3891 Knowing which workloads play nicely with each other and which ones don't is
3892 a much harder task. While fio can replay workloads concurrently via multiple
3893 jobs, it leaves some variability up to the scheduler making results harder to
3894 reproduce. Merging is a way to make the order of events consistent.
3895 .P
3896 Merging is integrated into I/O replay and done when a \fBmerge_blktrace_file\fR
3897 is specified. The list of files passed to \fBread_iolog\fR go through the merge
3898 process and output a single file stored to the specified file. The output file is
3899 passed on as if it were the only file passed to \fBread_iolog\fR. An example would
3900 look like:
3901 .RS
3902 .P
3903 $ fio \-\-read_iolog="<file1>:<file2>" \-\-merge_blktrace_file="<output_file>"
3904 .RE
3905 .P
3906 Creating only the merged file can be done by passing the command line argument
3907 \fBmerge-blktrace-only\fR.
3908 .P
3909 Scaling traces can be done to see the relative impact of any particular trace
3910 being slowed down or sped up. \fBmerge_blktrace_scalars\fR takes in a colon
3911 separated list of percentage scalars. It is index paired with the files passed
3912 to \fBread_iolog\fR.
3913 .P
3914 With scaling, it may be desirable to match the running time of all traces.
3915 This can be done with \fBmerge_blktrace_iters\fR. It is index paired with
3916 \fBread_iolog\fR just like \fBmerge_blktrace_scalars\fR.
3917 .P
3918 In an example, given two traces, A and B, each 60s long. If we want to see
3919 the impact of trace A issuing IOs twice as fast and repeat trace A over the
3920 runtime of trace B, the following can be done:
3921 .RS
3922 .P
3923 $ fio \-\-read_iolog="<trace_a>:"<trace_b>" \-\-merge_blktrace_file"<output_file>" \-\-merge_blktrace_scalars="50:100" \-\-merge_blktrace_iters="2:1"
3924 .RE
3925 .P
3926 This runs trace A at 2x the speed twice for approximately the same runtime as
3927 a single run of trace B.
3928 .SH CPU IDLENESS PROFILING
3929 In some cases, we want to understand CPU overhead in a test. For example, we
3930 test patches for the specific goodness of whether they reduce CPU usage.
3931 Fio implements a balloon approach to create a thread per CPU that runs at idle
3932 priority, meaning that it only runs when nobody else needs the cpu.
3933 By measuring the amount of work completed by the thread, idleness of each CPU
3934 can be derived accordingly.
3935 .P
3936 An unit work is defined as touching a full page of unsigned characters. Mean and
3937 standard deviation of time to complete an unit work is reported in "unit work"
3938 section. Options can be chosen to report detailed percpu idleness or overall
3939 system idleness by aggregating percpu stats.
3940 .SH VERIFICATION AND TRIGGERS
3941 Fio is usually run in one of two ways, when data verification is done. The first
3942 is a normal write job of some sort with verify enabled. When the write phase has
3943 completed, fio switches to reads and verifies everything it wrote. The second
3944 model is running just the write phase, and then later on running the same job
3945 (but with reads instead of writes) to repeat the same I/O patterns and verify
3946 the contents. Both of these methods depend on the write phase being completed,
3947 as fio otherwise has no idea how much data was written.
3948 .P
3949 With verification triggers, fio supports dumping the current write state to
3950 local files. Then a subsequent read verify workload can load this state and know
3951 exactly where to stop. This is useful for testing cases where power is cut to a
3952 server in a managed fashion, for instance.
3953 .P
3954 A verification trigger consists of two things:
3955 .RS
3956 .P
3957 1) Storing the write state of each job.
3958 .P
3959 2) Executing a trigger command.
3960 .RE
3961 .P
3962 The write state is relatively small, on the order of hundreds of bytes to single
3963 kilobytes. It contains information on the number of completions done, the last X
3964 completions, etc.
3965 .P
3966 A trigger is invoked either through creation ('touch') of a specified file in
3967 the system, or through a timeout setting. If fio is run with
3968 `\-\-trigger\-file=/tmp/trigger\-file', then it will continually
3969 check for the existence of `/tmp/trigger\-file'. When it sees this file, it
3970 will fire off the trigger (thus saving state, and executing the trigger
3971 command).
3972 .P
3973 For client/server runs, there's both a local and remote trigger. If fio is
3974 running as a server backend, it will send the job states back to the client for
3975 safe storage, then execute the remote trigger, if specified. If a local trigger
3976 is specified, the server will still send back the write state, but the client
3977 will then execute the trigger.
3978 .RE
3979 .P
3980 .B Verification trigger example
3981 .RS
3982 Let's say we want to run a powercut test on the remote Linux machine 'server'.
3983 Our write workload is in `write\-test.fio'. We want to cut power to 'server' at
3984 some point during the run, and we'll run this test from the safety or our local
3985 machine, 'localbox'. On the server, we'll start the fio backend normally:
3986 .RS
3987 .P
3988 server# fio \-\-server
3989 .RE
3990 .P
3991 and on the client, we'll fire off the workload:
3992 .RS
3993 .P
3994 localbox$ fio \-\-client=server \-\-trigger\-file=/tmp/my\-trigger \-\-trigger\-remote="bash \-c "echo b > /proc/sysrq\-triger""
3995 .RE
3996 .P
3997 We set `/tmp/my\-trigger' as the trigger file, and we tell fio to execute:
3998 .RS
3999 .P
4000 echo b > /proc/sysrq\-trigger
4001 .RE
4002 .P
4003 on the server once it has received the trigger and sent us the write state. This
4004 will work, but it's not really cutting power to the server, it's merely
4005 abruptly rebooting it. If we have a remote way of cutting power to the server
4006 through IPMI or similar, we could do that through a local trigger command
4007 instead. Let's assume we have a script that does IPMI reboot of a given hostname,
4008 ipmi\-reboot. On localbox, we could then have run fio with a local trigger
4009 instead:
4010 .RS
4011 .P
4012 localbox$ fio \-\-client=server \-\-trigger\-file=/tmp/my\-trigger \-\-trigger="ipmi\-reboot server"
4013 .RE
4014 .P
4015 For this case, fio would wait for the server to send us the write state, then
4016 execute `ipmi\-reboot server' when that happened.
4017 .RE
4018 .P
4019 .B Loading verify state
4020 .RS
4021 To load stored write state, a read verification job file must contain the
4022 \fBverify_state_load\fR option. If that is set, fio will load the previously
4023 stored state. For a local fio run this is done by loading the files directly,
4024 and on a client/server run, the server backend will ask the client to send the
4025 files over and load them from there.
4026 .RE
4027 .SH LOG FILE FORMATS
4028 Fio supports a variety of log file formats, for logging latencies, bandwidth,
4029 and IOPS. The logs share a common format, which looks like this:
4030 .RS
4031 .P
4032 time (msec), value, data direction, block size (bytes), offset (bytes),
4033 command priority
4034 .RE
4035 .P
4036 `Time' for the log entry is always in milliseconds. The `value' logged depends
4037 on the type of log, it will be one of the following:
4038 .RS
4039 .TP
4040 .B Latency log
4041 Value is latency in nsecs
4042 .TP
4043 .B Bandwidth log
4044 Value is in KiB/sec
4045 .TP
4046 .B IOPS log
4047 Value is IOPS
4048 .RE
4049 .P
4050 `Data direction' is one of the following:
4051 .RS
4052 .TP
4053 .B 0
4054 I/O is a READ
4055 .TP
4056 .B 1
4057 I/O is a WRITE
4058 .TP
4059 .B 2
4060 I/O is a TRIM
4061 .RE
4062 .P
4063 The entry's `block size' is always in bytes. The `offset' is the position in bytes
4064 from the start of the file for that particular I/O. The logging of the offset can be
4065 toggled with \fBlog_offset\fR.
4066 .P
4067 `Command priority` is 0 for normal priority and 1 for high priority. This is controlled
4068 by the ioengine specific \fBcmdprio_percentage\fR.
4069 .P
4070 Fio defaults to logging every individual I/O but when windowed logging is set
4071 through \fBlog_avg_msec\fR, either the average (by default) or the maximum
4072 (\fBlog_max_value\fR is set) `value' seen over the specified period of time
4073 is recorded. Each `data direction' seen within the window period will aggregate
4074 its values in a separate row. Further, when using windowed logging the `block
4075 size' and `offset' entries will always contain 0.
4076 .SH CLIENT / SERVER
4077 Normally fio is invoked as a stand-alone application on the machine where the
4078 I/O workload should be generated. However, the backend and frontend of fio can
4079 be run separately i.e., the fio server can generate an I/O workload on the "Device
4080 Under Test" while being controlled by a client on another machine.
4081 .P
4082 Start the server on the machine which has access to the storage DUT:
4083 .RS
4084 .P
4085 $ fio \-\-server=args
4086 .RE
4087 .P
4088 where `args' defines what fio listens to. The arguments are of the form
4089 `type,hostname' or `IP,port'. `type' is either `ip' (or ip4) for TCP/IP
4090 v4, `ip6' for TCP/IP v6, or `sock' for a local unix domain socket.
4091 `hostname' is either a hostname or IP address, and `port' is the port to listen
4092 to (only valid for TCP/IP, not a local socket). Some examples:
4093 .RS
4094 .TP
4095 1) \fBfio \-\-server\fR
4096 Start a fio server, listening on all interfaces on the default port (8765).
4097 .TP
4098 2) \fBfio \-\-server=ip:hostname,4444\fR
4099 Start a fio server, listening on IP belonging to hostname and on port 4444.
4100 .TP
4101 3) \fBfio \-\-server=ip6:::1,4444\fR
4102 Start a fio server, listening on IPv6 localhost ::1 and on port 4444.
4103 .TP
4104 4) \fBfio \-\-server=,4444\fR
4105 Start a fio server, listening on all interfaces on port 4444.
4106 .TP
4107 5) \fBfio \-\-server=1.2.3.4\fR
4108 Start a fio server, listening on IP 1.2.3.4 on the default port.
4109 .TP
4110 6) \fBfio \-\-server=sock:/tmp/fio.sock\fR
4111 Start a fio server, listening on the local socket `/tmp/fio.sock'.
4112 .RE
4113 .P
4114 Once a server is running, a "client" can connect to the fio server with:
4115 .RS
4116 .P
4117 $ fio <local\-args> \-\-client=<server> <remote\-args> <job file(s)>
4118 .RE
4119 .P
4120 where `local\-args' are arguments for the client where it is running, `server'
4121 is the connect string, and `remote\-args' and `job file(s)' are sent to the
4122 server. The `server' string follows the same format as it does on the server
4123 side, to allow IP/hostname/socket and port strings.
4124 .P
4125 Fio can connect to multiple servers this way:
4126 .RS
4127 .P
4128 $ fio \-\-client=<server1> <job file(s)> \-\-client=<server2> <job file(s)>
4129 .RE
4130 .P
4131 If the job file is located on the fio server, then you can tell the server to
4132 load a local file as well. This is done by using \fB\-\-remote\-config\fR:
4133 .RS
4134 .P
4135 $ fio \-\-client=server \-\-remote\-config /path/to/file.fio
4136 .RE
4137 .P
4138 Then fio will open this local (to the server) job file instead of being passed
4139 one from the client.
4140 .P
4141 If you have many servers (example: 100 VMs/containers), you can input a pathname
4142 of a file containing host IPs/names as the parameter value for the
4143 \fB\-\-client\fR option. For example, here is an example `host.list'
4144 file containing 2 hostnames:
4145 .RS
4146 .P
4147 .PD 0
4148 host1.your.dns.domain
4149 .P
4150 host2.your.dns.domain
4151 .PD
4152 .RE
4153 .P
4154 The fio command would then be:
4155 .RS
4156 .P
4157 $ fio \-\-client=host.list <job file(s)>
4158 .RE
4159 .P
4160 In this mode, you cannot input server-specific parameters or job files \-\- all
4161 servers receive the same job file.
4162 .P
4163 In order to let `fio \-\-client' runs use a shared filesystem from multiple
4164 hosts, `fio \-\-client' now prepends the IP address of the server to the
4165 filename. For example, if fio is using the directory `/mnt/nfs/fio' and is
4166 writing filename `fileio.tmp', with a \fB\-\-client\fR `hostfile'
4167 containing two hostnames `h1' and `h2' with IP addresses 192.168.10.120 and
4168 192.168.10.121, then fio will create two files:
4169 .RS
4170 .P
4171 .PD 0
4172 /mnt/nfs/fio/192.168.10.120.fileio.tmp
4173 .P
4174 /mnt/nfs/fio/192.168.10.121.fileio.tmp
4175 .PD
4176 .RE
4177 .P
4178 Terse output in client/server mode will differ slightly from what is produced
4179 when fio is run in stand-alone mode. See the terse output section for details.
4180 .SH AUTHORS
4181 .B fio
4182 was written by Jens Axboe <axboe@kernel.dk>.
4183 .br
4184 This man page was written by Aaron Carroll <aaronc@cse.unsw.edu.au> based
4185 on documentation by Jens Axboe.
4186 .br
4187 This man page was rewritten by Tomohiro Kusumi <tkusumi@tuxera.com> based
4188 on documentation by Jens Axboe.
4189 .SH "REPORTING BUGS"
4190 Report bugs to the \fBfio\fR mailing list <fio@vger.kernel.org>.
4191 .br
4192 See \fBREPORTING\-BUGS\fR.
4193 .P
4194 \fBREPORTING\-BUGS\fR: \fIhttp://git.kernel.dk/cgit/fio/plain/REPORTING\-BUGS\fR
4195 .SH "SEE ALSO"
4196 For further documentation see \fBHOWTO\fR and \fBREADME\fR.
4197 .br
4198 Sample jobfiles are available in the `examples/' directory.
4199 .br
4200 These are typically located under `/usr/share/doc/fio'.
4201 .P
4202 \fBHOWTO\fR: \fIhttp://git.kernel.dk/cgit/fio/plain/HOWTO\fR
4203 .br
4204 \fBREADME\fR: \fIhttp://git.kernel.dk/cgit/fio/plain/README\fR