Commit | Line | Data |
---|---|---|
523bad63 | 1 | .TH fio 1 "August 2017" "User Manual" |
d60e92d1 AC |
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 | |
49da1240 JA |
15 | .BI \-\-debug \fR=\fPtype |
16 | Enable verbose tracing of various fio actions. May be `all' for all types | |
bdd88be3 TK |
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. | |
49da1240 | 22 | .TP |
d60e92d1 AC |
23 | .BI \-\-output \fR=\fPfilename |
24 | Write output to \fIfilename\fR. | |
25 | .TP | |
e28ee21d | 26 | .BI \-\-output-format \fR=\fPformat |
513e37ee VF |
27 | Set the reporting format to \fInormal\fR, \fIterse\fR, \fIjson\fR, or |
28 | \fIjson+\fR. Multiple formats can be selected, separate by a comma. \fIterse\fR | |
29 | is a CSV based format. \fIjson+\fR is like \fIjson\fR, except it adds a full | |
30 | dump of the latency buckets. | |
e28ee21d | 31 | .TP |
b2cecdc2 | 32 | .BI \-\-runtime \fR=\fPruntime |
33 | Limit run time to \fIruntime\fR seconds. | |
d60e92d1 | 34 | .TP |
d60e92d1 | 35 | .B \-\-bandwidth\-log |
d23ae827 | 36 | Generate aggregate bandwidth logs. |
d60e92d1 AC |
37 | .TP |
38 | .B \-\-minimal | |
d1429b5c | 39 | Print statistics in a terse, semicolon-delimited format. |
d60e92d1 | 40 | .TP |
f6a7df53 JA |
41 | .B \-\-append-terse |
42 | Print statistics in selected mode AND terse, semicolon-delimited format. | |
43 | Deprecated, use \-\-output-format instead to select multiple formats. | |
44 | .TP | |
065248bf | 45 | .BI \-\-terse\-version \fR=\fPversion |
a2c95580 | 46 | Set terse version output format (default 3, or 2, 4, 5) |
49da1240 | 47 | .TP |
bdd88be3 TK |
48 | .B \-\-version |
49 | Print version information and exit. | |
50 | .TP | |
49da1240 | 51 | .B \-\-help |
bdd88be3 | 52 | Print a summary of the command line options and exit. |
49da1240 | 53 | .TP |
fec0f21c | 54 | .B \-\-cpuclock-test |
bdd88be3 | 55 | Perform test and validation of internal CPU clock. |
fec0f21c | 56 | .TP |
bdd88be3 TK |
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 | |
fec0f21c JA |
60 | case the given ones are tested. |
61 | .TP | |
49da1240 | 62 | .BI \-\-cmdhelp \fR=\fPcommand |
bdd88be3 | 63 | Print help information for \fIcommand\fR. May be `all' for all commands. |
49da1240 | 64 | .TP |
de890a1e SL |
65 | .BI \-\-enghelp \fR=\fPioengine[,command] |
66 | List all commands defined by \fIioengine\fR, or print help for \fIcommand\fR defined by \fIioengine\fR. | |
bdd88be3 | 67 | If no \fIioengine\fR is given, list all available ioengines. |
de890a1e | 68 | .TP |
d60e92d1 AC |
69 | .BI \-\-showcmd \fR=\fPjobfile |
70 | Convert \fIjobfile\fR to a set of command-line options. | |
71 | .TP | |
bdd88be3 TK |
72 | .BI \-\-readonly |
73 | Turn on safety read-only checks, preventing writes. The \-\-readonly | |
74 | option is an extra safety guard to prevent users from accidentally starting | |
75 | a write workload when that is not desired. Fio will only write if | |
76 | `rw=write/randwrite/rw/randrw` is given. This extra safety net can be used | |
77 | as an extra precaution as \-\-readonly will also enable a write check in | |
78 | the I/O engine core to prevent writes due to unknown user space bug(s). | |
79 | .TP | |
d60e92d1 | 80 | .BI \-\-eta \fR=\fPwhen |
bdd88be3 TK |
81 | Specifies when real-time ETA estimate should be printed. \fIwhen\fR may |
82 | be `always', `never' or `auto'. | |
d60e92d1 | 83 | .TP |
30b5d57f | 84 | .BI \-\-eta\-newline \fR=\fPtime |
bdd88be3 TK |
85 | Force a new line for every \fItime\fR period passed. When the unit is omitted, |
86 | the value is interpreted in seconds. | |
30b5d57f JA |
87 | .TP |
88 | .BI \-\-status\-interval \fR=\fPtime | |
bdd88be3 TK |
89 | Force full status dump every \fItime\fR period passed. When the unit is omitted, |
90 | the value is interpreted in seconds. | |
91 | .TP | |
92 | .BI \-\-section \fR=\fPname | |
93 | Only run specified section \fIname\fR in job file. Multiple sections can be specified. | |
94 | The \-\-section option allows one to combine related jobs into one file. | |
95 | E.g. one job file could define light, moderate, and heavy sections. Tell | |
96 | fio to run only the "heavy" section by giving \-\-section=heavy | |
97 | command line option. One can also specify the "write" operations in one | |
98 | section and "verify" operation in another section. The \-\-section option | |
99 | only applies to job sections. The reserved *global* section is always | |
100 | parsed and used. | |
c0a5d35e | 101 | .TP |
49da1240 | 102 | .BI \-\-alloc\-size \fR=\fPkb |
bdd88be3 TK |
103 | Set the internal smalloc pool size to \fIkb\fP in KiB. The |
104 | \-\-alloc-size switch allows one to use a larger pool size for smalloc. | |
105 | If running large jobs with randommap enabled, fio can run out of memory. | |
106 | Smalloc is an internal allocator for shared structures from a fixed size | |
107 | memory pool and can grow to 16 pools. The pool size defaults to 16MiB. | |
108 | NOTE: While running .fio_smalloc.* backing store files are visible | |
109 | in /tmp. | |
d60e92d1 | 110 | .TP |
49da1240 JA |
111 | .BI \-\-warnings\-fatal |
112 | All fio parser warnings are fatal, causing fio to exit with an error. | |
9183788d | 113 | .TP |
49da1240 | 114 | .BI \-\-max\-jobs \fR=\fPnr |
bdd88be3 | 115 | Set the maximum number of threads/processes to support. |
d60e92d1 | 116 | .TP |
49da1240 | 117 | .BI \-\-server \fR=\fPargs |
bdd88be3 | 118 | Start a backend server, with \fIargs\fP specifying what to listen to. See Client/Server section. |
f57a9c59 | 119 | .TP |
49da1240 | 120 | .BI \-\-daemonize \fR=\fPpidfile |
bdd88be3 | 121 | Background a fio server, writing the pid to the given \fIpidfile\fP file. |
49da1240 | 122 | .TP |
bdd88be3 TK |
123 | .BI \-\-client \fR=\fPhostname |
124 | Instead of running the jobs locally, send and run them on the given host or set of hosts. See Client/Server section. | |
125 | .TP | |
126 | .BI \-\-remote-config \fR=\fPfile | |
127 | Tell fio server to load this local file. | |
f2a2ce0e HL |
128 | .TP |
129 | .BI \-\-idle\-prof \fR=\fPoption | |
bdd88be3 TK |
130 | Report CPU idleness. \fIoption\fP is one of the following: |
131 | .RS | |
132 | .RS | |
133 | .TP | |
134 | .B calibrate | |
135 | Run unit work calibration only and exit. | |
136 | .TP | |
137 | .B system | |
138 | Show aggregate system idleness and unit work. | |
139 | .TP | |
140 | .B percpu | |
141 | As "system" but also show per CPU idleness. | |
142 | .RE | |
143 | .RE | |
144 | .TP | |
145 | .BI \-\-inflate-log \fR=\fPlog | |
146 | Inflate and output compressed log. | |
147 | .TP | |
148 | .BI \-\-trigger-file \fR=\fPfile | |
149 | Execute trigger cmd when file exists. | |
150 | .TP | |
151 | .BI \-\-trigger-timeout \fR=\fPt | |
152 | Execute trigger at this time. | |
153 | .TP | |
154 | .BI \-\-trigger \fR=\fPcmd | |
155 | Set this command as local trigger. | |
156 | .TP | |
157 | .BI \-\-trigger-remote \fR=\fPcmd | |
158 | Set this command as remote trigger. | |
159 | .TP | |
160 | .BI \-\-aux-path \fR=\fPpath | |
161 | Use this path for fio state generated files. | |
d60e92d1 | 162 | .SH "JOB FILE FORMAT" |
7a14cf18 TK |
163 | Any parameters following the options will be assumed to be job files, unless |
164 | they match a job file parameter. Multiple job files can be listed and each job | |
165 | file will be regarded as a separate group. Fio will `stonewall` execution | |
166 | between each group. | |
167 | ||
168 | Fio accepts one or more job files describing what it is | |
169 | supposed to do. The job file format is the classic ini file, where the names | |
170 | enclosed in [] brackets define the job name. You are free to use any ASCII name | |
171 | you want, except *global* which has special meaning. Following the job name is | |
172 | a sequence of zero or more parameters, one per line, that define the behavior of | |
173 | the job. If the first character in a line is a ';' or a '#', the entire line is | |
174 | discarded as a comment. | |
175 | ||
176 | A *global* section sets defaults for the jobs described in that file. A job may | |
177 | override a *global* section parameter, and a job file may even have several | |
178 | *global* sections if so desired. A job is only affected by a *global* section | |
179 | residing above it. | |
180 | ||
181 | The \-\-cmdhelp option also lists all options. If used with an `option` | |
182 | argument, \-\-cmdhelp will detail the given `option`. | |
183 | ||
184 | See the `examples/` directory in the fio source for inspiration on how to write | |
185 | job files. Note the copyright and license requirements currently apply to | |
186 | `examples/` files. | |
54eb4569 TK |
187 | .SH "JOB FILE PARAMETERS" |
188 | Some parameters take an option of a given type, such as an integer or a | |
189 | string. Anywhere a numeric value is required, an arithmetic expression may be | |
190 | used, provided it is surrounded by parentheses. Supported operators are: | |
d59aa780 JA |
191 | .RS |
192 | .RS | |
193 | .TP | |
194 | .B addition (+) | |
195 | .TP | |
196 | .B subtraction (-) | |
197 | .TP | |
198 | .B multiplication (*) | |
199 | .TP | |
200 | .B division (/) | |
201 | .TP | |
202 | .B modulus (%) | |
203 | .TP | |
204 | .B exponentiation (^) | |
205 | .RE | |
206 | .RE | |
207 | .P | |
208 | For time values in expressions, units are microseconds by default. This is | |
209 | different than for time values not in expressions (not enclosed in | |
54eb4569 TK |
210 | parentheses). |
211 | .SH "PARAMETER TYPES" | |
212 | The following parameter types are used. | |
d60e92d1 AC |
213 | .TP |
214 | .I str | |
6b86fc18 TK |
215 | String. A sequence of alphanumeric characters. |
216 | .TP | |
217 | .I time | |
218 | Integer with possible time suffix. Without a unit value is interpreted as | |
219 | seconds unless otherwise specified. Accepts a suffix of 'd' for days, 'h' for | |
220 | hours, 'm' for minutes, 's' for seconds, 'ms' (or 'msec') for milliseconds and 'us' | |
221 | (or 'usec') for microseconds. For example, use 10m for 10 minutes. | |
d60e92d1 AC |
222 | .TP |
223 | .I int | |
6d500c2e RE |
224 | Integer. A whole number value, which may contain an integer prefix |
225 | and an integer suffix. | |
0b43a833 TK |
226 | .RS |
227 | .RS | |
228 | .P | |
6b86fc18 | 229 | [*integer prefix*] **number** [*integer suffix*] |
0b43a833 TK |
230 | .RE |
231 | .P | |
6b86fc18 TK |
232 | The optional *integer prefix* specifies the number's base. The default |
233 | is decimal. *0x* specifies hexadecimal. | |
0b43a833 | 234 | .P |
6b86fc18 TK |
235 | The optional *integer suffix* specifies the number's units, and includes an |
236 | optional unit prefix and an optional unit. For quantities of data, the | |
237 | default unit is bytes. For quantities of time, the default unit is seconds | |
238 | unless otherwise specified. | |
0b43a833 TK |
239 | .P |
240 | With `kb_base=1000', fio follows international standards for unit | |
6b86fc18 TK |
241 | prefixes. To specify power-of-10 decimal values defined in the |
242 | International System of Units (SI): | |
0b43a833 TK |
243 | .RS |
244 | .P | |
a94a9774 | 245 | Ki means kilo (K) or 1000 |
0b43a833 TK |
246 | .RE |
247 | .RS | |
a94a9774 | 248 | Mi means mega (M) or 1000**2 |
0b43a833 TK |
249 | .RE |
250 | .RS | |
a94a9774 | 251 | Gi means giga (G) or 1000**3 |
0b43a833 TK |
252 | .RE |
253 | .RS | |
a94a9774 | 254 | Ti means tera (T) or 1000**4 |
0b43a833 TK |
255 | .RE |
256 | .RS | |
a94a9774 | 257 | Pi means peta (P) or 1000**5 |
0b43a833 TK |
258 | .RE |
259 | .P | |
6d500c2e | 260 | To specify power-of-2 binary values defined in IEC 80000-13: |
0b43a833 TK |
261 | .RS |
262 | .P | |
a94a9774 | 263 | K means kibi (Ki) or 1024 |
0b43a833 TK |
264 | .RE |
265 | .RS | |
a94a9774 | 266 | M means mebi (Mi) or 1024**2 |
0b43a833 TK |
267 | .RE |
268 | .RS | |
a94a9774 | 269 | G means gibi (Gi) or 1024**3 |
0b43a833 TK |
270 | .RE |
271 | .RS | |
a94a9774 | 272 | T means tebi (Ti) or 1024**4 |
0b43a833 TK |
273 | .RE |
274 | .RS | |
a94a9774 | 275 | P means pebi (Pi) or 1024**5 |
0b43a833 TK |
276 | .RE |
277 | .P | |
278 | With `kb_base=1024' (the default), the unit prefixes are opposite | |
6b86fc18 TK |
279 | from those specified in the SI and IEC 80000-13 standards to provide |
280 | compatibility with old scripts. For example, 4k means 4096. | |
0b43a833 | 281 | .P |
6b86fc18 TK |
282 | For quantities of data, an optional unit of 'B' may be included |
283 | (e.g., 'kB' is the same as 'k'). | |
0b43a833 | 284 | .P |
6b86fc18 TK |
285 | The *integer suffix* is not case sensitive (e.g., m/mi mean mebi/mega, |
286 | not milli). 'b' and 'B' both mean byte, not bit. | |
0b43a833 TK |
287 | .P |
288 | Examples with `kb_base=1000': | |
289 | .RS | |
290 | .P | |
6d500c2e | 291 | 4 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB |
0b43a833 TK |
292 | .RE |
293 | .RS | |
6d500c2e | 294 | 1 MiB: 1048576, 1m, 1024k |
0b43a833 TK |
295 | .RE |
296 | .RS | |
6d500c2e | 297 | 1 MB: 1000000, 1mi, 1000ki |
0b43a833 TK |
298 | .RE |
299 | .RS | |
6d500c2e | 300 | 1 TiB: 1073741824, 1t, 1024m, 1048576k |
0b43a833 TK |
301 | .RE |
302 | .RS | |
6d500c2e | 303 | 1 TB: 1000000000, 1ti, 1000mi, 1000000ki |
0b43a833 TK |
304 | .RE |
305 | .P | |
306 | Examples with `kb_base=1024' (default): | |
307 | .RS | |
308 | .P | |
6d500c2e | 309 | 4 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB |
0b43a833 TK |
310 | .RE |
311 | .RS | |
6d500c2e | 312 | 1 MiB: 1048576, 1m, 1024k |
0b43a833 TK |
313 | .RE |
314 | .RS | |
6d500c2e | 315 | 1 MB: 1000000, 1mi, 1000ki |
0b43a833 TK |
316 | .RE |
317 | .RS | |
6d500c2e | 318 | 1 TiB: 1073741824, 1t, 1024m, 1048576k |
0b43a833 TK |
319 | .RE |
320 | .RS | |
6d500c2e | 321 | 1 TB: 1000000000, 1ti, 1000mi, 1000000ki |
0b43a833 TK |
322 | .RE |
323 | .P | |
6d500c2e | 324 | To specify times (units are not case sensitive): |
0b43a833 TK |
325 | .RS |
326 | .P | |
6d500c2e | 327 | D means days |
0b43a833 TK |
328 | .RE |
329 | .RS | |
6d500c2e | 330 | H means hours |
0b43a833 TK |
331 | .RE |
332 | .RS | |
6d500c2e | 333 | M mean minutes |
0b43a833 TK |
334 | .RE |
335 | .RS | |
6d500c2e | 336 | s or sec means seconds (default) |
0b43a833 TK |
337 | .RE |
338 | .RS | |
6d500c2e | 339 | ms or msec means milliseconds |
0b43a833 TK |
340 | .RE |
341 | .RS | |
6d500c2e | 342 | us or usec means microseconds |
0b43a833 TK |
343 | .RE |
344 | .P | |
6b86fc18 TK |
345 | If the option accepts an upper and lower range, use a colon ':' or |
346 | minus '-' to separate such values. See `irange` parameter type. | |
347 | If the lower value specified happens to be larger than the upper value | |
348 | the two values are swapped. | |
0b43a833 | 349 | .RE |
d60e92d1 AC |
350 | .TP |
351 | .I bool | |
6b86fc18 TK |
352 | Boolean. Usually parsed as an integer, however only defined for |
353 | true and false (1 and 0). | |
d60e92d1 AC |
354 | .TP |
355 | .I irange | |
6b86fc18 TK |
356 | Integer range with suffix. Allows value range to be given, such as |
357 | 1024-4096. A colon may also be used as the separator, e.g. 1k:4k. If the | |
358 | option allows two sets of ranges, they can be specified with a ',' or '/' | |
359 | delimiter: 1k-4k/8k-32k. Also see `int` parameter type. | |
83349190 YH |
360 | .TP |
361 | .I float_list | |
6b86fc18 | 362 | A list of floating point numbers, separated by a ':' character. |
523bad63 | 363 | .SH "JOB PARAMETERS" |
54eb4569 | 364 | With the above in mind, here follows the complete list of fio job parameters. |
523bad63 | 365 | .SS "Units" |
d60e92d1 | 366 | .TP |
523bad63 TK |
367 | .BI kb_base \fR=\fPint |
368 | Select the interpretation of unit prefixes in input parameters. | |
369 | .RS | |
370 | .RS | |
d60e92d1 | 371 | .TP |
523bad63 TK |
372 | .B 1000 |
373 | Inputs comply with IEC 80000\-13 and the International | |
374 | System of Units (SI). Use: | |
375 | .RS | |
376 | .P | |
377 | .PD 0 | |
378 | \- power\-of\-2 values with IEC prefixes (e.g., KiB) | |
379 | .P | |
380 | \- power\-of\-10 values with SI prefixes (e.g., kB) | |
381 | .PD | |
382 | .RE | |
383 | .TP | |
384 | .B 1024 | |
385 | Compatibility mode (default). To avoid breaking old scripts: | |
386 | .P | |
387 | .RS | |
388 | .PD 0 | |
389 | \- power\-of\-2 values with SI prefixes | |
390 | .P | |
391 | \- power\-of\-10 values with IEC prefixes | |
392 | .PD | |
393 | .RE | |
394 | .RE | |
395 | .P | |
396 | See \fBbs\fR for more details on input parameters. | |
397 | .P | |
398 | Outputs always use correct prefixes. Most outputs include both | |
399 | side\-by\-side, like: | |
400 | .P | |
401 | .RS | |
402 | bw=2383.3kB/s (2327.4KiB/s) | |
403 | .RE | |
404 | .P | |
405 | If only one value is reported, then kb_base selects the one to use: | |
406 | .P | |
407 | .RS | |
408 | .PD 0 | |
409 | 1000 \-\- SI prefixes | |
410 | .P | |
411 | 1024 \-\- IEC prefixes | |
412 | .PD | |
413 | .RE | |
414 | .RE | |
415 | .TP | |
416 | .BI unit_base \fR=\fPint | |
417 | Base unit for reporting. Allowed values are: | |
418 | .RS | |
419 | .RS | |
420 | .TP | |
421 | .B 0 | |
422 | Use auto\-detection (default). | |
423 | .TP | |
424 | .B 8 | |
425 | Byte based. | |
426 | .TP | |
427 | .B 1 | |
428 | Bit based. | |
429 | .RE | |
430 | .RE | |
431 | .SS "Job description" | |
432 | .TP | |
433 | .BI name \fR=\fPstr | |
434 | ASCII name of the job. This may be used to override the name printed by fio | |
435 | for this job. Otherwise the job name is used. On the command line this | |
436 | parameter has the special purpose of also signaling the start of a new job. | |
9cc8cb91 | 437 | .TP |
d60e92d1 | 438 | .BI description \fR=\fPstr |
523bad63 TK |
439 | Text description of the job. Doesn't do anything except dump this text |
440 | description when this job is run. It's not parsed. | |
441 | .TP | |
442 | .BI loops \fR=\fPint | |
443 | Run the specified number of iterations of this job. Used to repeat the same | |
444 | workload a given number of times. Defaults to 1. | |
445 | .TP | |
446 | .BI numjobs \fR=\fPint | |
447 | Create the specified number of clones of this job. Each clone of job | |
448 | is spawned as an independent thread or process. May be used to setup a | |
449 | larger number of threads/processes doing the same thing. Each thread is | |
450 | reported separately; to see statistics for all clones as a whole, use | |
451 | \fBgroup_reporting\fR in conjunction with \fBnew_group\fR. | |
452 | See \fB\-\-max\-jobs\fR. Default: 1. | |
453 | .SS "Time related parameters" | |
454 | .TP | |
455 | .BI runtime \fR=\fPtime | |
456 | Tell fio to terminate processing after the specified period of time. It | |
457 | can be quite hard to determine for how long a specified job will run, so | |
458 | this parameter is handy to cap the total runtime to a given time. When | |
459 | the unit is omitted, the value is intepreted in seconds. | |
460 | .TP | |
461 | .BI time_based | |
462 | If set, fio will run for the duration of the \fBruntime\fR specified | |
463 | even if the file(s) are completely read or written. It will simply loop over | |
464 | the same workload as many times as the \fBruntime\fR allows. | |
465 | .TP | |
466 | .BI startdelay \fR=\fPirange(int) | |
467 | Delay the start of job for the specified amount of time. Can be a single | |
468 | value or a range. When given as a range, each thread will choose a value | |
469 | randomly from within the range. Value is in seconds if a unit is omitted. | |
470 | .TP | |
471 | .BI ramp_time \fR=\fPtime | |
472 | If set, fio will run the specified workload for this amount of time before | |
473 | logging any performance numbers. Useful for letting performance settle | |
474 | before logging results, thus minimizing the runtime required for stable | |
475 | results. Note that the \fBramp_time\fR is considered lead in time for a job, | |
476 | thus it will increase the total runtime if a special timeout or | |
477 | \fBruntime\fR is specified. When the unit is omitted, the value is | |
478 | given in seconds. | |
479 | .TP | |
480 | .BI clocksource \fR=\fPstr | |
481 | Use the given clocksource as the base of timing. The supported options are: | |
482 | .RS | |
483 | .RS | |
484 | .TP | |
485 | .B gettimeofday | |
486 | \fBgettimeofday\fR\|(2) | |
487 | .TP | |
488 | .B clock_gettime | |
489 | \fBclock_gettime\fR\|(2) | |
490 | .TP | |
491 | .B cpu | |
492 | Internal CPU clock source | |
493 | .RE | |
494 | .P | |
495 | \fBcpu\fR is the preferred clocksource if it is reliable, as it is very fast (and | |
496 | fio is heavy on time calls). Fio will automatically use this clocksource if | |
497 | it's supported and considered reliable on the system it is running on, | |
498 | unless another clocksource is specifically set. For x86/x86\-64 CPUs, this | |
499 | means supporting TSC Invariant. | |
500 | .RE | |
501 | .TP | |
502 | .BI gtod_reduce \fR=\fPbool | |
503 | Enable all of the \fBgettimeofday\fR\|(2) reducing options | |
504 | (\fBdisable_clat\fR, \fBdisable_slat\fR, \fBdisable_bw_measurement\fR) plus | |
505 | reduce precision of the timeout somewhat to really shrink the | |
506 | \fBgettimeofday\fR\|(2) call count. With this option enabled, we only do | |
507 | about 0.4% of the \fBgettimeofday\fR\|(2) calls we would have done if all | |
508 | time keeping was enabled. | |
509 | .TP | |
510 | .BI gtod_cpu \fR=\fPint | |
511 | Sometimes it's cheaper to dedicate a single thread of execution to just | |
512 | getting the current time. Fio (and databases, for instance) are very | |
513 | intensive on \fBgettimeofday\fR\|(2) calls. With this option, you can set | |
514 | one CPU aside for doing nothing but logging current time to a shared memory | |
515 | location. Then the other threads/processes that run I/O workloads need only | |
516 | copy that segment, instead of entering the kernel with a | |
517 | \fBgettimeofday\fR\|(2) call. The CPU set aside for doing these time | |
518 | calls will be excluded from other uses. Fio will manually clear it from the | |
519 | CPU mask of other jobs. | |
520 | .SS "Target file/device" | |
d60e92d1 AC |
521 | .TP |
522 | .BI directory \fR=\fPstr | |
523bad63 TK |
523 | Prefix \fBfilename\fRs with this directory. Used to place files in a different |
524 | location than `./'. You can specify a number of directories by | |
525 | separating the names with a ':' character. These directories will be | |
526 | assigned equally distributed to job clones created by \fBnumjobs\fR as | |
527 | long as they are using generated filenames. If specific \fBfilename\fR(s) are | |
528 | set fio will use the first listed directory, and thereby matching the | |
529 | \fBfilename\fR semantic which generates a file each clone if not specified, but | |
530 | let all clones use the same if set. | |
531 | .RS | |
532 | .P | |
533 | See the \fBfilename\fR option for information on how to escape ':' and '\' | |
534 | characters within the directory path itself. | |
535 | .RE | |
d60e92d1 AC |
536 | .TP |
537 | .BI filename \fR=\fPstr | |
523bad63 TK |
538 | Fio normally makes up a \fBfilename\fR based on the job name, thread number, and |
539 | file number (see \fBfilename_format\fR). If you want to share files | |
540 | between threads in a job or several | |
541 | jobs with fixed file paths, specify a \fBfilename\fR for each of them to override | |
542 | the default. If the ioengine is file based, you can specify a number of files | |
543 | by separating the names with a ':' colon. So if you wanted a job to open | |
544 | `/dev/sda' and `/dev/sdb' as the two working files, you would use | |
545 | `filename=/dev/sda:/dev/sdb'. This also means that whenever this option is | |
546 | specified, \fBnrfiles\fR is ignored. The size of regular files specified | |
547 | by this option will be \fBsize\fR divided by number of files unless an | |
548 | explicit size is specified by \fBfilesize\fR. | |
549 | .RS | |
550 | .P | |
551 | Each colon and backslash in the wanted path must be escaped with a '\' | |
552 | character. For instance, if the path is `/dev/dsk/foo@3,0:c' then you | |
553 | would use `filename=/dev/dsk/foo@3,0\\:c' and if the path is | |
554 | `F:\\\\filename' then you would use `filename=F\\:\\\\filename'. | |
555 | .P | |
556 | On Windows, disk devices are accessed as `\\\\\\\\.\\\\PhysicalDrive0' for | |
557 | the first device, `\\\\\\\\.\\\\PhysicalDrive1' for the second etc. | |
558 | Note: Windows and FreeBSD prevent write access to areas | |
559 | of the disk containing in\-use data (e.g. filesystems). | |
560 | .P | |
561 | The filename `\-' is a reserved name, meaning *stdin* or *stdout*. Which | |
562 | of the two depends on the read/write direction set. | |
563 | .RE | |
d60e92d1 | 564 | .TP |
de98bd30 | 565 | .BI filename_format \fR=\fPstr |
523bad63 TK |
566 | If sharing multiple files between jobs, it is usually necessary to have fio |
567 | generate the exact names that you want. By default, fio will name a file | |
de98bd30 | 568 | based on the default file format specification of |
523bad63 | 569 | `jobname.jobnumber.filenumber'. With this option, that can be |
de98bd30 JA |
570 | customized. Fio will recognize and replace the following keywords in this |
571 | string: | |
572 | .RS | |
573 | .RS | |
574 | .TP | |
575 | .B $jobname | |
576 | The name of the worker thread or process. | |
577 | .TP | |
578 | .B $jobnum | |
579 | The incremental number of the worker thread or process. | |
580 | .TP | |
581 | .B $filenum | |
582 | The incremental number of the file for that worker thread or process. | |
583 | .RE | |
584 | .P | |
523bad63 TK |
585 | To have dependent jobs share a set of files, this option can be set to have |
586 | fio generate filenames that are shared between the two. For instance, if | |
587 | `testfiles.$filenum' is specified, file number 4 for any job will be | |
588 | named `testfiles.4'. The default of `$jobname.$jobnum.$filenum' | |
de98bd30 JA |
589 | will be used if no other format specifier is given. |
590 | .RE | |
de98bd30 | 591 | .TP |
922a5be8 | 592 | .BI unique_filename \fR=\fPbool |
523bad63 TK |
593 | To avoid collisions between networked clients, fio defaults to prefixing any |
594 | generated filenames (with a directory specified) with the source of the | |
595 | client connecting. To disable this behavior, set this option to 0. | |
596 | .TP | |
597 | .BI opendir \fR=\fPstr | |
598 | Recursively open any files below directory \fIstr\fR. | |
922a5be8 | 599 | .TP |
3ce9dcaf | 600 | .BI lockfile \fR=\fPstr |
523bad63 TK |
601 | Fio defaults to not locking any files before it does I/O to them. If a file |
602 | or file descriptor is shared, fio can serialize I/O to that file to make the | |
603 | end result consistent. This is usual for emulating real workloads that share | |
604 | files. The lock modes are: | |
3ce9dcaf JA |
605 | .RS |
606 | .RS | |
607 | .TP | |
608 | .B none | |
523bad63 | 609 | No locking. The default. |
3ce9dcaf JA |
610 | .TP |
611 | .B exclusive | |
523bad63 | 612 | Only one thread or process may do I/O at a time, excluding all others. |
3ce9dcaf JA |
613 | .TP |
614 | .B readwrite | |
523bad63 TK |
615 | Read\-write locking on the file. Many readers may |
616 | access the file at the same time, but writes get exclusive access. | |
3ce9dcaf | 617 | .RE |
ce594fbe | 618 | .RE |
523bad63 TK |
619 | .TP |
620 | .BI nrfiles \fR=\fPint | |
621 | Number of files to use for this job. Defaults to 1. The size of files | |
622 | will be \fBsize\fR divided by this unless explicit size is specified by | |
623 | \fBfilesize\fR. Files are created for each thread separately, and each | |
624 | file will have a file number within its name by default, as explained in | |
625 | \fBfilename\fR section. | |
626 | .TP | |
627 | .BI openfiles \fR=\fPint | |
628 | Number of files to keep open at the same time. Defaults to the same as | |
629 | \fBnrfiles\fR, can be set smaller to limit the number simultaneous | |
630 | opens. | |
631 | .TP | |
632 | .BI file_service_type \fR=\fPstr | |
633 | Defines how fio decides which file from a job to service next. The following | |
634 | types are defined: | |
635 | .RS | |
636 | .RS | |
637 | .TP | |
638 | .B random | |
639 | Choose a file at random. | |
640 | .TP | |
641 | .B roundrobin | |
642 | Round robin over opened files. This is the default. | |
643 | .TP | |
644 | .B sequential | |
645 | Finish one file before moving on to the next. Multiple files can | |
646 | still be open depending on \fBopenfiles\fR. | |
647 | .TP | |
648 | .B zipf | |
649 | Use a Zipf distribution to decide what file to access. | |
650 | .TP | |
651 | .B pareto | |
652 | Use a Pareto distribution to decide what file to access. | |
653 | .TP | |
654 | .B normal | |
655 | Use a Gaussian (normal) distribution to decide what file to access. | |
656 | .TP | |
657 | .B gauss | |
658 | Alias for normal. | |
659 | .RE | |
3ce9dcaf | 660 | .P |
523bad63 TK |
661 | For \fBrandom\fR, \fBroundrobin\fR, and \fBsequential\fR, a postfix can be appended to |
662 | tell fio how many I/Os to issue before switching to a new file. For example, | |
663 | specifying `file_service_type=random:8' would cause fio to issue | |
664 | 8 I/Os before selecting a new file at random. For the non\-uniform | |
665 | distributions, a floating point postfix can be given to influence how the | |
666 | distribution is skewed. See \fBrandom_distribution\fR for a description | |
667 | of how that would work. | |
668 | .RE | |
669 | .TP | |
670 | .BI ioscheduler \fR=\fPstr | |
671 | Attempt to switch the device hosting the file to the specified I/O scheduler | |
672 | before running. | |
673 | .TP | |
674 | .BI create_serialize \fR=\fPbool | |
675 | If true, serialize the file creation for the jobs. This may be handy to | |
676 | avoid interleaving of data files, which may greatly depend on the filesystem | |
677 | used and even the number of processors in the system. Default: true. | |
678 | .TP | |
679 | .BI create_fsync \fR=\fPbool | |
680 | \fBfsync\fR\|(2) the data file after creation. This is the default. | |
681 | .TP | |
682 | .BI create_on_open \fR=\fPbool | |
683 | If true, don't pre\-create files but allow the job's open() to create a file | |
684 | when it's time to do I/O. Default: false \-\- pre\-create all necessary files | |
685 | when the job starts. | |
686 | .TP | |
687 | .BI create_only \fR=\fPbool | |
688 | If true, fio will only run the setup phase of the job. If files need to be | |
689 | laid out or updated on disk, only that will be done \-\- the actual job contents | |
690 | are not executed. Default: false. | |
691 | .TP | |
692 | .BI allow_file_create \fR=\fPbool | |
693 | If true, fio is permitted to create files as part of its workload. If this | |
694 | option is false, then fio will error out if | |
695 | the files it needs to use don't already exist. Default: true. | |
696 | .TP | |
697 | .BI allow_mounted_write \fR=\fPbool | |
698 | If this isn't set, fio will abort jobs that are destructive (e.g. that write) | |
699 | to what appears to be a mounted device or partition. This should help catch | |
700 | creating inadvertently destructive tests, not realizing that the test will | |
701 | destroy data on the mounted file system. Note that some platforms don't allow | |
702 | writing against a mounted device regardless of this option. Default: false. | |
703 | .TP | |
704 | .BI pre_read \fR=\fPbool | |
705 | If this is given, files will be pre\-read into memory before starting the | |
706 | given I/O operation. This will also clear the \fBinvalidate\fR flag, | |
707 | since it is pointless to pre\-read and then drop the cache. This will only | |
708 | work for I/O engines that are seek\-able, since they allow you to read the | |
709 | same data multiple times. Thus it will not work on non\-seekable I/O engines | |
710 | (e.g. network, splice). Default: false. | |
711 | .TP | |
712 | .BI unlink \fR=\fPbool | |
713 | Unlink the job files when done. Not the default, as repeated runs of that | |
714 | job would then waste time recreating the file set again and again. Default: | |
715 | false. | |
716 | .TP | |
717 | .BI unlink_each_loop \fR=\fPbool | |
718 | Unlink job files after each iteration or loop. Default: false. | |
719 | .TP | |
720 | .BI zonesize \fR=\fPint | |
721 | Divide a file into zones of the specified size. See \fBzoneskip\fR. | |
722 | .TP | |
723 | .BI zonerange \fR=\fPint | |
724 | Give size of an I/O zone. See \fBzoneskip\fR. | |
725 | .TP | |
726 | .BI zoneskip \fR=\fPint | |
727 | Skip the specified number of bytes when \fBzonesize\fR data has been | |
728 | read. The two zone options can be used to only do I/O on zones of a file. | |
729 | .SS "I/O type" | |
730 | .TP | |
731 | .BI direct \fR=\fPbool | |
732 | If value is true, use non\-buffered I/O. This is usually O_DIRECT. Note that | |
733 | ZFS on Solaris doesn't support direct I/O. On Windows the synchronous | |
734 | ioengines don't support direct I/O. Default: false. | |
735 | .TP | |
736 | .BI atomic \fR=\fPbool | |
737 | If value is true, attempt to use atomic direct I/O. Atomic writes are | |
738 | guaranteed to be stable once acknowledged by the operating system. Only | |
739 | Linux supports O_ATOMIC right now. | |
740 | .TP | |
741 | .BI buffered \fR=\fPbool | |
742 | If value is true, use buffered I/O. This is the opposite of the | |
743 | \fBdirect\fR option. Defaults to true. | |
d60e92d1 AC |
744 | .TP |
745 | .BI readwrite \fR=\fPstr "\fR,\fP rw" \fR=\fPstr | |
523bad63 | 746 | Type of I/O pattern. Accepted values are: |
d60e92d1 AC |
747 | .RS |
748 | .RS | |
749 | .TP | |
750 | .B read | |
d1429b5c | 751 | Sequential reads. |
d60e92d1 AC |
752 | .TP |
753 | .B write | |
d1429b5c | 754 | Sequential writes. |
d60e92d1 | 755 | .TP |
fa769d44 | 756 | .B trim |
169c098d | 757 | Sequential trims (Linux block devices only). |
fa769d44 | 758 | .TP |
d60e92d1 | 759 | .B randread |
d1429b5c | 760 | Random reads. |
d60e92d1 AC |
761 | .TP |
762 | .B randwrite | |
d1429b5c | 763 | Random writes. |
d60e92d1 | 764 | .TP |
fa769d44 | 765 | .B randtrim |
169c098d | 766 | Random trims (Linux block devices only). |
fa769d44 | 767 | .TP |
523bad63 TK |
768 | .B rw,readwrite |
769 | Sequential mixed reads and writes. | |
d60e92d1 | 770 | .TP |
ff6bb260 | 771 | .B randrw |
523bad63 | 772 | Random mixed reads and writes. |
82a90686 JA |
773 | .TP |
774 | .B trimwrite | |
523bad63 TK |
775 | Sequential trim+write sequences. Blocks will be trimmed first, |
776 | then the same blocks will be written to. | |
d60e92d1 AC |
777 | .RE |
778 | .P | |
523bad63 TK |
779 | Fio defaults to read if the option is not specified. For the mixed I/O |
780 | types, the default is to split them 50/50. For certain types of I/O the | |
781 | result may still be skewed a bit, since the speed may be different. | |
782 | .P | |
783 | It is possible to specify the number of I/Os to do before getting a new | |
784 | offset by appending `:<nr>' to the end of the string given. For a | |
785 | random read, it would look like `rw=randread:8' for passing in an offset | |
786 | modifier with a value of 8. If the suffix is used with a sequential I/O | |
787 | pattern, then the `<nr>' value specified will be added to the generated | |
788 | offset for each I/O turning sequential I/O into sequential I/O with holes. | |
789 | For instance, using `rw=write:4k' will skip 4k for every write. Also see | |
790 | the \fBrw_sequencer\fR option. | |
d60e92d1 AC |
791 | .RE |
792 | .TP | |
38dad62d | 793 | .BI rw_sequencer \fR=\fPstr |
523bad63 TK |
794 | If an offset modifier is given by appending a number to the `rw=\fIstr\fR' |
795 | line, then this option controls how that number modifies the I/O offset | |
796 | being generated. Accepted values are: | |
38dad62d JA |
797 | .RS |
798 | .RS | |
799 | .TP | |
800 | .B sequential | |
523bad63 | 801 | Generate sequential offset. |
38dad62d JA |
802 | .TP |
803 | .B identical | |
523bad63 | 804 | Generate the same offset. |
38dad62d JA |
805 | .RE |
806 | .P | |
523bad63 TK |
807 | \fBsequential\fR is only useful for random I/O, where fio would normally |
808 | generate a new random offset for every I/O. If you append e.g. 8 to randread, | |
809 | you would get a new random offset for every 8 I/Os. The result would be a | |
810 | seek for only every 8 I/Os, instead of for every I/O. Use `rw=randread:8' | |
811 | to specify that. As sequential I/O is already sequential, setting | |
812 | \fBsequential\fR for that would not result in any differences. \fBidentical\fR | |
813 | behaves in a similar fashion, except it sends the same offset 8 number of | |
814 | times before generating a new offset. | |
38dad62d | 815 | .RE |
90fef2d1 | 816 | .TP |
771e58be JA |
817 | .BI unified_rw_reporting \fR=\fPbool |
818 | Fio normally reports statistics on a per data direction basis, meaning that | |
523bad63 TK |
819 | reads, writes, and trims are accounted and reported separately. If this |
820 | option is set fio sums the results and report them as "mixed" instead. | |
771e58be | 821 | .TP |
d60e92d1 | 822 | .BI randrepeat \fR=\fPbool |
523bad63 TK |
823 | Seed the random number generator used for random I/O patterns in a |
824 | predictable way so the pattern is repeatable across runs. Default: true. | |
56e2a5fc CE |
825 | .TP |
826 | .BI allrandrepeat \fR=\fPbool | |
827 | Seed all random number generators in a predictable way so results are | |
523bad63 | 828 | repeatable across runs. Default: false. |
d60e92d1 | 829 | .TP |
04778baf JA |
830 | .BI randseed \fR=\fPint |
831 | Seed the random number generators based on this seed value, to be able to | |
832 | control what sequence of output is being generated. If not set, the random | |
833 | sequence depends on the \fBrandrepeat\fR setting. | |
834 | .TP | |
a596f047 | 835 | .BI fallocate \fR=\fPstr |
523bad63 TK |
836 | Whether pre\-allocation is performed when laying down files. |
837 | Accepted values are: | |
a596f047 EG |
838 | .RS |
839 | .RS | |
840 | .TP | |
841 | .B none | |
523bad63 | 842 | Do not pre\-allocate space. |
a596f047 | 843 | .TP |
2c3e17be | 844 | .B native |
523bad63 TK |
845 | Use a platform's native pre\-allocation call but fall back to |
846 | \fBnone\fR behavior if it fails/is not implemented. | |
2c3e17be | 847 | .TP |
a596f047 | 848 | .B posix |
523bad63 | 849 | Pre\-allocate via \fBposix_fallocate\fR\|(3). |
a596f047 EG |
850 | .TP |
851 | .B keep | |
523bad63 TK |
852 | Pre\-allocate via \fBfallocate\fR\|(2) with |
853 | FALLOC_FL_KEEP_SIZE set. | |
a596f047 EG |
854 | .TP |
855 | .B 0 | |
523bad63 | 856 | Backward\-compatible alias for \fBnone\fR. |
a596f047 EG |
857 | .TP |
858 | .B 1 | |
523bad63 | 859 | Backward\-compatible alias for \fBposix\fR. |
a596f047 EG |
860 | .RE |
861 | .P | |
523bad63 TK |
862 | May not be available on all supported platforms. \fBkeep\fR is only available |
863 | on Linux. If using ZFS on Solaris this cannot be set to \fBposix\fR | |
864 | because ZFS doesn't support pre\-allocation. Default: \fBnative\fR if any | |
865 | pre\-allocation methods are available, \fBnone\fR if not. | |
a596f047 | 866 | .RE |
7bc8c2cf | 867 | .TP |
ecb2083d | 868 | .BI fadvise_hint \fR=\fPstr |
cf145d90 | 869 | Use \fBposix_fadvise\fR\|(2) to advise the kernel what I/O patterns |
ecb2083d JA |
870 | are likely to be issued. Accepted values are: |
871 | .RS | |
872 | .RS | |
873 | .TP | |
874 | .B 0 | |
875 | Backwards compatible hint for "no hint". | |
876 | .TP | |
877 | .B 1 | |
878 | Backwards compatible hint for "advise with fio workload type". This | |
523bad63 | 879 | uses FADV_RANDOM for a random workload, and FADV_SEQUENTIAL |
ecb2083d JA |
880 | for a sequential workload. |
881 | .TP | |
882 | .B sequential | |
523bad63 | 883 | Advise using FADV_SEQUENTIAL. |
ecb2083d JA |
884 | .TP |
885 | .B random | |
523bad63 | 886 | Advise using FADV_RANDOM. |
ecb2083d JA |
887 | .RE |
888 | .RE | |
d60e92d1 | 889 | .TP |
8f4b9f24 | 890 | .BI write_hint \fR=\fPstr |
523bad63 TK |
891 | Use \fBfcntl\fR\|(2) to advise the kernel what life time to expect |
892 | from a write. Only supported on Linux, as of version 4.13. Accepted | |
8f4b9f24 JA |
893 | values are: |
894 | .RS | |
895 | .RS | |
896 | .TP | |
897 | .B none | |
898 | No particular life time associated with this file. | |
899 | .TP | |
900 | .B short | |
901 | Data written to this file has a short life time. | |
902 | .TP | |
903 | .B medium | |
904 | Data written to this file has a medium life time. | |
905 | .TP | |
906 | .B long | |
907 | Data written to this file has a long life time. | |
908 | .TP | |
909 | .B extreme | |
910 | Data written to this file has a very long life time. | |
911 | .RE | |
523bad63 TK |
912 | .P |
913 | The values are all relative to each other, and no absolute meaning | |
914 | should be associated with them. | |
8f4b9f24 | 915 | .RE |
37659335 | 916 | .TP |
523bad63 TK |
917 | .BI offset \fR=\fPint |
918 | Start I/O at the provided offset in the file, given as either a fixed size in | |
919 | bytes or a percentage. If a percentage is given, the next \fBblockalign\fR\-ed | |
920 | offset will be used. Data before the given offset will not be touched. This | |
921 | effectively caps the file size at `real_size \- offset'. Can be combined with | |
922 | \fBsize\fR to constrain the start and end range of the I/O workload. | |
923 | A percentage can be specified by a number between 1 and 100 followed by '%', | |
924 | for example, `offset=20%' to specify 20%. | |
6d500c2e | 925 | .TP |
523bad63 TK |
926 | .BI offset_increment \fR=\fPint |
927 | If this is provided, then the real offset becomes `\fBoffset\fR + \fBoffset_increment\fR | |
928 | * thread_number', where the thread number is a counter that starts at 0 and | |
929 | is incremented for each sub\-job (i.e. when \fBnumjobs\fR option is | |
930 | specified). This option is useful if there are several jobs which are | |
931 | intended to operate on a file in parallel disjoint segments, with even | |
932 | spacing between the starting points. | |
6d500c2e | 933 | .TP |
523bad63 TK |
934 | .BI number_ios \fR=\fPint |
935 | Fio will normally perform I/Os until it has exhausted the size of the region | |
936 | set by \fBsize\fR, or if it exhaust the allocated time (or hits an error | |
937 | condition). With this setting, the range/size can be set independently of | |
938 | the number of I/Os to perform. When fio reaches this number, it will exit | |
939 | normally and report status. Note that this does not extend the amount of I/O | |
940 | that will be done, it will only stop fio if this condition is met before | |
941 | other end\-of\-job criteria. | |
d60e92d1 | 942 | .TP |
523bad63 TK |
943 | .BI fsync \fR=\fPint |
944 | If writing to a file, issue an \fBfsync\fR\|(2) (or its equivalent) of | |
945 | the dirty data for every number of blocks given. For example, if you give 32 | |
946 | as a parameter, fio will sync the file after every 32 writes issued. If fio is | |
947 | using non\-buffered I/O, we may not sync the file. The exception is the sg | |
948 | I/O engine, which synchronizes the disk cache anyway. Defaults to 0, which | |
949 | means fio does not periodically issue and wait for a sync to complete. Also | |
950 | see \fBend_fsync\fR and \fBfsync_on_close\fR. | |
6d500c2e | 951 | .TP |
523bad63 TK |
952 | .BI fdatasync \fR=\fPint |
953 | Like \fBfsync\fR but uses \fBfdatasync\fR\|(2) to only sync data and | |
954 | not metadata blocks. In Windows, FreeBSD, and DragonFlyBSD there is no | |
955 | \fBfdatasync\fR\|(2) so this falls back to using \fBfsync\fR\|(2). | |
956 | Defaults to 0, which means fio does not periodically issue and wait for a | |
957 | data\-only sync to complete. | |
d60e92d1 | 958 | .TP |
523bad63 TK |
959 | .BI write_barrier \fR=\fPint |
960 | Make every N\-th write a barrier write. | |
901bb994 | 961 | .TP |
523bad63 TK |
962 | .BI sync_file_range \fR=\fPstr:int |
963 | Use \fBsync_file_range\fR\|(2) for every \fIint\fR number of write | |
964 | operations. Fio will track range of writes that have happened since the last | |
965 | \fBsync_file_range\fR\|(2) call. \fIstr\fR can currently be one or more of: | |
966 | .RS | |
967 | .RS | |
fd68418e | 968 | .TP |
523bad63 TK |
969 | .B wait_before |
970 | SYNC_FILE_RANGE_WAIT_BEFORE | |
c5751c62 | 971 | .TP |
523bad63 TK |
972 | .B write |
973 | SYNC_FILE_RANGE_WRITE | |
c5751c62 | 974 | .TP |
523bad63 TK |
975 | .B wait_after |
976 | SYNC_FILE_RANGE_WRITE_AFTER | |
2fa5a241 | 977 | .RE |
523bad63 TK |
978 | .P |
979 | So if you do `sync_file_range=wait_before,write:8', fio would use | |
980 | `SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE' for every 8 | |
981 | writes. Also see the \fBsync_file_range\fR\|(2) man page. This option is | |
982 | Linux specific. | |
2fa5a241 | 983 | .RE |
ce35b1ec | 984 | .TP |
523bad63 TK |
985 | .BI overwrite \fR=\fPbool |
986 | If true, writes to a file will always overwrite existing data. If the file | |
987 | doesn't already exist, it will be created before the write phase begins. If | |
988 | the file exists and is large enough for the specified write phase, nothing | |
989 | will be done. Default: false. | |
5c94b008 | 990 | .TP |
523bad63 TK |
991 | .BI end_fsync \fR=\fPbool |
992 | If true, \fBfsync\fR\|(2) file contents when a write stage has completed. | |
993 | Default: false. | |
d60e92d1 | 994 | .TP |
523bad63 TK |
995 | .BI fsync_on_close \fR=\fPbool |
996 | If true, fio will \fBfsync\fR\|(2) a dirty file on close. This differs | |
997 | from \fBend_fsync\fR in that it will happen on every file close, not | |
998 | just at the end of the job. Default: false. | |
d60e92d1 | 999 | .TP |
523bad63 TK |
1000 | .BI rwmixread \fR=\fPint |
1001 | Percentage of a mixed workload that should be reads. Default: 50. | |
1002 | .TP | |
1003 | .BI rwmixwrite \fR=\fPint | |
1004 | Percentage of a mixed workload that should be writes. If both | |
1005 | \fBrwmixread\fR and \fBrwmixwrite\fR is given and the values do not | |
1006 | add up to 100%, the latter of the two will be used to override the | |
1007 | first. This may interfere with a given rate setting, if fio is asked to | |
1008 | limit reads or writes to a certain rate. If that is the case, then the | |
1009 | distribution may be skewed. Default: 50. | |
1010 | .TP | |
1011 | .BI random_distribution \fR=\fPstr:float[,str:float][,str:float] | |
1012 | By default, fio will use a completely uniform random distribution when asked | |
1013 | to perform random I/O. Sometimes it is useful to skew the distribution in | |
1014 | specific ways, ensuring that some parts of the data is more hot than others. | |
1015 | fio includes the following distribution models: | |
d60e92d1 AC |
1016 | .RS |
1017 | .RS | |
1018 | .TP | |
1019 | .B random | |
523bad63 | 1020 | Uniform random distribution |
8c07860d JA |
1021 | .TP |
1022 | .B zipf | |
523bad63 | 1023 | Zipf distribution |
8c07860d JA |
1024 | .TP |
1025 | .B pareto | |
523bad63 | 1026 | Pareto distribution |
8c07860d | 1027 | .TP |
dd3503d3 | 1028 | .B normal |
523bad63 | 1029 | Normal (Gaussian) distribution |
dd3503d3 | 1030 | .TP |
523bad63 TK |
1031 | .B zoned |
1032 | Zoned random distribution | |
d60e92d1 AC |
1033 | .RE |
1034 | .P | |
523bad63 TK |
1035 | When using a \fBzipf\fR or \fBpareto\fR distribution, an input value is also |
1036 | needed to define the access pattern. For \fBzipf\fR, this is the `Zipf theta'. | |
1037 | For \fBpareto\fR, it's the `Pareto power'. Fio includes a test | |
1038 | program, \fBfio\-genzipf\fR, that can be used visualize what the given input | |
1039 | values will yield in terms of hit rates. If you wanted to use \fBzipf\fR with | |
1040 | a `theta' of 1.2, you would use `random_distribution=zipf:1.2' as the | |
1041 | option. If a non\-uniform model is used, fio will disable use of the random | |
1042 | map. For the \fBnormal\fR distribution, a normal (Gaussian) deviation is | |
1043 | supplied as a value between 0 and 100. | |
1044 | .P | |
1045 | For a \fBzoned\fR distribution, fio supports specifying percentages of I/O | |
1046 | access that should fall within what range of the file or device. For | |
1047 | example, given a criteria of: | |
d60e92d1 | 1048 | .RS |
523bad63 TK |
1049 | .P |
1050 | .PD 0 | |
1051 | 60% of accesses should be to the first 10% | |
1052 | .P | |
1053 | 30% of accesses should be to the next 20% | |
1054 | .P | |
1055 | 8% of accesses should be to the next 30% | |
1056 | .P | |
1057 | 2% of accesses should be to the next 40% | |
1058 | .PD | |
1059 | .RE | |
1060 | .P | |
1061 | we can define that through zoning of the random accesses. For the above | |
1062 | example, the user would do: | |
1063 | .RS | |
1064 | .P | |
1065 | random_distribution=zoned:60/10:30/20:8/30:2/40 | |
1066 | .RE | |
1067 | .P | |
1068 | similarly to how \fBbssplit\fR works for setting ranges and percentages | |
1069 | of block sizes. Like \fBbssplit\fR, it's possible to specify separate | |
1070 | zones for reads, writes, and trims. If just one set is given, it'll apply to | |
1071 | all of them. | |
1072 | .RE | |
1073 | .TP | |
1074 | .BI percentage_random \fR=\fPint[,int][,int] | |
1075 | For a random workload, set how big a percentage should be random. This | |
1076 | defaults to 100%, in which case the workload is fully random. It can be set | |
1077 | from anywhere from 0 to 100. Setting it to 0 would make the workload fully | |
1078 | sequential. Any setting in between will result in a random mix of sequential | |
1079 | and random I/O, at the given percentages. Comma\-separated values may be | |
1080 | specified for reads, writes, and trims as described in \fBblocksize\fR. | |
1081 | .TP | |
1082 | .BI norandommap | |
1083 | Normally fio will cover every block of the file when doing random I/O. If | |
1084 | this option is given, fio will just get a new random offset without looking | |
1085 | at past I/O history. This means that some blocks may not be read or written, | |
1086 | and that some blocks may be read/written more than once. If this option is | |
1087 | used with \fBverify\fR and multiple blocksizes (via \fBbsrange\fR), | |
1088 | only intact blocks are verified, i.e., partially\-overwritten blocks are | |
1089 | ignored. | |
1090 | .TP | |
1091 | .BI softrandommap \fR=\fPbool | |
1092 | See \fBnorandommap\fR. If fio runs with the random block map enabled and | |
1093 | it fails to allocate the map, if this option is set it will continue without | |
1094 | a random block map. As coverage will not be as complete as with random maps, | |
1095 | this option is disabled by default. | |
1096 | .TP | |
1097 | .BI random_generator \fR=\fPstr | |
1098 | Fio supports the following engines for generating I/O offsets for random I/O: | |
1099 | .RS | |
1100 | .RS | |
1101 | .TP | |
1102 | .B tausworthe | |
1103 | Strong 2^88 cycle random number generator. | |
1104 | .TP | |
1105 | .B lfsr | |
1106 | Linear feedback shift register generator. | |
1107 | .TP | |
1108 | .B tausworthe64 | |
1109 | Strong 64\-bit 2^258 cycle random number generator. | |
1110 | .RE | |
1111 | .P | |
1112 | \fBtausworthe\fR is a strong random number generator, but it requires tracking | |
1113 | on the side if we want to ensure that blocks are only read or written | |
1114 | once. \fBlfsr\fR guarantees that we never generate the same offset twice, and | |
1115 | it's also less computationally expensive. It's not a true random generator, | |
1116 | however, though for I/O purposes it's typically good enough. \fBlfsr\fR only | |
1117 | works with single block sizes, not with workloads that use multiple block | |
1118 | sizes. If used with such a workload, fio may read or write some blocks | |
1119 | multiple times. The default value is \fBtausworthe\fR, unless the required | |
1120 | space exceeds 2^32 blocks. If it does, then \fBtausworthe64\fR is | |
1121 | selected automatically. | |
1122 | .RE | |
1123 | .SS "Block size" | |
1124 | .TP | |
1125 | .BI blocksize \fR=\fPint[,int][,int] "\fR,\fB bs" \fR=\fPint[,int][,int] | |
1126 | The block size in bytes used for I/O units. Default: 4096. A single value | |
1127 | applies to reads, writes, and trims. Comma\-separated values may be | |
1128 | specified for reads, writes, and trims. A value not terminated in a comma | |
1129 | applies to subsequent types. Examples: | |
1130 | .RS | |
1131 | .RS | |
1132 | .P | |
1133 | .PD 0 | |
1134 | bs=256k means 256k for reads, writes and trims. | |
1135 | .P | |
1136 | bs=8k,32k means 8k for reads, 32k for writes and trims. | |
1137 | .P | |
1138 | bs=8k,32k, means 8k for reads, 32k for writes, and default for trims. | |
1139 | .P | |
1140 | bs=,8k means default for reads, 8k for writes and trims. | |
1141 | .P | |
1142 | bs=,8k, means default for reads, 8k for writes, and default for trims. | |
1143 | .PD | |
1144 | .RE | |
1145 | .RE | |
1146 | .TP | |
1147 | .BI blocksize_range \fR=\fPirange[,irange][,irange] "\fR,\fB bsrange" \fR=\fPirange[,irange][,irange] | |
1148 | A range of block sizes in bytes for I/O units. The issued I/O unit will | |
1149 | always be a multiple of the minimum size, unless | |
1150 | \fBblocksize_unaligned\fR is set. | |
1151 | Comma\-separated ranges may be specified for reads, writes, and trims as | |
1152 | described in \fBblocksize\fR. Example: | |
1153 | .RS | |
1154 | .RS | |
1155 | .P | |
1156 | bsrange=1k\-4k,2k\-8k | |
1157 | .RE | |
1158 | .RE | |
1159 | .TP | |
1160 | .BI bssplit \fR=\fPstr[,str][,str] | |
1161 | Sometimes you want even finer grained control of the block sizes issued, not | |
1162 | just an even split between them. This option allows you to weight various | |
1163 | block sizes, so that you are able to define a specific amount of block sizes | |
1164 | issued. The format for this option is: | |
1165 | .RS | |
1166 | .RS | |
1167 | .P | |
1168 | bssplit=blocksize/percentage:blocksize/percentage | |
1169 | .RE | |
1170 | .P | |
1171 | for as many block sizes as needed. So if you want to define a workload that | |
1172 | has 50% 64k blocks, 10% 4k blocks, and 40% 32k blocks, you would write: | |
1173 | .RS | |
1174 | .P | |
1175 | bssplit=4k/10:64k/50:32k/40 | |
1176 | .RE | |
1177 | .P | |
1178 | Ordering does not matter. If the percentage is left blank, fio will fill in | |
1179 | the remaining values evenly. So a bssplit option like this one: | |
1180 | .RS | |
1181 | .P | |
1182 | bssplit=4k/50:1k/:32k/ | |
1183 | .RE | |
1184 | .P | |
1185 | would have 50% 4k ios, and 25% 1k and 32k ios. The percentages always add up | |
1186 | to 100, if bssplit is given a range that adds up to more, it will error out. | |
1187 | .P | |
1188 | Comma\-separated values may be specified for reads, writes, and trims as | |
1189 | described in \fBblocksize\fR. | |
1190 | .P | |
1191 | If you want a workload that has 50% 2k reads and 50% 4k reads, while having | |
1192 | 90% 4k writes and 10% 8k writes, you would specify: | |
1193 | .RS | |
1194 | .P | |
1195 | bssplit=2k/50:4k/50,4k/90,8k/10 | |
1196 | .RE | |
1197 | .RE | |
1198 | .TP | |
1199 | .BI blocksize_unaligned "\fR,\fB bs_unaligned" | |
1200 | If set, fio will issue I/O units with any size within | |
1201 | \fBblocksize_range\fR, not just multiples of the minimum size. This | |
1202 | typically won't work with direct I/O, as that normally requires sector | |
1203 | alignment. | |
1204 | .TP | |
1205 | .BI bs_is_seq_rand \fR=\fPbool | |
1206 | If this option is set, fio will use the normal read,write blocksize settings | |
1207 | as sequential,random blocksize settings instead. Any random read or write | |
1208 | will use the WRITE blocksize settings, and any sequential read or write will | |
1209 | use the READ blocksize settings. | |
1210 | .TP | |
1211 | .BI blockalign \fR=\fPint[,int][,int] "\fR,\fB ba" \fR=\fPint[,int][,int] | |
1212 | Boundary to which fio will align random I/O units. Default: | |
1213 | \fBblocksize\fR. Minimum alignment is typically 512b for using direct | |
1214 | I/O, though it usually depends on the hardware block size. This option is | |
1215 | mutually exclusive with using a random map for files, so it will turn off | |
1216 | that option. Comma\-separated values may be specified for reads, writes, and | |
1217 | trims as described in \fBblocksize\fR. | |
1218 | .SS "Buffers and memory" | |
1219 | .TP | |
1220 | .BI zero_buffers | |
1221 | Initialize buffers with all zeros. Default: fill buffers with random data. | |
1222 | .TP | |
1223 | .BI refill_buffers | |
1224 | If this option is given, fio will refill the I/O buffers on every | |
1225 | submit. The default is to only fill it at init time and reuse that | |
1226 | data. Only makes sense if zero_buffers isn't specified, naturally. If data | |
1227 | verification is enabled, \fBrefill_buffers\fR is also automatically enabled. | |
1228 | .TP | |
1229 | .BI scramble_buffers \fR=\fPbool | |
1230 | If \fBrefill_buffers\fR is too costly and the target is using data | |
1231 | deduplication, then setting this option will slightly modify the I/O buffer | |
1232 | contents to defeat normal de\-dupe attempts. This is not enough to defeat | |
1233 | more clever block compression attempts, but it will stop naive dedupe of | |
1234 | blocks. Default: true. | |
1235 | .TP | |
1236 | .BI buffer_compress_percentage \fR=\fPint | |
1237 | If this is set, then fio will attempt to provide I/O buffer content (on | |
1238 | WRITEs) that compresses to the specified level. Fio does this by providing a | |
1239 | mix of random data and a fixed pattern. The fixed pattern is either zeros, | |
1240 | or the pattern specified by \fBbuffer_pattern\fR. If the pattern option | |
1241 | is used, it might skew the compression ratio slightly. Note that this is per | |
1242 | block size unit, for file/disk wide compression level that matches this | |
1243 | setting, you'll also want to set \fBrefill_buffers\fR. | |
1244 | .TP | |
1245 | .BI buffer_compress_chunk \fR=\fPint | |
1246 | See \fBbuffer_compress_percentage\fR. This setting allows fio to manage | |
1247 | how big the ranges of random data and zeroed data is. Without this set, fio | |
1248 | will provide \fBbuffer_compress_percentage\fR of blocksize random data, | |
1249 | followed by the remaining zeroed. With this set to some chunk size smaller | |
1250 | than the block size, fio can alternate random and zeroed data throughout the | |
1251 | I/O buffer. | |
1252 | .TP | |
1253 | .BI buffer_pattern \fR=\fPstr | |
1254 | If set, fio will fill the I/O buffers with this pattern or with the contents | |
1255 | of a file. If not set, the contents of I/O buffers are defined by the other | |
1256 | options related to buffer contents. The setting can be any pattern of bytes, | |
1257 | and can be prefixed with 0x for hex values. It may also be a string, where | |
1258 | the string must then be wrapped with "". Or it may also be a filename, | |
1259 | where the filename must be wrapped with '' in which case the file is | |
1260 | opened and read. Note that not all the file contents will be read if that | |
1261 | would cause the buffers to overflow. So, for example: | |
1262 | .RS | |
1263 | .RS | |
1264 | .P | |
1265 | .PD 0 | |
1266 | buffer_pattern='filename' | |
1267 | .P | |
1268 | or: | |
1269 | .P | |
1270 | buffer_pattern="abcd" | |
1271 | .P | |
1272 | or: | |
1273 | .P | |
1274 | buffer_pattern=\-12 | |
1275 | .P | |
1276 | or: | |
1277 | .P | |
1278 | buffer_pattern=0xdeadface | |
1279 | .PD | |
1280 | .RE | |
1281 | .P | |
1282 | Also you can combine everything together in any order: | |
1283 | .RS | |
1284 | .P | |
1285 | buffer_pattern=0xdeadface"abcd"\-12'filename' | |
1286 | .RE | |
1287 | .RE | |
1288 | .TP | |
1289 | .BI dedupe_percentage \fR=\fPint | |
1290 | If set, fio will generate this percentage of identical buffers when | |
1291 | writing. These buffers will be naturally dedupable. The contents of the | |
1292 | buffers depend on what other buffer compression settings have been set. It's | |
1293 | possible to have the individual buffers either fully compressible, or not at | |
1294 | all. This option only controls the distribution of unique buffers. | |
1295 | .TP | |
1296 | .BI invalidate \fR=\fPbool | |
1297 | Invalidate the buffer/page cache parts of the files to be used prior to | |
1298 | starting I/O if the platform and file type support it. Defaults to true. | |
1299 | This will be ignored if \fBpre_read\fR is also specified for the | |
1300 | same job. | |
1301 | .TP | |
1302 | .BI sync \fR=\fPbool | |
1303 | Use synchronous I/O for buffered writes. For the majority of I/O engines, | |
1304 | this means using O_SYNC. Default: false. | |
1305 | .TP | |
1306 | .BI iomem \fR=\fPstr "\fR,\fP mem" \fR=\fPstr | |
1307 | Fio can use various types of memory as the I/O unit buffer. The allowed | |
1308 | values are: | |
1309 | .RS | |
1310 | .RS | |
1311 | .TP | |
1312 | .B malloc | |
1313 | Use memory from \fBmalloc\fR\|(3) as the buffers. Default memory type. | |
1314 | .TP | |
1315 | .B shm | |
1316 | Use shared memory as the buffers. Allocated through \fBshmget\fR\|(2). | |
1317 | .TP | |
1318 | .B shmhuge | |
1319 | Same as \fBshm\fR, but use huge pages as backing. | |
1320 | .TP | |
1321 | .B mmap | |
1322 | Use \fBmmap\fR\|(2) to allocate buffers. May either be anonymous memory, or can | |
1323 | be file backed if a filename is given after the option. The format | |
1324 | is `mem=mmap:/path/to/file'. | |
1325 | .TP | |
1326 | .B mmaphuge | |
1327 | Use a memory mapped huge file as the buffer backing. Append filename | |
1328 | after mmaphuge, ala `mem=mmaphuge:/hugetlbfs/file'. | |
1329 | .TP | |
1330 | .B mmapshared | |
1331 | Same as \fBmmap\fR, but use a MMAP_SHARED mapping. | |
1332 | .TP | |
1333 | .B cudamalloc | |
1334 | Use GPU memory as the buffers for GPUDirect RDMA benchmark. | |
1335 | The \fBioengine\fR must be \fBrdma\fR. | |
1336 | .RE | |
1337 | .P | |
1338 | The area allocated is a function of the maximum allowed bs size for the job, | |
1339 | multiplied by the I/O depth given. Note that for \fBshmhuge\fR and | |
1340 | \fBmmaphuge\fR to work, the system must have free huge pages allocated. This | |
1341 | can normally be checked and set by reading/writing | |
1342 | `/proc/sys/vm/nr_hugepages' on a Linux system. Fio assumes a huge page | |
1343 | is 4MiB in size. So to calculate the number of huge pages you need for a | |
1344 | given job file, add up the I/O depth of all jobs (normally one unless | |
1345 | \fBiodepth\fR is used) and multiply by the maximum bs set. Then divide | |
1346 | that number by the huge page size. You can see the size of the huge pages in | |
1347 | `/proc/meminfo'. If no huge pages are allocated by having a non\-zero | |
1348 | number in `nr_hugepages', using \fBmmaphuge\fR or \fBshmhuge\fR will fail. Also | |
1349 | see \fBhugepage\-size\fR. | |
1350 | .P | |
1351 | \fBmmaphuge\fR also needs to have hugetlbfs mounted and the file location | |
1352 | should point there. So if it's mounted in `/huge', you would use | |
1353 | `mem=mmaphuge:/huge/somefile'. | |
1354 | .RE | |
1355 | .TP | |
1356 | .BI iomem_align \fR=\fPint "\fR,\fP mem_align" \fR=\fPint | |
1357 | This indicates the memory alignment of the I/O memory buffers. Note that | |
1358 | the given alignment is applied to the first I/O unit buffer, if using | |
1359 | \fBiodepth\fR the alignment of the following buffers are given by the | |
1360 | \fBbs\fR used. In other words, if using a \fBbs\fR that is a | |
1361 | multiple of the page sized in the system, all buffers will be aligned to | |
1362 | this value. If using a \fBbs\fR that is not page aligned, the alignment | |
1363 | of subsequent I/O memory buffers is the sum of the \fBiomem_align\fR and | |
1364 | \fBbs\fR used. | |
1365 | .TP | |
1366 | .BI hugepage\-size \fR=\fPint | |
1367 | Defines the size of a huge page. Must at least be equal to the system | |
1368 | setting, see `/proc/meminfo'. Defaults to 4MiB. Should probably | |
1369 | always be a multiple of megabytes, so using `hugepage\-size=Xm' is the | |
1370 | preferred way to set this to avoid setting a non\-pow\-2 bad value. | |
1371 | .TP | |
1372 | .BI lockmem \fR=\fPint | |
1373 | Pin the specified amount of memory with \fBmlock\fR\|(2). Can be used to | |
1374 | simulate a smaller amount of memory. The amount specified is per worker. | |
1375 | .SS "I/O size" | |
1376 | .TP | |
1377 | .BI size \fR=\fPint | |
1378 | The total size of file I/O for each thread of this job. Fio will run until | |
1379 | this many bytes has been transferred, unless runtime is limited by other options | |
1380 | (such as \fBruntime\fR, for instance, or increased/decreased by \fBio_size\fR). | |
1381 | Fio will divide this size between the available files determined by options | |
1382 | such as \fBnrfiles\fR, \fBfilename\fR, unless \fBfilesize\fR is | |
1383 | specified by the job. If the result of division happens to be 0, the size is | |
1384 | set to the physical size of the given files or devices if they exist. | |
1385 | If this option is not specified, fio will use the full size of the given | |
1386 | files or devices. If the files do not exist, size must be given. It is also | |
1387 | possible to give size as a percentage between 1 and 100. If `size=20%' is | |
1388 | given, fio will use 20% of the full size of the given files or devices. | |
1389 | Can be combined with \fBoffset\fR to constrain the start and end range | |
1390 | that I/O will be done within. | |
1391 | .TP | |
1392 | .BI io_size \fR=\fPint "\fR,\fB io_limit" \fR=\fPint | |
1393 | Normally fio operates within the region set by \fBsize\fR, which means | |
1394 | that the \fBsize\fR option sets both the region and size of I/O to be | |
1395 | performed. Sometimes that is not what you want. With this option, it is | |
1396 | possible to define just the amount of I/O that fio should do. For instance, | |
1397 | if \fBsize\fR is set to 20GiB and \fBio_size\fR is set to 5GiB, fio | |
1398 | will perform I/O within the first 20GiB but exit when 5GiB have been | |
1399 | done. The opposite is also possible \-\- if \fBsize\fR is set to 20GiB, | |
1400 | and \fBio_size\fR is set to 40GiB, then fio will do 40GiB of I/O within | |
1401 | the 0..20GiB region. | |
1402 | .TP | |
1403 | .BI filesize \fR=\fPirange(int) | |
1404 | Individual file sizes. May be a range, in which case fio will select sizes | |
1405 | for files at random within the given range and limited to \fBsize\fR in | |
1406 | total (if that is given). If not given, each created file is the same size. | |
1407 | This option overrides \fBsize\fR in terms of file size, which means | |
1408 | this value is used as a fixed size or possible range of each file. | |
1409 | .TP | |
1410 | .BI file_append \fR=\fPbool | |
1411 | Perform I/O after the end of the file. Normally fio will operate within the | |
1412 | size of a file. If this option is set, then fio will append to the file | |
1413 | instead. This has identical behavior to setting \fBoffset\fR to the size | |
1414 | of a file. This option is ignored on non\-regular files. | |
1415 | .TP | |
1416 | .BI fill_device \fR=\fPbool "\fR,\fB fill_fs" \fR=\fPbool | |
1417 | Sets size to something really large and waits for ENOSPC (no space left on | |
1418 | device) as the terminating condition. Only makes sense with sequential | |
1419 | write. For a read workload, the mount point will be filled first then I/O | |
1420 | started on the result. This option doesn't make sense if operating on a raw | |
1421 | device node, since the size of that is already known by the file system. | |
1422 | Additionally, writing beyond end\-of\-device will not return ENOSPC there. | |
1423 | .SS "I/O engine" | |
1424 | .TP | |
1425 | .BI ioengine \fR=\fPstr | |
1426 | Defines how the job issues I/O to the file. The following types are defined: | |
1427 | .RS | |
1428 | .RS | |
1429 | .TP | |
1430 | .B sync | |
1431 | Basic \fBread\fR\|(2) or \fBwrite\fR\|(2) | |
1432 | I/O. \fBlseek\fR\|(2) is used to position the I/O location. | |
1433 | See \fBfsync\fR and \fBfdatasync\fR for syncing write I/Os. | |
1434 | .TP | |
1435 | .B psync | |
1436 | Basic \fBpread\fR\|(2) or \fBpwrite\fR\|(2) I/O. Default on | |
1437 | all supported operating systems except for Windows. | |
1438 | .TP | |
1439 | .B vsync | |
1440 | Basic \fBreadv\fR\|(2) or \fBwritev\fR\|(2) I/O. Will emulate | |
1441 | queuing by coalescing adjacent I/Os into a single submission. | |
1442 | .TP | |
1443 | .B pvsync | |
1444 | Basic \fBpreadv\fR\|(2) or \fBpwritev\fR\|(2) I/O. | |
a46c5e01 | 1445 | .TP |
2cafffbe JA |
1446 | .B pvsync2 |
1447 | Basic \fBpreadv2\fR\|(2) or \fBpwritev2\fR\|(2) I/O. | |
1448 | .TP | |
d60e92d1 | 1449 | .B libaio |
523bad63 TK |
1450 | Linux native asynchronous I/O. Note that Linux may only support |
1451 | queued behavior with non\-buffered I/O (set `direct=1' or | |
1452 | `buffered=0'). | |
1453 | This engine defines engine specific options. | |
d60e92d1 AC |
1454 | .TP |
1455 | .B posixaio | |
523bad63 TK |
1456 | POSIX asynchronous I/O using \fBaio_read\fR\|(3) and |
1457 | \fBaio_write\fR\|(3). | |
03e20d68 BC |
1458 | .TP |
1459 | .B solarisaio | |
1460 | Solaris native asynchronous I/O. | |
1461 | .TP | |
1462 | .B windowsaio | |
38f8c318 | 1463 | Windows native asynchronous I/O. Default on Windows. |
d60e92d1 AC |
1464 | .TP |
1465 | .B mmap | |
523bad63 TK |
1466 | File is memory mapped with \fBmmap\fR\|(2) and data copied |
1467 | to/from using \fBmemcpy\fR\|(3). | |
d60e92d1 AC |
1468 | .TP |
1469 | .B splice | |
523bad63 TK |
1470 | \fBsplice\fR\|(2) is used to transfer the data and |
1471 | \fBvmsplice\fR\|(2) to transfer data from user space to the | |
1472 | kernel. | |
d60e92d1 | 1473 | .TP |
d60e92d1 | 1474 | .B sg |
523bad63 TK |
1475 | SCSI generic sg v3 I/O. May either be synchronous using the SG_IO |
1476 | ioctl, or if the target is an sg character device we use | |
1477 | \fBread\fR\|(2) and \fBwrite\fR\|(2) for asynchronous | |
1478 | I/O. Requires \fBfilename\fR option to specify either block or | |
1479 | character devices. | |
d60e92d1 AC |
1480 | .TP |
1481 | .B null | |
523bad63 TK |
1482 | Doesn't transfer any data, just pretends to. This is mainly used to |
1483 | exercise fio itself and for debugging/testing purposes. | |
d60e92d1 AC |
1484 | .TP |
1485 | .B net | |
523bad63 TK |
1486 | Transfer over the network to given `host:port'. Depending on the |
1487 | \fBprotocol\fR used, the \fBhostname\fR, \fBport\fR, | |
1488 | \fBlisten\fR and \fBfilename\fR options are used to specify | |
1489 | what sort of connection to make, while the \fBprotocol\fR option | |
1490 | determines which protocol will be used. This engine defines engine | |
1491 | specific options. | |
d60e92d1 AC |
1492 | .TP |
1493 | .B netsplice | |
523bad63 TK |
1494 | Like \fBnet\fR, but uses \fBsplice\fR\|(2) and |
1495 | \fBvmsplice\fR\|(2) to map data and send/receive. | |
1496 | This engine defines engine specific options. | |
d60e92d1 | 1497 | .TP |
53aec0a4 | 1498 | .B cpuio |
523bad63 TK |
1499 | Doesn't transfer any data, but burns CPU cycles according to the |
1500 | \fBcpuload\fR and \fBcpuchunks\fR options. Setting | |
1501 | \fBcpuload\fR\=85 will cause that job to do nothing but burn 85% | |
1502 | of the CPU. In case of SMP machines, use `numjobs=<nr_of_cpu>' | |
1503 | to get desired CPU usage, as the cpuload only loads a | |
1504 | single CPU at the desired rate. A job never finishes unless there is | |
1505 | at least one non\-cpuio job. | |
d60e92d1 AC |
1506 | .TP |
1507 | .B guasi | |
523bad63 TK |
1508 | The GUASI I/O engine is the Generic Userspace Asyncronous Syscall |
1509 | Interface approach to async I/O. See \fIhttp://www.xmailserver.org/guasi\-lib.html\fR | |
1510 | for more info on GUASI. | |
d60e92d1 | 1511 | .TP |
21b8aee8 | 1512 | .B rdma |
523bad63 TK |
1513 | The RDMA I/O engine supports both RDMA memory semantics |
1514 | (RDMA_WRITE/RDMA_READ) and channel semantics (Send/Recv) for the | |
1515 | InfiniBand, RoCE and iWARP protocols. | |
d54fce84 DM |
1516 | .TP |
1517 | .B falloc | |
523bad63 TK |
1518 | I/O engine that does regular fallocate to simulate data transfer as |
1519 | fio ioengine. | |
1520 | .RS | |
1521 | .P | |
1522 | .PD 0 | |
1523 | DDIR_READ does fallocate(,mode = FALLOC_FL_KEEP_SIZE,). | |
1524 | .P | |
1525 | DIR_WRITE does fallocate(,mode = 0). | |
1526 | .P | |
1527 | DDIR_TRIM does fallocate(,mode = FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE). | |
1528 | .PD | |
1529 | .RE | |
1530 | .TP | |
1531 | .B ftruncate | |
1532 | I/O engine that sends \fBftruncate\fR\|(2) operations in response | |
1533 | to write (DDIR_WRITE) events. Each ftruncate issued sets the file's | |
1534 | size to the current block offset. \fBblocksize\fR is ignored. | |
d54fce84 DM |
1535 | .TP |
1536 | .B e4defrag | |
523bad63 TK |
1537 | I/O engine that does regular EXT4_IOC_MOVE_EXT ioctls to simulate |
1538 | defragment activity in request to DDIR_WRITE event. | |
0d978694 DAG |
1539 | .TP |
1540 | .B rbd | |
523bad63 TK |
1541 | I/O engine supporting direct access to Ceph Rados Block Devices |
1542 | (RBD) via librbd without the need to use the kernel rbd driver. This | |
1543 | ioengine defines engine specific options. | |
a7c386f4 | 1544 | .TP |
1545 | .B gfapi | |
523bad63 TK |
1546 | Using GlusterFS libgfapi sync interface to direct access to |
1547 | GlusterFS volumes without having to go through FUSE. This ioengine | |
1548 | defines engine specific options. | |
cc47f094 | 1549 | .TP |
1550 | .B gfapi_async | |
523bad63 TK |
1551 | Using GlusterFS libgfapi async interface to direct access to |
1552 | GlusterFS volumes without having to go through FUSE. This ioengine | |
1553 | defines engine specific options. | |
1b10477b | 1554 | .TP |
b74e419e | 1555 | .B libhdfs |
523bad63 TK |
1556 | Read and write through Hadoop (HDFS). The \fBfilename\fR option |
1557 | is used to specify host,port of the hdfs name\-node to connect. This | |
1558 | engine interprets offsets a little differently. In HDFS, files once | |
1559 | created cannot be modified so random writes are not possible. To | |
1560 | imitate this the libhdfs engine expects a bunch of small files to be | |
1561 | created over HDFS and will randomly pick a file from them | |
1562 | based on the offset generated by fio backend (see the example | |
1563 | job file to create such files, use `rw=write' option). Please | |
1564 | note, it may be necessary to set environment variables to work | |
1565 | with HDFS/libhdfs properly. Each job uses its own connection to | |
1566 | HDFS. | |
65fa28ca DE |
1567 | .TP |
1568 | .B mtd | |
523bad63 TK |
1569 | Read, write and erase an MTD character device (e.g., |
1570 | `/dev/mtd0'). Discards are treated as erases. Depending on the | |
1571 | underlying device type, the I/O may have to go in a certain pattern, | |
1572 | e.g., on NAND, writing sequentially to erase blocks and discarding | |
1573 | before overwriting. The \fBtrimwrite\fR mode works well for this | |
65fa28ca | 1574 | constraint. |
5c4ef02e JA |
1575 | .TP |
1576 | .B pmemblk | |
523bad63 TK |
1577 | Read and write using filesystem DAX to a file on a filesystem |
1578 | mounted with DAX on a persistent memory device through the NVML | |
1579 | libpmemblk library. | |
104ee4de | 1580 | .TP |
523bad63 TK |
1581 | .B dev\-dax |
1582 | Read and write using device DAX to a persistent memory device (e.g., | |
1583 | /dev/dax0.0) through the NVML libpmem library. | |
d60e92d1 | 1584 | .TP |
523bad63 TK |
1585 | .B external |
1586 | Prefix to specify loading an external I/O engine object file. Append | |
1587 | the engine filename, e.g. `ioengine=external:/tmp/foo.o' to load | |
1588 | ioengine `foo.o' in `/tmp'. | |
1589 | .SS "I/O engine specific parameters" | |
1590 | In addition, there are some parameters which are only valid when a specific | |
1591 | \fBioengine\fR is in use. These are used identically to normal parameters, | |
1592 | with the caveat that when used on the command line, they must come after the | |
1593 | \fBioengine\fR that defines them is selected. | |
d60e92d1 | 1594 | .TP |
523bad63 TK |
1595 | .BI (libaio)userspace_reap |
1596 | Normally, with the libaio engine in use, fio will use the | |
1597 | \fBio_getevents\fR\|(3) system call to reap newly returned events. With | |
1598 | this flag turned on, the AIO ring will be read directly from user\-space to | |
1599 | reap events. The reaping mode is only enabled when polling for a minimum of | |
1600 | 0 events (e.g. when `iodepth_batch_complete=0'). | |
3ce9dcaf | 1601 | .TP |
523bad63 TK |
1602 | .BI (pvsync2)hipri |
1603 | Set RWF_HIPRI on I/O, indicating to the kernel that it's of higher priority | |
1604 | than normal. | |
82407585 | 1605 | .TP |
523bad63 TK |
1606 | .BI (pvsync2)hipri_percentage |
1607 | When hipri is set this determines the probability of a pvsync2 I/O being high | |
1608 | priority. The default is 100%. | |
d60e92d1 | 1609 | .TP |
523bad63 TK |
1610 | .BI (cpuio)cpuload \fR=\fPint |
1611 | Attempt to use the specified percentage of CPU cycles. This is a mandatory | |
1612 | option when using cpuio I/O engine. | |
997b5680 | 1613 | .TP |
523bad63 TK |
1614 | .BI (cpuio)cpuchunks \fR=\fPint |
1615 | Split the load into cycles of the given time. In microseconds. | |
1ad01bd1 | 1616 | .TP |
523bad63 TK |
1617 | .BI (cpuio)exit_on_io_done \fR=\fPbool |
1618 | Detect when I/O threads are done, then exit. | |
d60e92d1 | 1619 | .TP |
523bad63 TK |
1620 | .BI (libhdfs)namenode \fR=\fPstr |
1621 | The hostname or IP address of a HDFS cluster namenode to contact. | |
d01612f3 | 1622 | .TP |
523bad63 TK |
1623 | .BI (libhdfs)port |
1624 | The listening port of the HFDS cluster namenode. | |
d60e92d1 | 1625 | .TP |
523bad63 TK |
1626 | .BI (netsplice,net)port |
1627 | The TCP or UDP port to bind to or connect to. If this is used with | |
1628 | \fBnumjobs\fR to spawn multiple instances of the same job type, then | |
1629 | this will be the starting port number since fio will use a range of | |
1630 | ports. | |
d60e92d1 | 1631 | .TP |
523bad63 TK |
1632 | .BI (netsplice,net)hostname \fR=\fPstr |
1633 | The hostname or IP address to use for TCP or UDP based I/O. If the job is | |
1634 | a TCP listener or UDP reader, the hostname is not used and must be omitted | |
1635 | unless it is a valid UDP multicast address. | |
591e9e06 | 1636 | .TP |
523bad63 TK |
1637 | .BI (netsplice,net)interface \fR=\fPstr |
1638 | The IP address of the network interface used to send or receive UDP | |
1639 | multicast. | |
ddf24e42 | 1640 | .TP |
523bad63 TK |
1641 | .BI (netsplice,net)ttl \fR=\fPint |
1642 | Time\-to\-live value for outgoing UDP multicast packets. Default: 1. | |
d60e92d1 | 1643 | .TP |
523bad63 TK |
1644 | .BI (netsplice,net)nodelay \fR=\fPbool |
1645 | Set TCP_NODELAY on TCP connections. | |
fa769d44 | 1646 | .TP |
523bad63 TK |
1647 | .BI (netsplice,net)protocol \fR=\fPstr "\fR,\fP proto" \fR=\fPstr |
1648 | The network protocol to use. Accepted values are: | |
1649 | .RS | |
e76b1da4 JA |
1650 | .RS |
1651 | .TP | |
523bad63 TK |
1652 | .B tcp |
1653 | Transmission control protocol. | |
e76b1da4 | 1654 | .TP |
523bad63 TK |
1655 | .B tcpv6 |
1656 | Transmission control protocol V6. | |
e76b1da4 | 1657 | .TP |
523bad63 TK |
1658 | .B udp |
1659 | User datagram protocol. | |
1660 | .TP | |
1661 | .B udpv6 | |
1662 | User datagram protocol V6. | |
e76b1da4 | 1663 | .TP |
523bad63 TK |
1664 | .B unix |
1665 | UNIX domain socket. | |
e76b1da4 JA |
1666 | .RE |
1667 | .P | |
523bad63 TK |
1668 | When the protocol is TCP or UDP, the port must also be given, as well as the |
1669 | hostname if the job is a TCP listener or UDP reader. For unix sockets, the | |
1670 | normal \fBfilename\fR option should be used and the port is invalid. | |
1671 | .RE | |
1672 | .TP | |
1673 | .BI (netsplice,net)listen | |
1674 | For TCP network connections, tell fio to listen for incoming connections | |
1675 | rather than initiating an outgoing connection. The \fBhostname\fR must | |
1676 | be omitted if this option is used. | |
1677 | .TP | |
1678 | .BI (netsplice,net)pingpong | |
1679 | Normally a network writer will just continue writing data, and a network | |
1680 | reader will just consume packages. If `pingpong=1' is set, a writer will | |
1681 | send its normal payload to the reader, then wait for the reader to send the | |
1682 | same payload back. This allows fio to measure network latencies. The | |
1683 | submission and completion latencies then measure local time spent sending or | |
1684 | receiving, and the completion latency measures how long it took for the | |
1685 | other end to receive and send back. For UDP multicast traffic | |
1686 | `pingpong=1' should only be set for a single reader when multiple readers | |
1687 | are listening to the same address. | |
1688 | .TP | |
1689 | .BI (netsplice,net)window_size \fR=\fPint | |
1690 | Set the desired socket buffer size for the connection. | |
e76b1da4 | 1691 | .TP |
523bad63 TK |
1692 | .BI (netsplice,net)mss \fR=\fPint |
1693 | Set the TCP maximum segment size (TCP_MAXSEG). | |
d60e92d1 | 1694 | .TP |
523bad63 TK |
1695 | .BI (e4defrag)donorname \fR=\fPstr |
1696 | File will be used as a block donor (swap extents between files). | |
d60e92d1 | 1697 | .TP |
523bad63 TK |
1698 | .BI (e4defrag)inplace \fR=\fPint |
1699 | Configure donor file blocks allocation strategy: | |
1700 | .RS | |
1701 | .RS | |
d60e92d1 | 1702 | .TP |
523bad63 TK |
1703 | .B 0 |
1704 | Default. Preallocate donor's file on init. | |
d60e92d1 | 1705 | .TP |
523bad63 TK |
1706 | .B 1 |
1707 | Allocate space immediately inside defragment event, and free right | |
1708 | after event. | |
1709 | .RE | |
1710 | .RE | |
d60e92d1 | 1711 | .TP |
523bad63 TK |
1712 | .BI (rbd)clustername \fR=\fPstr |
1713 | Specifies the name of the Ceph cluster. | |
92d42d69 | 1714 | .TP |
523bad63 TK |
1715 | .BI (rbd)rbdname \fR=\fPstr |
1716 | Specifies the name of the RBD. | |
92d42d69 | 1717 | .TP |
523bad63 TK |
1718 | .BI (rbd)pool \fR=\fPstr |
1719 | Specifies the name of the Ceph pool containing RBD. | |
92d42d69 | 1720 | .TP |
523bad63 TK |
1721 | .BI (rbd)clientname \fR=\fPstr |
1722 | Specifies the username (without the 'client.' prefix) used to access the | |
1723 | Ceph cluster. If the \fBclustername\fR is specified, the \fBclientname\fR shall be | |
1724 | the full *type.id* string. If no type. prefix is given, fio will add 'client.' | |
1725 | by default. | |
92d42d69 | 1726 | .TP |
523bad63 TK |
1727 | .BI (mtd)skip_bad \fR=\fPbool |
1728 | Skip operations against known bad blocks. | |
8116fd24 | 1729 | .TP |
523bad63 TK |
1730 | .BI (libhdfs)hdfsdirectory |
1731 | libhdfs will create chunk in this HDFS directory. | |
e0a04ac1 | 1732 | .TP |
523bad63 TK |
1733 | .BI (libhdfs)chunk_size |
1734 | The size of the chunk to use for each file. | |
1735 | .SS "I/O depth" | |
1736 | .TP | |
1737 | .BI iodepth \fR=\fPint | |
1738 | Number of I/O units to keep in flight against the file. Note that | |
1739 | increasing \fBiodepth\fR beyond 1 will not affect synchronous ioengines (except | |
1740 | for small degrees when \fBverify_async\fR is in use). Even async | |
1741 | engines may impose OS restrictions causing the desired depth not to be | |
1742 | achieved. This may happen on Linux when using libaio and not setting | |
1743 | `direct=1', since buffered I/O is not async on that OS. Keep an | |
1744 | eye on the I/O depth distribution in the fio output to verify that the | |
1745 | achieved depth is as expected. Default: 1. | |
1746 | .TP | |
1747 | .BI iodepth_batch_submit \fR=\fPint "\fR,\fP iodepth_batch" \fR=\fPint | |
1748 | This defines how many pieces of I/O to submit at once. It defaults to 1 | |
1749 | which means that we submit each I/O as soon as it is available, but can be | |
1750 | raised to submit bigger batches of I/O at the time. If it is set to 0 the | |
1751 | \fBiodepth\fR value will be used. | |
1752 | .TP | |
1753 | .BI iodepth_batch_complete_min \fR=\fPint "\fR,\fP iodepth_batch_complete" \fR=\fPint | |
1754 | This defines how many pieces of I/O to retrieve at once. It defaults to 1 | |
1755 | which means that we'll ask for a minimum of 1 I/O in the retrieval process | |
1756 | from the kernel. The I/O retrieval will go on until we hit the limit set by | |
1757 | \fBiodepth_low\fR. If this variable is set to 0, then fio will always | |
1758 | check for completed events before queuing more I/O. This helps reduce I/O | |
1759 | latency, at the cost of more retrieval system calls. | |
1760 | .TP | |
1761 | .BI iodepth_batch_complete_max \fR=\fPint | |
1762 | This defines maximum pieces of I/O to retrieve at once. This variable should | |
1763 | be used along with \fBiodepth_batch_complete_min\fR=\fIint\fR variable, | |
1764 | specifying the range of min and max amount of I/O which should be | |
1765 | retrieved. By default it is equal to \fBiodepth_batch_complete_min\fR | |
1766 | value. Example #1: | |
e0a04ac1 | 1767 | .RS |
e0a04ac1 | 1768 | .RS |
e0a04ac1 | 1769 | .P |
523bad63 TK |
1770 | .PD 0 |
1771 | iodepth_batch_complete_min=1 | |
e0a04ac1 | 1772 | .P |
523bad63 TK |
1773 | iodepth_batch_complete_max=<iodepth> |
1774 | .PD | |
e0a04ac1 JA |
1775 | .RE |
1776 | .P | |
523bad63 TK |
1777 | which means that we will retrieve at least 1 I/O and up to the whole |
1778 | submitted queue depth. If none of I/O has been completed yet, we will wait. | |
1779 | Example #2: | |
e8b1961d | 1780 | .RS |
523bad63 TK |
1781 | .P |
1782 | .PD 0 | |
1783 | iodepth_batch_complete_min=0 | |
1784 | .P | |
1785 | iodepth_batch_complete_max=<iodepth> | |
1786 | .PD | |
e8b1961d JA |
1787 | .RE |
1788 | .P | |
523bad63 TK |
1789 | which means that we can retrieve up to the whole submitted queue depth, but |
1790 | if none of I/O has been completed yet, we will NOT wait and immediately exit | |
1791 | the system call. In this example we simply do polling. | |
1792 | .RE | |
e8b1961d | 1793 | .TP |
523bad63 TK |
1794 | .BI iodepth_low \fR=\fPint |
1795 | The low water mark indicating when to start filling the queue | |
1796 | again. Defaults to the same as \fBiodepth\fR, meaning that fio will | |
1797 | attempt to keep the queue full at all times. If \fBiodepth\fR is set to | |
1798 | e.g. 16 and \fBiodepth_low\fR is set to 4, then after fio has filled the queue of | |
1799 | 16 requests, it will let the depth drain down to 4 before starting to fill | |
1800 | it again. | |
d60e92d1 | 1801 | .TP |
523bad63 TK |
1802 | .BI serialize_overlap \fR=\fPbool |
1803 | Serialize in-flight I/Os that might otherwise cause or suffer from data races. | |
1804 | When two or more I/Os are submitted simultaneously, there is no guarantee that | |
1805 | the I/Os will be processed or completed in the submitted order. Further, if | |
1806 | two or more of those I/Os are writes, any overlapping region between them can | |
1807 | become indeterminate/undefined on certain storage. These issues can cause | |
1808 | verification to fail erratically when at least one of the racing I/Os is | |
1809 | changing data and the overlapping region has a non-zero size. Setting | |
1810 | \fBserialize_overlap\fR tells fio to avoid provoking this behavior by explicitly | |
1811 | serializing in-flight I/Os that have a non-zero overlap. Note that setting | |
1812 | this option can reduce both performance and the \fBiodepth\fR achieved. | |
1813 | Additionally this option does not work when \fBio_submit_mode\fR is set to | |
1814 | offload. Default: false. | |
d60e92d1 | 1815 | .TP |
523bad63 TK |
1816 | .BI io_submit_mode \fR=\fPstr |
1817 | This option controls how fio submits the I/O to the I/O engine. The default | |
1818 | is `inline', which means that the fio job threads submit and reap I/O | |
1819 | directly. If set to `offload', the job threads will offload I/O submission | |
1820 | to a dedicated pool of I/O threads. This requires some coordination and thus | |
1821 | has a bit of extra overhead, especially for lower queue depth I/O where it | |
1822 | can increase latencies. The benefit is that fio can manage submission rates | |
1823 | independently of the device completion rates. This avoids skewed latency | |
1824 | reporting if I/O gets backed up on the device side (the coordinated omission | |
1825 | problem). | |
1826 | .SS "I/O rate" | |
d60e92d1 | 1827 | .TP |
523bad63 TK |
1828 | .BI thinktime \fR=\fPtime |
1829 | Stall the job for the specified period of time after an I/O has completed before issuing the | |
1830 | next. May be used to simulate processing being done by an application. | |
1831 | When the unit is omitted, the value is interpreted in microseconds. See | |
1832 | \fBthinktime_blocks\fR and \fBthinktime_spin\fR. | |
d60e92d1 | 1833 | .TP |
523bad63 TK |
1834 | .BI thinktime_spin \fR=\fPtime |
1835 | Only valid if \fBthinktime\fR is set \- pretend to spend CPU time doing | |
1836 | something with the data received, before falling back to sleeping for the | |
1837 | rest of the period specified by \fBthinktime\fR. When the unit is | |
1838 | omitted, the value is interpreted in microseconds. | |
d60e92d1 AC |
1839 | .TP |
1840 | .BI thinktime_blocks \fR=\fPint | |
523bad63 TK |
1841 | Only valid if \fBthinktime\fR is set \- control how many blocks to issue, |
1842 | before waiting \fBthinktime\fR usecs. If not set, defaults to 1 which will make | |
1843 | fio wait \fBthinktime\fR usecs after every block. This effectively makes any | |
1844 | queue depth setting redundant, since no more than 1 I/O will be queued | |
1845 | before we have to complete it and do our \fBthinktime\fR. In other words, this | |
1846 | setting effectively caps the queue depth if the latter is larger. | |
d60e92d1 | 1847 | .TP |
6d500c2e | 1848 | .BI rate \fR=\fPint[,int][,int] |
523bad63 TK |
1849 | Cap the bandwidth used by this job. The number is in bytes/sec, the normal |
1850 | suffix rules apply. Comma\-separated values may be specified for reads, | |
1851 | writes, and trims as described in \fBblocksize\fR. | |
1852 | .RS | |
1853 | .P | |
1854 | For example, using `rate=1m,500k' would limit reads to 1MiB/sec and writes to | |
1855 | 500KiB/sec. Capping only reads or writes can be done with `rate=,500k' or | |
1856 | `rate=500k,' where the former will only limit writes (to 500KiB/sec) and the | |
1857 | latter will only limit reads. | |
1858 | .RE | |
d60e92d1 | 1859 | .TP |
6d500c2e | 1860 | .BI rate_min \fR=\fPint[,int][,int] |
523bad63 TK |
1861 | Tell fio to do whatever it can to maintain at least this bandwidth. Failing |
1862 | to meet this requirement will cause the job to exit. Comma\-separated values | |
1863 | may be specified for reads, writes, and trims as described in | |
1864 | \fBblocksize\fR. | |
d60e92d1 | 1865 | .TP |
6d500c2e | 1866 | .BI rate_iops \fR=\fPint[,int][,int] |
523bad63 TK |
1867 | Cap the bandwidth to this number of IOPS. Basically the same as |
1868 | \fBrate\fR, just specified independently of bandwidth. If the job is | |
1869 | given a block size range instead of a fixed value, the smallest block size | |
1870 | is used as the metric. Comma\-separated values may be specified for reads, | |
1871 | writes, and trims as described in \fBblocksize\fR. | |
d60e92d1 | 1872 | .TP |
6d500c2e | 1873 | .BI rate_iops_min \fR=\fPint[,int][,int] |
523bad63 TK |
1874 | If fio doesn't meet this rate of I/O, it will cause the job to exit. |
1875 | Comma\-separated values may be specified for reads, writes, and trims as | |
1876 | described in \fBblocksize\fR. | |
d60e92d1 | 1877 | .TP |
6de65959 | 1878 | .BI rate_process \fR=\fPstr |
523bad63 TK |
1879 | This option controls how fio manages rated I/O submissions. The default is |
1880 | `linear', which submits I/O in a linear fashion with fixed delays between | |
1881 | I/Os that gets adjusted based on I/O completion rates. If this is set to | |
1882 | `poisson', fio will submit I/O based on a more real world random request | |
6de65959 | 1883 | flow, known as the Poisson process |
523bad63 | 1884 | (\fIhttps://en.wikipedia.org/wiki/Poisson_point_process\fR). The lambda will be |
5d02b083 | 1885 | 10^6 / IOPS for the given workload. |
523bad63 | 1886 | .SS "I/O latency" |
ff6bb260 | 1887 | .TP |
523bad63 | 1888 | .BI latency_target \fR=\fPtime |
3e260a46 | 1889 | If set, fio will attempt to find the max performance point that the given |
523bad63 TK |
1890 | workload will run at while maintaining a latency below this target. When |
1891 | the unit is omitted, the value is interpreted in microseconds. See | |
1892 | \fBlatency_window\fR and \fBlatency_percentile\fR. | |
3e260a46 | 1893 | .TP |
523bad63 | 1894 | .BI latency_window \fR=\fPtime |
3e260a46 | 1895 | Used with \fBlatency_target\fR to specify the sample window that the job |
523bad63 TK |
1896 | is run at varying queue depths to test the performance. When the unit is |
1897 | omitted, the value is interpreted in microseconds. | |
3e260a46 JA |
1898 | .TP |
1899 | .BI latency_percentile \fR=\fPfloat | |
523bad63 TK |
1900 | The percentage of I/Os that must fall within the criteria specified by |
1901 | \fBlatency_target\fR and \fBlatency_window\fR. If not set, this | |
1902 | defaults to 100.0, meaning that all I/Os must be equal or below to the value | |
1903 | set by \fBlatency_target\fR. | |
1904 | .TP | |
1905 | .BI max_latency \fR=\fPtime | |
1906 | If set, fio will exit the job with an ETIMEDOUT error if it exceeds this | |
1907 | maximum latency. When the unit is omitted, the value is interpreted in | |
1908 | microseconds. | |
1909 | .TP | |
1910 | .BI rate_cycle \fR=\fPint | |
1911 | Average bandwidth for \fBrate\fR and \fBrate_min\fR over this number | |
1912 | of milliseconds. Defaults to 1000. | |
1913 | .SS "I/O replay" | |
1914 | .TP | |
1915 | .BI write_iolog \fR=\fPstr | |
1916 | Write the issued I/O patterns to the specified file. See | |
1917 | \fBread_iolog\fR. Specify a separate file for each job, otherwise the | |
1918 | iologs will be interspersed and the file may be corrupt. | |
1919 | .TP | |
1920 | .BI read_iolog \fR=\fPstr | |
1921 | Open an iolog with the specified filename and replay the I/O patterns it | |
1922 | contains. This can be used to store a workload and replay it sometime | |
1923 | later. The iolog given may also be a blktrace binary file, which allows fio | |
1924 | to replay a workload captured by blktrace. See | |
1925 | \fBblktrace\fR\|(8) for how to capture such logging data. For blktrace | |
1926 | replay, the file needs to be turned into a blkparse binary data file first | |
1927 | (`blkparse <device> \-o /dev/null \-d file_for_fio.bin'). | |
3e260a46 | 1928 | .TP |
523bad63 TK |
1929 | .BI replay_no_stall \fR=\fPbool |
1930 | When replaying I/O with \fBread_iolog\fR the default behavior is to | |
1931 | attempt to respect the timestamps within the log and replay them with the | |
1932 | appropriate delay between IOPS. By setting this variable fio will not | |
1933 | respect the timestamps and attempt to replay them as fast as possible while | |
1934 | still respecting ordering. The result is the same I/O pattern to a given | |
1935 | device, but different timings. | |
1936 | .TP | |
1937 | .BI replay_redirect \fR=\fPstr | |
1938 | While replaying I/O patterns using \fBread_iolog\fR the default behavior | |
1939 | is to replay the IOPS onto the major/minor device that each IOP was recorded | |
1940 | from. This is sometimes undesirable because on a different machine those | |
1941 | major/minor numbers can map to a different device. Changing hardware on the | |
1942 | same system can also result in a different major/minor mapping. | |
1943 | \fBreplay_redirect\fR causes all I/Os to be replayed onto the single specified | |
1944 | device regardless of the device it was recorded | |
1945 | from. i.e. `replay_redirect=/dev/sdc' would cause all I/O | |
1946 | in the blktrace or iolog to be replayed onto `/dev/sdc'. This means | |
1947 | multiple devices will be replayed onto a single device, if the trace | |
1948 | contains multiple devices. If you want multiple devices to be replayed | |
1949 | concurrently to multiple redirected devices you must blkparse your trace | |
1950 | into separate traces and replay them with independent fio invocations. | |
1951 | Unfortunately this also breaks the strict time ordering between multiple | |
1952 | device accesses. | |
1953 | .TP | |
1954 | .BI replay_align \fR=\fPint | |
1955 | Force alignment of I/O offsets and lengths in a trace to this power of 2 | |
1956 | value. | |
1957 | .TP | |
1958 | .BI replay_scale \fR=\fPint | |
1959 | Scale sector offsets down by this factor when replaying traces. | |
1960 | .SS "Threads, processes and job synchronization" | |
1961 | .TP | |
1962 | .BI thread | |
1963 | Fio defaults to creating jobs by using fork, however if this option is | |
1964 | given, fio will create jobs by using POSIX Threads' function | |
1965 | \fBpthread_create\fR\|(3) to create threads instead. | |
1966 | .TP | |
1967 | .BI wait_for \fR=\fPstr | |
1968 | If set, the current job won't be started until all workers of the specified | |
1969 | waitee job are done. | |
1970 | .\" ignore blank line here from HOWTO as it looks normal without it | |
1971 | \fBwait_for\fR operates on the job name basis, so there are a few | |
1972 | limitations. First, the waitee must be defined prior to the waiter job | |
1973 | (meaning no forward references). Second, if a job is being referenced as a | |
1974 | waitee, it must have a unique name (no duplicate waitees). | |
1975 | .TP | |
1976 | .BI nice \fR=\fPint | |
1977 | Run the job with the given nice value. See man \fBnice\fR\|(2). | |
1978 | .\" ignore blank line here from HOWTO as it looks normal without it | |
1979 | On Windows, values less than \-15 set the process class to "High"; \-1 through | |
1980 | \-15 set "Above Normal"; 1 through 15 "Below Normal"; and above 15 "Idle" | |
1981 | priority class. | |
1982 | .TP | |
1983 | .BI prio \fR=\fPint | |
1984 | Set the I/O priority value of this job. Linux limits us to a positive value | |
1985 | between 0 and 7, with 0 being the highest. See man | |
1986 | \fBionice\fR\|(1). Refer to an appropriate manpage for other operating | |
1987 | systems since meaning of priority may differ. | |
1988 | .TP | |
1989 | .BI prioclass \fR=\fPint | |
1990 | Set the I/O priority class. See man \fBionice\fR\|(1). | |
15501535 | 1991 | .TP |
d60e92d1 | 1992 | .BI cpumask \fR=\fPint |
523bad63 TK |
1993 | Set the CPU affinity of this job. The parameter given is a bit mask of |
1994 | allowed CPUs the job may run on. So if you want the allowed CPUs to be 1 | |
1995 | and 5, you would pass the decimal value of (1 << 1 | 1 << 5), or 34. See man | |
1996 | \fBsched_setaffinity\fR\|(2). This may not work on all supported | |
1997 | operating systems or kernel versions. This option doesn't work well for a | |
1998 | higher CPU count than what you can store in an integer mask, so it can only | |
1999 | control cpus 1\-32. For boxes with larger CPU counts, use | |
2000 | \fBcpus_allowed\fR. | |
d60e92d1 AC |
2001 | .TP |
2002 | .BI cpus_allowed \fR=\fPstr | |
523bad63 TK |
2003 | Controls the same options as \fBcpumask\fR, but accepts a textual |
2004 | specification of the permitted CPUs instead. So to use CPUs 1 and 5 you | |
2005 | would specify `cpus_allowed=1,5'. This option also allows a range of CPUs | |
2006 | to be specified \-\- say you wanted a binding to CPUs 1, 5, and 8 to 15, you | |
2007 | would set `cpus_allowed=1,5,8\-15'. | |
d60e92d1 | 2008 | .TP |
c2acfbac | 2009 | .BI cpus_allowed_policy \fR=\fPstr |
523bad63 TK |
2010 | Set the policy of how fio distributes the CPUs specified by |
2011 | \fBcpus_allowed\fR or \fBcpumask\fR. Two policies are supported: | |
c2acfbac JA |
2012 | .RS |
2013 | .RS | |
2014 | .TP | |
2015 | .B shared | |
2016 | All jobs will share the CPU set specified. | |
2017 | .TP | |
2018 | .B split | |
2019 | Each job will get a unique CPU from the CPU set. | |
2020 | .RE | |
2021 | .P | |
523bad63 TK |
2022 | \fBshared\fR is the default behavior, if the option isn't specified. If |
2023 | \fBsplit\fR is specified, then fio will will assign one cpu per job. If not | |
2024 | enough CPUs are given for the jobs listed, then fio will roundrobin the CPUs | |
2025 | in the set. | |
c2acfbac | 2026 | .RE |
c2acfbac | 2027 | .TP |
d0b937ed | 2028 | .BI numa_cpu_nodes \fR=\fPstr |
cecbfd47 | 2029 | Set this job running on specified NUMA nodes' CPUs. The arguments allow |
523bad63 TK |
2030 | comma delimited list of cpu numbers, A\-B ranges, or `all'. Note, to enable |
2031 | NUMA options support, fio must be built on a system with libnuma\-dev(el) | |
2032 | installed. | |
d0b937ed YR |
2033 | .TP |
2034 | .BI numa_mem_policy \fR=\fPstr | |
523bad63 TK |
2035 | Set this job's memory policy and corresponding NUMA nodes. Format of the |
2036 | arguments: | |
39c7a2ca VF |
2037 | .RS |
2038 | .RS | |
523bad63 TK |
2039 | .P |
2040 | <mode>[:<nodelist>] | |
39c7a2ca | 2041 | .RE |
523bad63 TK |
2042 | .P |
2043 | `mode' is one of the following memory poicies: `default', `prefer', | |
2044 | `bind', `interleave' or `local'. For `default' and `local' memory | |
2045 | policies, no node needs to be specified. For `prefer', only one node is | |
2046 | allowed. For `bind' and `interleave' the `nodelist' may be as | |
2047 | follows: a comma delimited list of numbers, A\-B ranges, or `all'. | |
39c7a2ca VF |
2048 | .RE |
2049 | .TP | |
523bad63 TK |
2050 | .BI cgroup \fR=\fPstr |
2051 | Add job to this control group. If it doesn't exist, it will be created. The | |
2052 | system must have a mounted cgroup blkio mount point for this to work. If | |
2053 | your system doesn't have it mounted, you can do so with: | |
d60e92d1 AC |
2054 | .RS |
2055 | .RS | |
d60e92d1 | 2056 | .P |
523bad63 TK |
2057 | # mount \-t cgroup \-o blkio none /cgroup |
2058 | .RE | |
d60e92d1 AC |
2059 | .RE |
2060 | .TP | |
523bad63 TK |
2061 | .BI cgroup_weight \fR=\fPint |
2062 | Set the weight of the cgroup to this value. See the documentation that comes | |
2063 | with the kernel, allowed values are in the range of 100..1000. | |
d60e92d1 | 2064 | .TP |
523bad63 TK |
2065 | .BI cgroup_nodelete \fR=\fPbool |
2066 | Normally fio will delete the cgroups it has created after the job | |
2067 | completion. To override this behavior and to leave cgroups around after the | |
2068 | job completion, set `cgroup_nodelete=1'. This can be useful if one wants | |
2069 | to inspect various cgroup files after job completion. Default: false. | |
c8eeb9df | 2070 | .TP |
523bad63 TK |
2071 | .BI flow_id \fR=\fPint |
2072 | The ID of the flow. If not specified, it defaults to being a global | |
2073 | flow. See \fBflow\fR. | |
d60e92d1 | 2074 | .TP |
523bad63 TK |
2075 | .BI flow \fR=\fPint |
2076 | Weight in token\-based flow control. If this value is used, then there is | |
2077 | a 'flow counter' which is used to regulate the proportion of activity between | |
2078 | two or more jobs. Fio attempts to keep this flow counter near zero. The | |
2079 | \fBflow\fR parameter stands for how much should be added or subtracted to the | |
2080 | flow counter on each iteration of the main I/O loop. That is, if one job has | |
2081 | `flow=8' and another job has `flow=\-1', then there will be a roughly 1:8 | |
2082 | ratio in how much one runs vs the other. | |
d60e92d1 | 2083 | .TP |
523bad63 TK |
2084 | .BI flow_watermark \fR=\fPint |
2085 | The maximum value that the absolute value of the flow counter is allowed to | |
2086 | reach before the job must wait for a lower value of the counter. | |
6b7f6851 | 2087 | .TP |
523bad63 TK |
2088 | .BI flow_sleep \fR=\fPint |
2089 | The period of time, in microseconds, to wait after the flow watermark has | |
2090 | been exceeded before retrying operations. | |
25460cf6 | 2091 | .TP |
523bad63 TK |
2092 | .BI stonewall "\fR,\fB wait_for_previous" |
2093 | Wait for preceding jobs in the job file to exit, before starting this | |
2094 | one. Can be used to insert serialization points in the job file. A stone | |
2095 | wall also implies starting a new reporting group, see | |
2096 | \fBgroup_reporting\fR. | |
2378826d | 2097 | .TP |
523bad63 TK |
2098 | .BI exitall |
2099 | By default, fio will continue running all other jobs when one job finishes | |
2100 | but sometimes this is not the desired action. Setting \fBexitall\fR will | |
2101 | instead make fio terminate all other jobs when one job finishes. | |
e81ecca3 | 2102 | .TP |
523bad63 TK |
2103 | .BI exec_prerun \fR=\fPstr |
2104 | Before running this job, issue the command specified through | |
2105 | \fBsystem\fR\|(3). Output is redirected in a file called `jobname.prerun.txt'. | |
e9f48479 | 2106 | .TP |
523bad63 TK |
2107 | .BI exec_postrun \fR=\fPstr |
2108 | After the job completes, issue the command specified though | |
2109 | \fBsystem\fR\|(3). Output is redirected in a file called `jobname.postrun.txt'. | |
d60e92d1 | 2110 | .TP |
523bad63 TK |
2111 | .BI uid \fR=\fPint |
2112 | Instead of running as the invoking user, set the user ID to this value | |
2113 | before the thread/process does any work. | |
39c1c323 | 2114 | .TP |
523bad63 TK |
2115 | .BI gid \fR=\fPint |
2116 | Set group ID, see \fBuid\fR. | |
2117 | .SS "Verification" | |
d60e92d1 | 2118 | .TP |
589e88b7 | 2119 | .BI verify_only |
523bad63 | 2120 | Do not perform specified workload, only verify data still matches previous |
5e4c7118 | 2121 | invocation of this workload. This option allows one to check data multiple |
523bad63 TK |
2122 | times at a later date without overwriting it. This option makes sense only |
2123 | for workloads that write data, and does not support workloads with the | |
5e4c7118 JA |
2124 | \fBtime_based\fR option set. |
2125 | .TP | |
d60e92d1 | 2126 | .BI do_verify \fR=\fPbool |
523bad63 TK |
2127 | Run the verify phase after a write phase. Only valid if \fBverify\fR is |
2128 | set. Default: true. | |
d60e92d1 AC |
2129 | .TP |
2130 | .BI verify \fR=\fPstr | |
523bad63 TK |
2131 | If writing to a file, fio can verify the file contents after each iteration |
2132 | of the job. Each verification method also implies verification of special | |
2133 | header, which is written to the beginning of each block. This header also | |
2134 | includes meta information, like offset of the block, block number, timestamp | |
2135 | when block was written, etc. \fBverify\fR can be combined with | |
2136 | \fBverify_pattern\fR option. The allowed values are: | |
d60e92d1 AC |
2137 | .RS |
2138 | .RS | |
2139 | .TP | |
523bad63 TK |
2140 | .B md5 |
2141 | Use an md5 sum of the data area and store it in the header of | |
2142 | each block. | |
2143 | .TP | |
2144 | .B crc64 | |
2145 | Use an experimental crc64 sum of the data area and store it in the | |
2146 | header of each block. | |
2147 | .TP | |
2148 | .B crc32c | |
2149 | Use a crc32c sum of the data area and store it in the header of | |
2150 | each block. This will automatically use hardware acceleration | |
2151 | (e.g. SSE4.2 on an x86 or CRC crypto extensions on ARM64) but will | |
2152 | fall back to software crc32c if none is found. Generally the | |
2153 | fatest checksum fio supports when hardware accelerated. | |
2154 | .TP | |
2155 | .B crc32c\-intel | |
2156 | Synonym for crc32c. | |
2157 | .TP | |
2158 | .B crc32 | |
2159 | Use a crc32 sum of the data area and store it in the header of each | |
2160 | block. | |
2161 | .TP | |
2162 | .B crc16 | |
2163 | Use a crc16 sum of the data area and store it in the header of each | |
2164 | block. | |
2165 | .TP | |
2166 | .B crc7 | |
2167 | Use a crc7 sum of the data area and store it in the header of each | |
2168 | block. | |
2169 | .TP | |
2170 | .B xxhash | |
2171 | Use xxhash as the checksum function. Generally the fastest software | |
2172 | checksum that fio supports. | |
2173 | .TP | |
2174 | .B sha512 | |
2175 | Use sha512 as the checksum function. | |
2176 | .TP | |
2177 | .B sha256 | |
2178 | Use sha256 as the checksum function. | |
2179 | .TP | |
2180 | .B sha1 | |
2181 | Use optimized sha1 as the checksum function. | |
2182 | .TP | |
2183 | .B sha3\-224 | |
2184 | Use optimized sha3\-224 as the checksum function. | |
2185 | .TP | |
2186 | .B sha3\-256 | |
2187 | Use optimized sha3\-256 as the checksum function. | |
2188 | .TP | |
2189 | .B sha3\-384 | |
2190 | Use optimized sha3\-384 as the checksum function. | |
2191 | .TP | |
2192 | .B sha3\-512 | |
2193 | Use optimized sha3\-512 as the checksum function. | |
d60e92d1 AC |
2194 | .TP |
2195 | .B meta | |
523bad63 TK |
2196 | This option is deprecated, since now meta information is included in |
2197 | generic verification header and meta verification happens by | |
2198 | default. For detailed information see the description of the | |
2199 | \fBverify\fR setting. This option is kept because of | |
2200 | compatibility's sake with old configurations. Do not use it. | |
d60e92d1 | 2201 | .TP |
59245381 | 2202 | .B pattern |
523bad63 TK |
2203 | Verify a strict pattern. Normally fio includes a header with some |
2204 | basic information and checksumming, but if this option is set, only | |
2205 | the specific pattern set with \fBverify_pattern\fR is verified. | |
59245381 | 2206 | .TP |
d60e92d1 | 2207 | .B null |
523bad63 TK |
2208 | Only pretend to verify. Useful for testing internals with |
2209 | `ioengine=null', not for much else. | |
d60e92d1 | 2210 | .RE |
523bad63 TK |
2211 | .P |
2212 | This option can be used for repeated burn\-in tests of a system to make sure | |
2213 | that the written data is also correctly read back. If the data direction | |
2214 | given is a read or random read, fio will assume that it should verify a | |
2215 | previously written file. If the data direction includes any form of write, | |
2216 | the verify will be of the newly written data. | |
d60e92d1 AC |
2217 | .RE |
2218 | .TP | |
5c9323fb | 2219 | .BI verifysort \fR=\fPbool |
523bad63 TK |
2220 | If true, fio will sort written verify blocks when it deems it faster to read |
2221 | them back in a sorted manner. This is often the case when overwriting an | |
2222 | existing file, since the blocks are already laid out in the file system. You | |
2223 | can ignore this option unless doing huge amounts of really fast I/O where | |
2224 | the red\-black tree sorting CPU time becomes significant. Default: true. | |
d60e92d1 | 2225 | .TP |
fa769d44 | 2226 | .BI verifysort_nr \fR=\fPint |
523bad63 | 2227 | Pre\-load and sort verify blocks for a read workload. |
fa769d44 | 2228 | .TP |
f7fa2653 | 2229 | .BI verify_offset \fR=\fPint |
d60e92d1 | 2230 | Swap the verification header with data somewhere else in the block before |
523bad63 | 2231 | writing. It is swapped back before verifying. |
d60e92d1 | 2232 | .TP |
f7fa2653 | 2233 | .BI verify_interval \fR=\fPint |
523bad63 TK |
2234 | Write the verification header at a finer granularity than the |
2235 | \fBblocksize\fR. It will be written for chunks the size of | |
2236 | \fBverify_interval\fR. \fBblocksize\fR should divide this evenly. | |
d60e92d1 | 2237 | .TP |
996093bb | 2238 | .BI verify_pattern \fR=\fPstr |
523bad63 TK |
2239 | If set, fio will fill the I/O buffers with this pattern. Fio defaults to |
2240 | filling with totally random bytes, but sometimes it's interesting to fill | |
2241 | with a known pattern for I/O verification purposes. Depending on the width | |
2242 | of the pattern, fio will fill 1/2/3/4 bytes of the buffer at the time (it can | |
2243 | be either a decimal or a hex number). The \fBverify_pattern\fR if larger than | |
2244 | a 32\-bit quantity has to be a hex number that starts with either "0x" or | |
2245 | "0X". Use with \fBverify\fR. Also, \fBverify_pattern\fR supports %o | |
2246 | format, which means that for each block offset will be written and then | |
2247 | verified back, e.g.: | |
2fa5a241 RP |
2248 | .RS |
2249 | .RS | |
523bad63 TK |
2250 | .P |
2251 | verify_pattern=%o | |
2fa5a241 | 2252 | .RE |
523bad63 | 2253 | .P |
2fa5a241 | 2254 | Or use combination of everything: |
2fa5a241 | 2255 | .RS |
523bad63 TK |
2256 | .P |
2257 | verify_pattern=0xff%o"abcd"\-12 | |
2fa5a241 RP |
2258 | .RE |
2259 | .RE | |
996093bb | 2260 | .TP |
d60e92d1 | 2261 | .BI verify_fatal \fR=\fPbool |
523bad63 TK |
2262 | Normally fio will keep checking the entire contents before quitting on a |
2263 | block verification failure. If this option is set, fio will exit the job on | |
2264 | the first observed failure. Default: false. | |
d60e92d1 | 2265 | .TP |
b463e936 | 2266 | .BI verify_dump \fR=\fPbool |
523bad63 TK |
2267 | If set, dump the contents of both the original data block and the data block |
2268 | we read off disk to files. This allows later analysis to inspect just what | |
2269 | kind of data corruption occurred. Off by default. | |
b463e936 | 2270 | .TP |
e8462bd8 | 2271 | .BI verify_async \fR=\fPint |
523bad63 TK |
2272 | Fio will normally verify I/O inline from the submitting thread. This option |
2273 | takes an integer describing how many async offload threads to create for I/O | |
2274 | verification instead, causing fio to offload the duty of verifying I/O | |
2275 | contents to one or more separate threads. If using this offload option, even | |
2276 | sync I/O engines can benefit from using an \fBiodepth\fR setting higher | |
2277 | than 1, as it allows them to have I/O in flight while verifies are running. | |
2278 | Defaults to 0 async threads, i.e. verification is not asynchronous. | |
e8462bd8 JA |
2279 | .TP |
2280 | .BI verify_async_cpus \fR=\fPstr | |
523bad63 TK |
2281 | Tell fio to set the given CPU affinity on the async I/O verification |
2282 | threads. See \fBcpus_allowed\fR for the format used. | |
e8462bd8 | 2283 | .TP |
6f87418f JA |
2284 | .BI verify_backlog \fR=\fPint |
2285 | Fio will normally verify the written contents of a job that utilizes verify | |
2286 | once that job has completed. In other words, everything is written then | |
2287 | everything is read back and verified. You may want to verify continually | |
523bad63 TK |
2288 | instead for a variety of reasons. Fio stores the meta data associated with |
2289 | an I/O block in memory, so for large verify workloads, quite a bit of memory | |
2290 | would be used up holding this meta data. If this option is enabled, fio will | |
2291 | write only N blocks before verifying these blocks. | |
6f87418f JA |
2292 | .TP |
2293 | .BI verify_backlog_batch \fR=\fPint | |
523bad63 TK |
2294 | Control how many blocks fio will verify if \fBverify_backlog\fR is |
2295 | set. If not set, will default to the value of \fBverify_backlog\fR | |
2296 | (meaning the entire queue is read back and verified). If | |
2297 | \fBverify_backlog_batch\fR is less than \fBverify_backlog\fR then not all | |
2298 | blocks will be verified, if \fBverify_backlog_batch\fR is larger than | |
2299 | \fBverify_backlog\fR, some blocks will be verified more than once. | |
2300 | .TP | |
2301 | .BI verify_state_save \fR=\fPbool | |
2302 | When a job exits during the write phase of a verify workload, save its | |
2303 | current state. This allows fio to replay up until that point, if the verify | |
2304 | state is loaded for the verify read phase. The format of the filename is, | |
2305 | roughly: | |
2306 | .RS | |
2307 | .RS | |
2308 | .P | |
2309 | <type>\-<jobname>\-<jobindex>\-verify.state. | |
2310 | .RE | |
2311 | .P | |
2312 | <type> is "local" for a local run, "sock" for a client/server socket | |
2313 | connection, and "ip" (192.168.0.1, for instance) for a networked | |
2314 | client/server connection. Defaults to true. | |
2315 | .RE | |
2316 | .TP | |
2317 | .BI verify_state_load \fR=\fPbool | |
2318 | If a verify termination trigger was used, fio stores the current write state | |
2319 | of each thread. This can be used at verification time so that fio knows how | |
2320 | far it should verify. Without this information, fio will run a full | |
2321 | verification pass, according to the settings in the job file used. Default | |
2322 | false. | |
6f87418f | 2323 | .TP |
fa769d44 SW |
2324 | .BI trim_percentage \fR=\fPint |
2325 | Number of verify blocks to discard/trim. | |
2326 | .TP | |
2327 | .BI trim_verify_zero \fR=\fPbool | |
523bad63 | 2328 | Verify that trim/discarded blocks are returned as zeros. |
fa769d44 SW |
2329 | .TP |
2330 | .BI trim_backlog \fR=\fPint | |
523bad63 | 2331 | Verify that trim/discarded blocks are returned as zeros. |
fa769d44 SW |
2332 | .TP |
2333 | .BI trim_backlog_batch \fR=\fPint | |
523bad63 | 2334 | Trim this number of I/O blocks. |
fa769d44 SW |
2335 | .TP |
2336 | .BI experimental_verify \fR=\fPbool | |
2337 | Enable experimental verification. | |
523bad63 | 2338 | .SS "Steady state" |
fa769d44 | 2339 | .TP |
523bad63 TK |
2340 | .BI steadystate \fR=\fPstr:float "\fR,\fP ss" \fR=\fPstr:float |
2341 | Define the criterion and limit for assessing steady state performance. The | |
2342 | first parameter designates the criterion whereas the second parameter sets | |
2343 | the threshold. When the criterion falls below the threshold for the | |
2344 | specified duration, the job will stop. For example, `iops_slope:0.1%' will | |
2345 | direct fio to terminate the job when the least squares regression slope | |
2346 | falls below 0.1% of the mean IOPS. If \fBgroup_reporting\fR is enabled | |
2347 | this will apply to all jobs in the group. Below is the list of available | |
2348 | steady state assessment criteria. All assessments are carried out using only | |
2349 | data from the rolling collection window. Threshold limits can be expressed | |
2350 | as a fixed value or as a percentage of the mean in the collection window. | |
2351 | .RS | |
2352 | .RS | |
d60e92d1 | 2353 | .TP |
523bad63 TK |
2354 | .B iops |
2355 | Collect IOPS data. Stop the job if all individual IOPS measurements | |
2356 | are within the specified limit of the mean IOPS (e.g., `iops:2' | |
2357 | means that all individual IOPS values must be within 2 of the mean, | |
2358 | whereas `iops:0.2%' means that all individual IOPS values must be | |
2359 | within 0.2% of the mean IOPS to terminate the job). | |
d60e92d1 | 2360 | .TP |
523bad63 TK |
2361 | .B iops_slope |
2362 | Collect IOPS data and calculate the least squares regression | |
2363 | slope. Stop the job if the slope falls below the specified limit. | |
d60e92d1 | 2364 | .TP |
523bad63 TK |
2365 | .B bw |
2366 | Collect bandwidth data. Stop the job if all individual bandwidth | |
2367 | measurements are within the specified limit of the mean bandwidth. | |
64bbb865 | 2368 | .TP |
523bad63 TK |
2369 | .B bw_slope |
2370 | Collect bandwidth data and calculate the least squares regression | |
2371 | slope. Stop the job if the slope falls below the specified limit. | |
2372 | .RE | |
2373 | .RE | |
d1c46c04 | 2374 | .TP |
523bad63 TK |
2375 | .BI steadystate_duration \fR=\fPtime "\fR,\fP ss_dur" \fR=\fPtime |
2376 | A rolling window of this duration will be used to judge whether steady state | |
2377 | has been reached. Data will be collected once per second. The default is 0 | |
2378 | which disables steady state detection. When the unit is omitted, the | |
2379 | value is interpreted in seconds. | |
0c63576e | 2380 | .TP |
523bad63 TK |
2381 | .BI steadystate_ramp_time \fR=\fPtime "\fR,\fP ss_ramp" \fR=\fPtime |
2382 | Allow the job to run for the specified duration before beginning data | |
2383 | collection for checking the steady state job termination criterion. The | |
2384 | default is 0. When the unit is omitted, the value is interpreted in seconds. | |
2385 | .SS "Measurements and reporting" | |
0c63576e | 2386 | .TP |
3a5db920 JA |
2387 | .BI per_job_logs \fR=\fPbool |
2388 | If set, this generates bw/clat/iops log with per file private filenames. If | |
523bad63 TK |
2389 | not set, jobs with identical names will share the log filename. Default: |
2390 | true. | |
2391 | .TP | |
2392 | .BI group_reporting | |
2393 | It may sometimes be interesting to display statistics for groups of jobs as | |
2394 | a whole instead of for each individual job. This is especially true if | |
2395 | \fBnumjobs\fR is used; looking at individual thread/process output | |
2396 | quickly becomes unwieldy. To see the final report per\-group instead of | |
2397 | per\-job, use \fBgroup_reporting\fR. Jobs in a file will be part of the | |
2398 | same reporting group, unless if separated by a \fBstonewall\fR, or by | |
2399 | using \fBnew_group\fR. | |
2400 | .TP | |
2401 | .BI new_group | |
2402 | Start a new reporting group. See: \fBgroup_reporting\fR. If not given, | |
2403 | all jobs in a file will be part of the same reporting group, unless | |
2404 | separated by a \fBstonewall\fR. | |
2405 | .TP | |
2406 | .BI stats \fR=\fPbool | |
2407 | By default, fio collects and shows final output results for all jobs | |
2408 | that run. If this option is set to 0, then fio will ignore it in | |
2409 | the final stat output. | |
3a5db920 | 2410 | .TP |
836bad52 | 2411 | .BI write_bw_log \fR=\fPstr |
523bad63 TK |
2412 | If given, write a bandwidth log for this job. Can be used to store data of |
2413 | the bandwidth of the jobs in their lifetime. The included | |
2414 | \fBfio_generate_plots\fR script uses gnuplot to turn these | |
2415 | text files into nice graphs. See \fBwrite_lat_log\fR for behavior of | |
2416 | given filename. For this option, the postfix is `_bw.x.log', where `x' | |
2417 | is the index of the job (1..N, where N is the number of jobs). If | |
2418 | \fBper_job_logs\fR is false, then the filename will not include the job | |
2419 | index. See \fBLOG FILE FORMATS\fR section. | |
d60e92d1 | 2420 | .TP |
836bad52 | 2421 | .BI write_lat_log \fR=\fPstr |
523bad63 TK |
2422 | Same as \fBwrite_bw_log\fR, except that this option stores I/O |
2423 | submission, completion, and total latencies instead. If no filename is given | |
2424 | with this option, the default filename of `jobname_type.log' is | |
2425 | used. Even if the filename is given, fio will still append the type of | |
2426 | log. So if one specifies: | |
2427 | .RS | |
2428 | .RS | |
2429 | .P | |
2430 | write_lat_log=foo | |
2431 | .RE | |
2432 | .P | |
2433 | The actual log names will be `foo_slat.x.log', `foo_clat.x.log', | |
2434 | and `foo_lat.x.log', where `x' is the index of the job (1..N, where N | |
2435 | is the number of jobs). This helps \fBfio_generate_plots\fR find the | |
2436 | logs automatically. If \fBper_job_logs\fR is false, then the filename | |
2437 | will not include the job index. See \fBLOG FILE FORMATS\fR section. | |
2438 | .RE | |
901bb994 | 2439 | .TP |
1e613c9c | 2440 | .BI write_hist_log \fR=\fPstr |
523bad63 TK |
2441 | Same as \fBwrite_lat_log\fR, but writes I/O completion latency |
2442 | histograms. If no filename is given with this option, the default filename | |
2443 | of `jobname_clat_hist.x.log' is used, where `x' is the index of the | |
2444 | job (1..N, where N is the number of jobs). Even if the filename is given, | |
2445 | fio will still append the type of log. If \fBper_job_logs\fR is false, | |
2446 | then the filename will not include the job index. See \fBLOG FILE FORMATS\fR section. | |
1e613c9c | 2447 | .TP |
c8eeb9df | 2448 | .BI write_iops_log \fR=\fPstr |
523bad63 TK |
2449 | Same as \fBwrite_bw_log\fR, but writes IOPS. If no filename is given |
2450 | with this option, the default filename of `jobname_type.x.log' is | |
2451 | used, where `x' is the index of the job (1..N, where N is the number of | |
2452 | jobs). Even if the filename is given, fio will still append the type of | |
2453 | log. If \fBper_job_logs\fR is false, then the filename will not include | |
2454 | the job index. See \fBLOG FILE FORMATS\fR section. | |
c8eeb9df | 2455 | .TP |
b8bc8cba JA |
2456 | .BI log_avg_msec \fR=\fPint |
2457 | By default, fio will log an entry in the iops, latency, or bw log for every | |
523bad63 | 2458 | I/O that completes. When writing to the disk log, that can quickly grow to a |
b8bc8cba | 2459 | very large size. Setting this option makes fio average the each log entry |
e6989e10 | 2460 | over the specified period of time, reducing the resolution of the log. See |
523bad63 TK |
2461 | \fBlog_max_value\fR as well. Defaults to 0, logging all entries. |
2462 | Also see \fBLOG FILE FORMATS\fR section. | |
b8bc8cba | 2463 | .TP |
1e613c9c | 2464 | .BI log_hist_msec \fR=\fPint |
523bad63 TK |
2465 | Same as \fBlog_avg_msec\fR, but logs entries for completion latency |
2466 | histograms. Computing latency percentiles from averages of intervals using | |
2467 | \fBlog_avg_msec\fR is inaccurate. Setting this option makes fio log | |
2468 | histogram entries over the specified period of time, reducing log sizes for | |
2469 | high IOPS devices while retaining percentile accuracy. See | |
2470 | \fBlog_hist_coarseness\fR as well. Defaults to 0, meaning histogram | |
2471 | logging is disabled. | |
1e613c9c KC |
2472 | .TP |
2473 | .BI log_hist_coarseness \fR=\fPint | |
523bad63 TK |
2474 | Integer ranging from 0 to 6, defining the coarseness of the resolution of |
2475 | the histogram logs enabled with \fBlog_hist_msec\fR. For each increment | |
2476 | in coarseness, fio outputs half as many bins. Defaults to 0, for which | |
2477 | histogram logs contain 1216 latency bins. See \fBLOG FILE FORMATS\fR section. | |
2478 | .TP | |
2479 | .BI log_max_value \fR=\fPbool | |
2480 | If \fBlog_avg_msec\fR is set, fio logs the average over that window. If | |
2481 | you instead want to log the maximum value, set this option to 1. Defaults to | |
2482 | 0, meaning that averaged values are logged. | |
1e613c9c | 2483 | .TP |
ae588852 | 2484 | .BI log_offset \fR=\fPbool |
523bad63 TK |
2485 | If this is set, the iolog options will include the byte offset for the I/O |
2486 | entry as well as the other data values. Defaults to 0 meaning that | |
2487 | offsets are not present in logs. Also see \fBLOG FILE FORMATS\fR section. | |
ae588852 | 2488 | .TP |
aee2ab67 | 2489 | .BI log_compression \fR=\fPint |
523bad63 TK |
2490 | If this is set, fio will compress the I/O logs as it goes, to keep the |
2491 | memory footprint lower. When a log reaches the specified size, that chunk is | |
2492 | removed and compressed in the background. Given that I/O logs are fairly | |
2493 | highly compressible, this yields a nice memory savings for longer runs. The | |
2494 | downside is that the compression will consume some background CPU cycles, so | |
2495 | it may impact the run. This, however, is also true if the logging ends up | |
2496 | consuming most of the system memory. So pick your poison. The I/O logs are | |
2497 | saved normally at the end of a run, by decompressing the chunks and storing | |
2498 | them in the specified log file. This feature depends on the availability of | |
2499 | zlib. | |
aee2ab67 | 2500 | .TP |
c08f9fe2 | 2501 | .BI log_compression_cpus \fR=\fPstr |
523bad63 TK |
2502 | Define the set of CPUs that are allowed to handle online log compression for |
2503 | the I/O jobs. This can provide better isolation between performance | |
c08f9fe2 JA |
2504 | sensitive jobs, and background compression work. |
2505 | .TP | |
b26317c9 | 2506 | .BI log_store_compressed \fR=\fPbool |
c08f9fe2 | 2507 | If set, fio will store the log files in a compressed format. They can be |
523bad63 TK |
2508 | decompressed with fio, using the \fB\-\-inflate\-log\fR command line |
2509 | parameter. The files will be stored with a `.fz' suffix. | |
b26317c9 | 2510 | .TP |
3aea75b1 KC |
2511 | .BI log_unix_epoch \fR=\fPbool |
2512 | If set, fio will log Unix timestamps to the log files produced by enabling | |
523bad63 | 2513 | write_type_log for each log type, instead of the default zero\-based |
3aea75b1 KC |
2514 | timestamps. |
2515 | .TP | |
66347cfa | 2516 | .BI block_error_percentiles \fR=\fPbool |
523bad63 TK |
2517 | If set, record errors in trim block\-sized units from writes and trims and |
2518 | output a histogram of how many trims it took to get to errors, and what kind | |
2519 | of error was encountered. | |
d60e92d1 | 2520 | .TP |
523bad63 TK |
2521 | .BI bwavgtime \fR=\fPint |
2522 | Average the calculated bandwidth over the given time. Value is specified in | |
2523 | milliseconds. If the job also does bandwidth logging through | |
2524 | \fBwrite_bw_log\fR, then the minimum of this option and | |
2525 | \fBlog_avg_msec\fR will be used. Default: 500ms. | |
d60e92d1 | 2526 | .TP |
523bad63 TK |
2527 | .BI iopsavgtime \fR=\fPint |
2528 | Average the calculated IOPS over the given time. Value is specified in | |
2529 | milliseconds. If the job also does IOPS logging through | |
2530 | \fBwrite_iops_log\fR, then the minimum of this option and | |
2531 | \fBlog_avg_msec\fR will be used. Default: 500ms. | |
d60e92d1 | 2532 | .TP |
d60e92d1 | 2533 | .BI disk_util \fR=\fPbool |
523bad63 TK |
2534 | Generate disk utilization statistics, if the platform supports it. |
2535 | Default: true. | |
fa769d44 | 2536 | .TP |
523bad63 TK |
2537 | .BI disable_lat \fR=\fPbool |
2538 | Disable measurements of total latency numbers. Useful only for cutting back | |
2539 | the number of calls to \fBgettimeofday\fR\|(2), as that does impact | |
2540 | performance at really high IOPS rates. Note that to really get rid of a | |
2541 | large amount of these calls, this option must be used with | |
2542 | \fBdisable_slat\fR and \fBdisable_bw_measurement\fR as well. | |
9e684a49 | 2543 | .TP |
523bad63 TK |
2544 | .BI disable_clat \fR=\fPbool |
2545 | Disable measurements of completion latency numbers. See | |
2546 | \fBdisable_lat\fR. | |
9e684a49 | 2547 | .TP |
523bad63 TK |
2548 | .BI disable_slat \fR=\fPbool |
2549 | Disable measurements of submission latency numbers. See | |
2550 | \fBdisable_lat\fR. | |
9e684a49 | 2551 | .TP |
523bad63 TK |
2552 | .BI disable_bw_measurement \fR=\fPbool "\fR,\fP disable_bw" \fR=\fPbool |
2553 | Disable measurements of throughput/bandwidth numbers. See | |
2554 | \fBdisable_lat\fR. | |
9e684a49 | 2555 | .TP |
83349190 YH |
2556 | .BI clat_percentiles \fR=\fPbool |
2557 | Enable the reporting of percentiles of completion latencies. | |
2558 | .TP | |
2559 | .BI percentile_list \fR=\fPfloat_list | |
66347cfa | 2560 | Overwrite the default list of percentiles for completion latencies and the |
523bad63 TK |
2561 | block error histogram. Each number is a floating number in the range |
2562 | (0,100], and the maximum length of the list is 20. Use ':' to separate the | |
2563 | numbers, and list the numbers in ascending order. For example, | |
2564 | `\-\-percentile_list=99.5:99.9' will cause fio to report the values of | |
2565 | completion latency below which 99.5% and 99.9% of the observed latencies | |
2566 | fell, respectively. | |
2567 | .SS "Error handling" | |
e4585935 | 2568 | .TP |
523bad63 TK |
2569 | .BI exitall_on_error |
2570 | When one job finishes in error, terminate the rest. The default is to wait | |
2571 | for each job to finish. | |
e4585935 | 2572 | .TP |
523bad63 TK |
2573 | .BI continue_on_error \fR=\fPstr |
2574 | Normally fio will exit the job on the first observed failure. If this option | |
2575 | is set, fio will continue the job when there is a 'non\-fatal error' (EIO or | |
2576 | EILSEQ) until the runtime is exceeded or the I/O size specified is | |
2577 | completed. If this option is used, there are two more stats that are | |
2578 | appended, the total error count and the first error. The error field given | |
2579 | in the stats is the first error that was hit during the run. | |
2580 | The allowed values are: | |
2581 | .RS | |
2582 | .RS | |
046395d7 | 2583 | .TP |
523bad63 TK |
2584 | .B none |
2585 | Exit on any I/O or verify errors. | |
de890a1e | 2586 | .TP |
523bad63 TK |
2587 | .B read |
2588 | Continue on read errors, exit on all others. | |
2cafffbe | 2589 | .TP |
523bad63 TK |
2590 | .B write |
2591 | Continue on write errors, exit on all others. | |
a0679ce5 | 2592 | .TP |
523bad63 TK |
2593 | .B io |
2594 | Continue on any I/O error, exit on all others. | |
de890a1e | 2595 | .TP |
523bad63 TK |
2596 | .B verify |
2597 | Continue on verify errors, exit on all others. | |
de890a1e | 2598 | .TP |
523bad63 TK |
2599 | .B all |
2600 | Continue on all errors. | |
b93b6a2e | 2601 | .TP |
523bad63 TK |
2602 | .B 0 |
2603 | Backward\-compatible alias for 'none'. | |
d3a623de | 2604 | .TP |
523bad63 TK |
2605 | .B 1 |
2606 | Backward\-compatible alias for 'all'. | |
2607 | .RE | |
2608 | .RE | |
1d360ffb | 2609 | .TP |
523bad63 TK |
2610 | .BI ignore_error \fR=\fPstr |
2611 | Sometimes you want to ignore some errors during test in that case you can | |
2612 | specify error list for each error type, instead of only being able to | |
2613 | ignore the default 'non\-fatal error' using \fBcontinue_on_error\fR. | |
2614 | `ignore_error=READ_ERR_LIST,WRITE_ERR_LIST,VERIFY_ERR_LIST' errors for | |
2615 | given error type is separated with ':'. Error may be symbol ('ENOSPC', 'ENOMEM') | |
2616 | or integer. Example: | |
de890a1e SL |
2617 | .RS |
2618 | .RS | |
523bad63 TK |
2619 | .P |
2620 | ignore_error=EAGAIN,ENOSPC:122 | |
2621 | .RE | |
2622 | .P | |
2623 | This option will ignore EAGAIN from READ, and ENOSPC and 122(EDQUOT) from | |
2624 | WRITE. This option works by overriding \fBcontinue_on_error\fR with | |
2625 | the list of errors for each error type if any. | |
2626 | .RE | |
de890a1e | 2627 | .TP |
523bad63 TK |
2628 | .BI error_dump \fR=\fPbool |
2629 | If set dump every error even if it is non fatal, true by default. If | |
2630 | disabled only fatal error will be dumped. | |
2631 | .SS "Running predefined workloads" | |
2632 | Fio includes predefined profiles that mimic the I/O workloads generated by | |
2633 | other tools. | |
49ccb8c1 | 2634 | .TP |
523bad63 TK |
2635 | .BI profile \fR=\fPstr |
2636 | The predefined workload to run. Current profiles are: | |
2637 | .RS | |
2638 | .RS | |
de890a1e | 2639 | .TP |
523bad63 TK |
2640 | .B tiobench |
2641 | Threaded I/O bench (tiotest/tiobench) like workload. | |
49ccb8c1 | 2642 | .TP |
523bad63 TK |
2643 | .B act |
2644 | Aerospike Certification Tool (ACT) like workload. | |
2645 | .RE | |
de890a1e SL |
2646 | .RE |
2647 | .P | |
523bad63 TK |
2648 | To view a profile's additional options use \fB\-\-cmdhelp\fR after specifying |
2649 | the profile. For example: | |
2650 | .RS | |
2651 | .TP | |
2652 | $ fio \-\-profile=act \-\-cmdhelp | |
de890a1e | 2653 | .RE |
523bad63 | 2654 | .SS "Act profile options" |
de890a1e | 2655 | .TP |
523bad63 TK |
2656 | .BI device\-names \fR=\fPstr |
2657 | Devices to use. | |
d54fce84 | 2658 | .TP |
523bad63 TK |
2659 | .BI load \fR=\fPint |
2660 | ACT load multiplier. Default: 1. | |
7aeb1e94 | 2661 | .TP |
523bad63 TK |
2662 | .BI test\-duration\fR=\fPtime |
2663 | How long the entire test takes to run. When the unit is omitted, the value | |
2664 | is given in seconds. Default: 24h. | |
1008602c | 2665 | .TP |
523bad63 TK |
2666 | .BI threads\-per\-queue\fR=\fPint |
2667 | Number of read I/O threads per device. Default: 8. | |
e5f34d95 | 2668 | .TP |
523bad63 TK |
2669 | .BI read\-req\-num\-512\-blocks\fR=\fPint |
2670 | Number of 512B blocks to read at the time. Default: 3. | |
d54fce84 | 2671 | .TP |
523bad63 TK |
2672 | .BI large\-block\-op\-kbytes\fR=\fPint |
2673 | Size of large block ops in KiB (writes). Default: 131072. | |
d54fce84 | 2674 | .TP |
523bad63 TK |
2675 | .BI prep |
2676 | Set to run ACT prep phase. | |
2677 | .SS "Tiobench profile options" | |
6d500c2e | 2678 | .TP |
523bad63 TK |
2679 | .BI size\fR=\fPstr |
2680 | Size in MiB. | |
0d978694 | 2681 | .TP |
523bad63 TK |
2682 | .BI block\fR=\fPint |
2683 | Block size in bytes. Default: 4096. | |
0d978694 | 2684 | .TP |
523bad63 TK |
2685 | .BI numruns\fR=\fPint |
2686 | Number of runs. | |
0d978694 | 2687 | .TP |
523bad63 TK |
2688 | .BI dir\fR=\fPstr |
2689 | Test directory. | |
65fa28ca | 2690 | .TP |
523bad63 TK |
2691 | .BI threads\fR=\fPint |
2692 | Number of threads. | |
d60e92d1 | 2693 | .SH OUTPUT |
d1429b5c AC |
2694 | While running, \fBfio\fR will display the status of the created jobs. For |
2695 | example: | |
d60e92d1 | 2696 | .RS |
d1429b5c | 2697 | .P |
6d500c2e | 2698 | Jobs: 1: [_r] [24.8% done] [ 13509/ 8334 kb/s] [eta 00h:01m:31s] |
d60e92d1 AC |
2699 | .RE |
2700 | .P | |
d1429b5c AC |
2701 | The characters in the first set of brackets denote the current status of each |
2702 | threads. The possible values are: | |
2703 | .P | |
2704 | .PD 0 | |
d60e92d1 AC |
2705 | .RS |
2706 | .TP | |
2707 | .B P | |
2708 | Setup but not started. | |
2709 | .TP | |
2710 | .B C | |
2711 | Thread created. | |
2712 | .TP | |
2713 | .B I | |
2714 | Initialized, waiting. | |
2715 | .TP | |
2716 | .B R | |
2717 | Running, doing sequential reads. | |
2718 | .TP | |
2719 | .B r | |
2720 | Running, doing random reads. | |
2721 | .TP | |
2722 | .B W | |
2723 | Running, doing sequential writes. | |
2724 | .TP | |
2725 | .B w | |
2726 | Running, doing random writes. | |
2727 | .TP | |
2728 | .B M | |
2729 | Running, doing mixed sequential reads/writes. | |
2730 | .TP | |
2731 | .B m | |
2732 | Running, doing mixed random reads/writes. | |
2733 | .TP | |
2734 | .B F | |
2735 | Running, currently waiting for \fBfsync\fR\|(2). | |
2736 | .TP | |
2737 | .B V | |
2738 | Running, verifying written data. | |
2739 | .TP | |
2740 | .B E | |
2741 | Exited, not reaped by main thread. | |
2742 | .TP | |
2743 | .B \- | |
2744 | Exited, thread reaped. | |
2745 | .RE | |
d1429b5c | 2746 | .PD |
d60e92d1 AC |
2747 | .P |
2748 | The second set of brackets shows the estimated completion percentage of | |
2749 | the current group. The third set shows the read and write I/O rate, | |
2750 | respectively. Finally, the estimated run time of the job is displayed. | |
2751 | .P | |
2752 | When \fBfio\fR completes (or is interrupted by Ctrl-C), it will show data | |
2753 | for each thread, each group of threads, and each disk, in that order. | |
2754 | .P | |
2755 | Per-thread statistics first show the threads client number, group-id, and | |
2756 | error code. The remaining figures are as follows: | |
2757 | .RS | |
d60e92d1 AC |
2758 | .TP |
2759 | .B io | |
2760 | Number of megabytes of I/O performed. | |
2761 | .TP | |
2762 | .B bw | |
2763 | Average data rate (bandwidth). | |
2764 | .TP | |
2765 | .B runt | |
2766 | Threads run time. | |
2767 | .TP | |
2768 | .B slat | |
2769 | Submission latency minimum, maximum, average and standard deviation. This is | |
2770 | the time it took to submit the I/O. | |
2771 | .TP | |
2772 | .B clat | |
2773 | Completion latency minimum, maximum, average and standard deviation. This | |
2774 | is the time between submission and completion. | |
2775 | .TP | |
2776 | .B bw | |
2777 | Bandwidth minimum, maximum, percentage of aggregate bandwidth received, average | |
2778 | and standard deviation. | |
2779 | .TP | |
2780 | .B cpu | |
2781 | CPU usage statistics. Includes user and system time, number of context switches | |
23a8e176 JA |
2782 | this thread went through and number of major and minor page faults. The CPU |
2783 | utilization numbers are averages for the jobs in that reporting group, while | |
2784 | the context and fault counters are summed. | |
d60e92d1 AC |
2785 | .TP |
2786 | .B IO depths | |
2787 | Distribution of I/O depths. Each depth includes everything less than (or equal) | |
2788 | to it, but greater than the previous depth. | |
2789 | .TP | |
2790 | .B IO issued | |
2791 | Number of read/write requests issued, and number of short read/write requests. | |
2792 | .TP | |
2793 | .B IO latencies | |
2794 | Distribution of I/O completion latencies. The numbers follow the same pattern | |
2795 | as \fBIO depths\fR. | |
2796 | .RE | |
d60e92d1 AC |
2797 | .P |
2798 | The group statistics show: | |
d1429b5c | 2799 | .PD 0 |
d60e92d1 AC |
2800 | .RS |
2801 | .TP | |
2802 | .B io | |
2803 | Number of megabytes I/O performed. | |
2804 | .TP | |
2805 | .B aggrb | |
2806 | Aggregate bandwidth of threads in the group. | |
2807 | .TP | |
2808 | .B minb | |
2809 | Minimum average bandwidth a thread saw. | |
2810 | .TP | |
2811 | .B maxb | |
2812 | Maximum average bandwidth a thread saw. | |
2813 | .TP | |
2814 | .B mint | |
d1429b5c | 2815 | Shortest runtime of threads in the group. |
d60e92d1 AC |
2816 | .TP |
2817 | .B maxt | |
2818 | Longest runtime of threads in the group. | |
2819 | .RE | |
d1429b5c | 2820 | .PD |
d60e92d1 AC |
2821 | .P |
2822 | Finally, disk statistics are printed with reads first: | |
d1429b5c | 2823 | .PD 0 |
d60e92d1 AC |
2824 | .RS |
2825 | .TP | |
2826 | .B ios | |
2827 | Number of I/Os performed by all groups. | |
2828 | .TP | |
2829 | .B merge | |
007c7be9 | 2830 | Number of merges performed by the I/O scheduler. |
d60e92d1 AC |
2831 | .TP |
2832 | .B ticks | |
2833 | Number of ticks we kept the disk busy. | |
2834 | .TP | |
2835 | .B io_queue | |
2836 | Total time spent in the disk queue. | |
2837 | .TP | |
2838 | .B util | |
2839 | Disk utilization. | |
2840 | .RE | |
d1429b5c | 2841 | .PD |
8423bd11 JA |
2842 | .P |
2843 | It is also possible to get fio to dump the current output while it is | |
2844 | running, without terminating the job. To do that, send fio the \fBUSR1\fR | |
2845 | signal. | |
d60e92d1 | 2846 | .SH TERSE OUTPUT |
2b8c71b0 CE |
2847 | If the \fB\-\-minimal\fR / \fB\-\-append-terse\fR options are given, the |
2848 | results will be printed/appended in a semicolon-delimited format suitable for | |
2849 | scripted use. | |
2850 | A job description (if provided) follows on a new line. Note that the first | |
525c2bfa JA |
2851 | number in the line is the version number. If the output has to be changed |
2852 | for some reason, this number will be incremented by 1 to signify that | |
a2c95580 AH |
2853 | change. Numbers in brackets (e.g. "[v3]") indicate which terse version |
2854 | introduced a field. The fields are: | |
d60e92d1 AC |
2855 | .P |
2856 | .RS | |
a2c95580 | 2857 | .B terse version, fio version [v3], jobname, groupid, error |
d60e92d1 AC |
2858 | .P |
2859 | Read status: | |
2860 | .RS | |
6d500c2e | 2861 | .B Total I/O \fR(KiB)\fP, bandwidth \fR(KiB/s)\fP, IOPS, runtime \fR(ms)\fP |
d60e92d1 AC |
2862 | .P |
2863 | Submission latency: | |
2864 | .RS | |
2865 | .B min, max, mean, standard deviation | |
2866 | .RE | |
2867 | Completion latency: | |
2868 | .RS | |
2869 | .B min, max, mean, standard deviation | |
2870 | .RE | |
1db92cb6 JA |
2871 | Completion latency percentiles (20 fields): |
2872 | .RS | |
2873 | .B Xth percentile=usec | |
2874 | .RE | |
525c2bfa JA |
2875 | Total latency: |
2876 | .RS | |
2877 | .B min, max, mean, standard deviation | |
2878 | .RE | |
d60e92d1 AC |
2879 | Bandwidth: |
2880 | .RS | |
a2c95580 AH |
2881 | .B min, max, aggregate percentage of total, mean, standard deviation, number of samples [v5] |
2882 | .RE | |
2883 | IOPS [v5]: | |
2884 | .RS | |
2885 | .B min, max, mean, standard deviation, number of samples | |
d60e92d1 AC |
2886 | .RE |
2887 | .RE | |
2888 | .P | |
2889 | Write status: | |
2890 | .RS | |
6d500c2e | 2891 | .B Total I/O \fR(KiB)\fP, bandwidth \fR(KiB/s)\fP, IOPS, runtime \fR(ms)\fP |
d60e92d1 AC |
2892 | .P |
2893 | Submission latency: | |
2894 | .RS | |
2895 | .B min, max, mean, standard deviation | |
2896 | .RE | |
2897 | Completion latency: | |
2898 | .RS | |
2899 | .B min, max, mean, standard deviation | |
2900 | .RE | |
1db92cb6 JA |
2901 | Completion latency percentiles (20 fields): |
2902 | .RS | |
2903 | .B Xth percentile=usec | |
2904 | .RE | |
525c2bfa JA |
2905 | Total latency: |
2906 | .RS | |
2907 | .B min, max, mean, standard deviation | |
2908 | .RE | |
d60e92d1 AC |
2909 | Bandwidth: |
2910 | .RS | |
a2c95580 AH |
2911 | .B min, max, aggregate percentage of total, mean, standard deviation, number of samples [v5] |
2912 | .RE | |
2913 | IOPS [v5]: | |
2914 | .RS | |
2915 | .B min, max, mean, standard deviation, number of samples | |
d60e92d1 AC |
2916 | .RE |
2917 | .RE | |
2918 | .P | |
a2c95580 AH |
2919 | Trim status [all but version 3]: |
2920 | .RS | |
2921 | Similar to Read/Write status but for trims. | |
2922 | .RE | |
2923 | .P | |
d1429b5c | 2924 | CPU usage: |
d60e92d1 | 2925 | .RS |
bd2626f0 | 2926 | .B user, system, context switches, major page faults, minor page faults |
d60e92d1 AC |
2927 | .RE |
2928 | .P | |
2929 | IO depth distribution: | |
2930 | .RS | |
2931 | .B <=1, 2, 4, 8, 16, 32, >=64 | |
2932 | .RE | |
2933 | .P | |
562c2d2f | 2934 | IO latency distribution: |
d60e92d1 | 2935 | .RS |
562c2d2f DN |
2936 | Microseconds: |
2937 | .RS | |
2938 | .B <=2, 4, 10, 20, 50, 100, 250, 500, 750, 1000 | |
2939 | .RE | |
2940 | Milliseconds: | |
2941 | .RS | |
2942 | .B <=2, 4, 10, 20, 50, 100, 250, 500, 750, 1000, 2000, >=2000 | |
2943 | .RE | |
2944 | .RE | |
2945 | .P | |
a2c95580 | 2946 | Disk utilization (1 for each disk used) [v3]: |
f2f788dd JA |
2947 | .RS |
2948 | .B name, read ios, write ios, read merges, write merges, read ticks, write ticks, read in-queue time, write in-queue time, disk utilization percentage | |
2949 | .RE | |
2950 | .P | |
5982a925 | 2951 | Error Info (dependent on continue_on_error, default off): |
562c2d2f | 2952 | .RS |
ff6bb260 | 2953 | .B total # errors, first error code |
d60e92d1 AC |
2954 | .RE |
2955 | .P | |
562c2d2f | 2956 | .B text description (if provided in config - appears on newline) |
d60e92d1 | 2957 | .RE |
2fc26c3d IC |
2958 | .P |
2959 | Below is a single line containing short names for each of the fields in | |
2960 | the minimal output v3, separated by semicolons: | |
2961 | .RS | |
2962 | .P | |
2963 | .nf | |
2964 | terse_version_3;fio_version;jobname;groupid;error;read_kb;read_bandwidth;read_iops;read_runtime_ms;read_slat_min;read_slat_max;read_slat_mean;read_slat_dev;read_clat_max;read_clat_min;read_clat_mean;read_clat_dev;read_clat_pct01;read_clat_pct02;read_clat_pct03;read_clat_pct04;read_clat_pct05;read_clat_pct06;read_clat_pct07;read_clat_pct08;read_clat_pct09;read_clat_pct10;read_clat_pct11;read_clat_pct12;read_clat_pct13;read_clat_pct14;read_clat_pct15;read_clat_pct16;read_clat_pct17;read_clat_pct18;read_clat_pct19;read_clat_pct20;read_tlat_min;read_lat_max;read_lat_mean;read_lat_dev;read_bw_min;read_bw_max;read_bw_agg_pct;read_bw_mean;read_bw_dev;write_kb;write_bandwidth;write_iops;write_runtime_ms;write_slat_min;write_slat_max;write_slat_mean;write_slat_dev;write_clat_max;write_clat_min;write_clat_mean;write_clat_dev;write_clat_pct01;write_clat_pct02;write_clat_pct03;write_clat_pct04;write_clat_pct05;write_clat_pct06;write_clat_pct07;write_clat_pct08;write_clat_pct09;write_clat_pct10;write_clat_pct11;write_clat_pct12;write_clat_pct13;write_clat_pct14;write_clat_pct15;write_clat_pct16;write_clat_pct17;write_clat_pct18;write_clat_pct19;write_clat_pct20;write_tlat_min;write_lat_max;write_lat_mean;write_lat_dev;write_bw_min;write_bw_max;write_bw_agg_pct;write_bw_mean;write_bw_dev;cpu_user;cpu_sys;cpu_csw;cpu_mjf;pu_minf;iodepth_1;iodepth_2;iodepth_4;iodepth_8;iodepth_16;iodepth_32;iodepth_64;lat_2us;lat_4us;lat_10us;lat_20us;lat_50us;lat_100us;lat_250us;lat_500us;lat_750us;lat_1000us;lat_2ms;lat_4ms;lat_10ms;lat_20ms;lat_50ms;lat_100ms;lat_250ms;lat_500ms;lat_750ms;lat_1000ms;lat_2000ms;lat_over_2000ms;disk_name;disk_read_iops;disk_write_iops;disk_read_merges;disk_write_merges;disk_read_ticks;write_ticks;disk_queue_time;disk_util | |
2965 | .fi | |
2966 | .RE | |
d9e557ab VF |
2967 | .SH JSON+ OUTPUT |
2968 | The \fBjson+\fR output format is identical to the \fBjson\fR output format except that it | |
2969 | adds a full dump of the completion latency bins. Each \fBbins\fR object contains a | |
2970 | set of (key, value) pairs where keys are latency durations and values count how | |
2971 | many I/Os had completion latencies of the corresponding duration. For example, | |
2972 | consider: | |
2973 | ||
2974 | .RS | |
2975 | "bins" : { "87552" : 1, "89600" : 1, "94720" : 1, "96768" : 1, "97792" : 1, "99840" : 1, "100864" : 2, "103936" : 6, "104960" : 534, "105984" : 5995, "107008" : 7529, ... } | |
2976 | .RE | |
2977 | ||
2978 | This data indicates that one I/O required 87,552ns to complete, two I/Os required | |
2979 | 100,864ns to complete, and 7529 I/Os required 107,008ns to complete. | |
2980 | ||
2981 | Also included with fio is a Python script \fBfio_jsonplus_clat2csv\fR that takes | |
2982 | json+ output and generates CSV-formatted latency data suitable for plotting. | |
2983 | ||
2984 | The latency durations actually represent the midpoints of latency intervals. | |
2985 | For details refer to stat.h. | |
2986 | ||
2987 | ||
29dbd1e5 JA |
2988 | .SH TRACE FILE FORMAT |
2989 | There are two trace file format that you can encounter. The older (v1) format | |
2990 | is unsupported since version 1.20-rc3 (March 2008). It will still be described | |
2991 | below in case that you get an old trace and want to understand it. | |
2992 | ||
2993 | In any case the trace is a simple text file with a single action per line. | |
2994 | ||
2995 | .P | |
2996 | .B Trace file format v1 | |
2997 | .RS | |
2998 | Each line represents a single io action in the following format: | |
2999 | ||
3000 | rw, offset, length | |
3001 | ||
3002 | where rw=0/1 for read/write, and the offset and length entries being in bytes. | |
3003 | ||
3004 | This format is not supported in Fio versions => 1.20-rc3. | |
3005 | ||
3006 | .RE | |
3007 | .P | |
3008 | .B Trace file format v2 | |
3009 | .RS | |
3010 | The second version of the trace file format was added in Fio version 1.17. | |
8fb5444d | 3011 | It allows one to access more then one file per trace and has a bigger set of |
29dbd1e5 JA |
3012 | possible file actions. |
3013 | ||
3014 | The first line of the trace file has to be: | |
3015 | ||
3016 | \fBfio version 2 iolog\fR | |
3017 | ||
3018 | Following this can be lines in two different formats, which are described below. | |
3019 | The file management format: | |
3020 | ||
3021 | \fBfilename action\fR | |
3022 | ||
3023 | The filename is given as an absolute path. The action can be one of these: | |
3024 | ||
3025 | .P | |
3026 | .PD 0 | |
3027 | .RS | |
3028 | .TP | |
3029 | .B add | |
3030 | Add the given filename to the trace | |
3031 | .TP | |
3032 | .B open | |
3033 | Open the file with the given filename. The filename has to have been previously | |
3034 | added with the \fBadd\fR action. | |
3035 | .TP | |
3036 | .B close | |
3037 | Close the file with the given filename. The file must have previously been | |
3038 | opened. | |
3039 | .RE | |
3040 | .PD | |
3041 | .P | |
3042 | ||
3043 | The file io action format: | |
3044 | ||
3045 | \fBfilename action offset length\fR | |
3046 | ||
3047 | The filename is given as an absolute path, and has to have been added and opened | |
3048 | before it can be used with this format. The offset and length are given in | |
3049 | bytes. The action can be one of these: | |
3050 | ||
3051 | .P | |
3052 | .PD 0 | |
3053 | .RS | |
3054 | .TP | |
3055 | .B wait | |
3056 | Wait for 'offset' microseconds. Everything below 100 is discarded. The time is | |
3057 | relative to the previous wait statement. | |
3058 | .TP | |
3059 | .B read | |
3060 | Read \fBlength\fR bytes beginning from \fBoffset\fR | |
3061 | .TP | |
3062 | .B write | |
3063 | Write \fBlength\fR bytes beginning from \fBoffset\fR | |
3064 | .TP | |
3065 | .B sync | |
3066 | fsync() the file | |
3067 | .TP | |
3068 | .B datasync | |
3069 | fdatasync() the file | |
3070 | .TP | |
3071 | .B trim | |
3072 | trim the given file from the given \fBoffset\fR for \fBlength\fR bytes | |
3073 | .RE | |
3074 | .PD | |
3075 | .P | |
3076 | ||
3077 | .SH CPU IDLENESS PROFILING | |
3078 | In some cases, we want to understand CPU overhead in a test. For example, | |
3079 | we test patches for the specific goodness of whether they reduce CPU usage. | |
3080 | fio implements a balloon approach to create a thread per CPU that runs at | |
3081 | idle priority, meaning that it only runs when nobody else needs the cpu. | |
3082 | By measuring the amount of work completed by the thread, idleness of each | |
3083 | CPU can be derived accordingly. | |
3084 | ||
3085 | An unit work is defined as touching a full page of unsigned characters. Mean | |
3086 | and standard deviation of time to complete an unit work is reported in "unit | |
3087 | work" section. Options can be chosen to report detailed percpu idleness or | |
3088 | overall system idleness by aggregating percpu stats. | |
3089 | ||
3090 | .SH VERIFICATION AND TRIGGERS | |
3091 | Fio is usually run in one of two ways, when data verification is done. The | |
3092 | first is a normal write job of some sort with verify enabled. When the | |
3093 | write phase has completed, fio switches to reads and verifies everything | |
3094 | it wrote. The second model is running just the write phase, and then later | |
3095 | on running the same job (but with reads instead of writes) to repeat the | |
3096 | same IO patterns and verify the contents. Both of these methods depend | |
3097 | on the write phase being completed, as fio otherwise has no idea how much | |
3098 | data was written. | |
3099 | ||
3100 | With verification triggers, fio supports dumping the current write state | |
3101 | to local files. Then a subsequent read verify workload can load this state | |
3102 | and know exactly where to stop. This is useful for testing cases where | |
3103 | power is cut to a server in a managed fashion, for instance. | |
3104 | ||
3105 | A verification trigger consists of two things: | |
3106 | ||
3107 | .RS | |
3108 | Storing the write state of each job | |
3109 | .LP | |
3110 | Executing a trigger command | |
3111 | .RE | |
3112 | ||
3113 | The write state is relatively small, on the order of hundreds of bytes | |
3114 | to single kilobytes. It contains information on the number of completions | |
3115 | done, the last X completions, etc. | |
3116 | ||
3117 | A trigger is invoked either through creation (\fBtouch\fR) of a specified | |
3118 | file in the system, or through a timeout setting. If fio is run with | |
3119 | \fB\-\-trigger\-file=/tmp/trigger-file\fR, then it will continually check for | |
3120 | the existence of /tmp/trigger-file. When it sees this file, it will | |
3121 | fire off the trigger (thus saving state, and executing the trigger | |
3122 | command). | |
3123 | ||
3124 | For client/server runs, there's both a local and remote trigger. If | |
3125 | fio is running as a server backend, it will send the job states back | |
3126 | to the client for safe storage, then execute the remote trigger, if | |
3127 | specified. If a local trigger is specified, the server will still send | |
3128 | back the write state, but the client will then execute the trigger. | |
3129 | ||
3130 | .RE | |
3131 | .P | |
3132 | .B Verification trigger example | |
3133 | .RS | |
3134 | ||
3135 | Lets say we want to run a powercut test on the remote machine 'server'. | |
3136 | Our write workload is in write-test.fio. We want to cut power to 'server' | |
3137 | at some point during the run, and we'll run this test from the safety | |
3138 | or our local machine, 'localbox'. On the server, we'll start the fio | |
3139 | backend normally: | |
3140 | ||
3141 | server# \fBfio \-\-server\fR | |
3142 | ||
3143 | and on the client, we'll fire off the workload: | |
3144 | ||
e0ee7a8b | 3145 | localbox$ \fBfio \-\-client=server \-\-trigger\-file=/tmp/my\-trigger \-\-trigger-remote="bash \-c "echo b > /proc/sysrq-triger""\fR |
29dbd1e5 JA |
3146 | |
3147 | We set \fB/tmp/my-trigger\fR as the trigger file, and we tell fio to execute | |
3148 | ||
3149 | \fBecho b > /proc/sysrq-trigger\fR | |
3150 | ||
3151 | on the server once it has received the trigger and sent us the write | |
3152 | state. This will work, but it's not \fIreally\fR cutting power to the server, | |
3153 | it's merely abruptly rebooting it. If we have a remote way of cutting | |
3154 | power to the server through IPMI or similar, we could do that through | |
3155 | a local trigger command instead. Lets assume we have a script that does | |
3156 | IPMI reboot of a given hostname, ipmi-reboot. On localbox, we could | |
3157 | then have run fio with a local trigger instead: | |
3158 | ||
3159 | localbox$ \fBfio \-\-client=server \-\-trigger\-file=/tmp/my\-trigger \-\-trigger="ipmi-reboot server"\fR | |
3160 | ||
3161 | For this case, fio would wait for the server to send us the write state, | |
3162 | then execute 'ipmi-reboot server' when that happened. | |
3163 | ||
3164 | .RE | |
3165 | .P | |
3166 | .B Loading verify state | |
3167 | .RS | |
3168 | To load store write state, read verification job file must contain | |
3169 | the verify_state_load option. If that is set, fio will load the previously | |
3170 | stored state. For a local fio run this is done by loading the files directly, | |
3171 | and on a client/server run, the server backend will ask the client to send | |
3172 | the files over and load them from there. | |
3173 | ||
3174 | .RE | |
3175 | ||
a3ae5b05 JA |
3176 | .SH LOG FILE FORMATS |
3177 | ||
3178 | Fio supports a variety of log file formats, for logging latencies, bandwidth, | |
3179 | and IOPS. The logs share a common format, which looks like this: | |
3180 | ||
5a83478f | 3181 | .B time (msec), value, data direction, block size (bytes), offset (bytes) |
a3ae5b05 JA |
3182 | |
3183 | Time for the log entry is always in milliseconds. The value logged depends | |
3184 | on the type of log, it will be one of the following: | |
3185 | ||
3186 | .P | |
3187 | .PD 0 | |
3188 | .TP | |
3189 | .B Latency log | |
3190 | Value is in latency in usecs | |
3191 | .TP | |
3192 | .B Bandwidth log | |
6d500c2e | 3193 | Value is in KiB/sec |
a3ae5b05 JA |
3194 | .TP |
3195 | .B IOPS log | |
3196 | Value is in IOPS | |
3197 | .PD | |
3198 | .P | |
3199 | ||
3200 | Data direction is one of the following: | |
3201 | ||
3202 | .P | |
3203 | .PD 0 | |
3204 | .TP | |
3205 | .B 0 | |
3206 | IO is a READ | |
3207 | .TP | |
3208 | .B 1 | |
3209 | IO is a WRITE | |
3210 | .TP | |
3211 | .B 2 | |
3212 | IO is a TRIM | |
3213 | .PD | |
3214 | .P | |
3215 | ||
5a83478f SW |
3216 | The entry's *block size* is always in bytes. The \fIoffset\fR is the offset, in |
3217 | bytes, from the start of the file, for that particular IO. The logging of the | |
3218 | offset can be toggled with \fBlog_offset\fR. | |
a3ae5b05 | 3219 | |
4e7a8814 | 3220 | If windowed logging is enabled through \fBlog_avg_msec\fR, then fio doesn't log |
a3ae5b05 | 3221 | individual IOs. Instead of logs the average values over the specified |
5a83478f SW |
3222 | period of time. Since \fIdata direction\fR, \fIblock size\fR and \fIoffset\fR |
3223 | are per-IO values, if windowed logging is enabled they aren't applicable and | |
3224 | will be 0. If windowed logging is enabled and \fBlog_max_value\fR is set, then | |
3225 | fio logs maximum values in that window instead of averages. | |
a3ae5b05 | 3226 | |
1e613c9c KC |
3227 | For histogram logging the logs look like this: |
3228 | ||
3229 | .B time (msec), data direction, block-size, bin 0, bin 1, ..., bin 1215 | |
3230 | ||
3231 | Where 'bin i' gives the frequency of IO requests with a latency falling in | |
3232 | the i-th bin. See \fBlog_hist_coarseness\fR for logging fewer bins. | |
3233 | ||
a3ae5b05 JA |
3234 | .RE |
3235 | ||
49da1240 JA |
3236 | .SH CLIENT / SERVER |
3237 | Normally you would run fio as a stand-alone application on the machine | |
3238 | where the IO workload should be generated. However, it is also possible to | |
3239 | run the frontend and backend of fio separately. This makes it possible to | |
3240 | have a fio server running on the machine(s) where the IO workload should | |
3241 | be running, while controlling it from another machine. | |
3242 | ||
3243 | To start the server, you would do: | |
3244 | ||
3245 | \fBfio \-\-server=args\fR | |
3246 | ||
3247 | on that machine, where args defines what fio listens to. The arguments | |
811826be | 3248 | are of the form 'type:hostname or IP:port'. 'type' is either 'ip' (or ip4) |
20c67f10 MS |
3249 | for TCP/IP v4, 'ip6' for TCP/IP v6, or 'sock' for a local unix domain |
3250 | socket. 'hostname' is either a hostname or IP address, and 'port' is the port to | |
811826be | 3251 | listen to (only valid for TCP/IP, not a local socket). Some examples: |
49da1240 | 3252 | |
e0ee7a8b | 3253 | 1) \fBfio \-\-server\fR |
49da1240 JA |
3254 | |
3255 | Start a fio server, listening on all interfaces on the default port (8765). | |
3256 | ||
e0ee7a8b | 3257 | 2) \fBfio \-\-server=ip:hostname,4444\fR |
49da1240 JA |
3258 | |
3259 | Start a fio server, listening on IP belonging to hostname and on port 4444. | |
3260 | ||
e0ee7a8b | 3261 | 3) \fBfio \-\-server=ip6:::1,4444\fR |
811826be JA |
3262 | |
3263 | Start a fio server, listening on IPv6 localhost ::1 and on port 4444. | |
3264 | ||
e0ee7a8b | 3265 | 4) \fBfio \-\-server=,4444\fR |
49da1240 JA |
3266 | |
3267 | Start a fio server, listening on all interfaces on port 4444. | |
3268 | ||
e0ee7a8b | 3269 | 5) \fBfio \-\-server=1.2.3.4\fR |
49da1240 JA |
3270 | |
3271 | Start a fio server, listening on IP 1.2.3.4 on the default port. | |
3272 | ||
e0ee7a8b | 3273 | 6) \fBfio \-\-server=sock:/tmp/fio.sock\fR |
49da1240 JA |
3274 | |
3275 | Start a fio server, listening on the local socket /tmp/fio.sock. | |
3276 | ||
3277 | When a server is running, you can connect to it from a client. The client | |
3278 | is run with: | |
3279 | ||
e0ee7a8b | 3280 | \fBfio \-\-local-args \-\-client=server \-\-remote-args <job file(s)>\fR |
49da1240 | 3281 | |
e01e9745 MS |
3282 | where \-\-local-args are arguments that are local to the client where it is |
3283 | running, 'server' is the connect string, and \-\-remote-args and <job file(s)> | |
49da1240 JA |
3284 | are sent to the server. The 'server' string follows the same format as it |
3285 | does on the server side, to allow IP/hostname/socket and port strings. | |
3286 | You can connect to multiple clients as well, to do that you could run: | |
3287 | ||
e0ee7a8b | 3288 | \fBfio \-\-client=server2 \-\-client=server2 <job file(s)>\fR |
323255cc JA |
3289 | |
3290 | If the job file is located on the fio server, then you can tell the server | |
3291 | to load a local file as well. This is done by using \-\-remote-config: | |
3292 | ||
e0ee7a8b | 3293 | \fBfio \-\-client=server \-\-remote-config /path/to/file.fio\fR |
323255cc | 3294 | |
39b5f61e | 3295 | Then fio will open this local (to the server) job file instead |
323255cc | 3296 | of being passed one from the client. |
39b5f61e | 3297 | |
ff6bb260 | 3298 | If you have many servers (example: 100 VMs/containers), you can input a pathname |
39b5f61e BE |
3299 | of a file containing host IPs/names as the parameter value for the \-\-client option. |
3300 | For example, here is an example "host.list" file containing 2 hostnames: | |
3301 | ||
3302 | host1.your.dns.domain | |
3303 | .br | |
3304 | host2.your.dns.domain | |
3305 | ||
3306 | The fio command would then be: | |
3307 | ||
e0ee7a8b | 3308 | \fBfio \-\-client=host.list <job file>\fR |
39b5f61e BE |
3309 | |
3310 | In this mode, you cannot input server-specific parameters or job files, and all | |
3311 | servers receive the same job file. | |
3312 | ||
3313 | In order to enable fio \-\-client runs utilizing a shared filesystem from multiple hosts, | |
ff6bb260 SL |
3314 | fio \-\-client now prepends the IP address of the server to the filename. For example, |
3315 | if fio is using directory /mnt/nfs/fio and is writing filename fileio.tmp, | |
39b5f61e BE |
3316 | with a \-\-client hostfile |
3317 | containing two hostnames h1 and h2 with IP addresses 192.168.10.120 and 192.168.10.121, then | |
3318 | fio will create two files: | |
3319 | ||
3320 | /mnt/nfs/fio/192.168.10.120.fileio.tmp | |
3321 | .br | |
3322 | /mnt/nfs/fio/192.168.10.121.fileio.tmp | |
3323 | ||
d60e92d1 | 3324 | .SH AUTHORS |
49da1240 | 3325 | |
d60e92d1 | 3326 | .B fio |
aa58d252 | 3327 | was written by Jens Axboe <jens.axboe@oracle.com>, |
f8b8f7da | 3328 | now Jens Axboe <axboe@fb.com>. |
d1429b5c AC |
3329 | .br |
3330 | This man page was written by Aaron Carroll <aaronc@cse.unsw.edu.au> based | |
d60e92d1 AC |
3331 | on documentation by Jens Axboe. |
3332 | .SH "REPORTING BUGS" | |
482900c9 | 3333 | Report bugs to the \fBfio\fR mailing list <fio@vger.kernel.org>. |
6468020d TK |
3334 | .br |
3335 | See \fBREPORTING-BUGS\fR. | |
3336 | ||
3337 | \fBREPORTING-BUGS\fR: http://git.kernel.dk/cgit/fio/plain/REPORTING-BUGS | |
d60e92d1 | 3338 | .SH "SEE ALSO" |
d1429b5c AC |
3339 | For further documentation see \fBHOWTO\fR and \fBREADME\fR. |
3340 | .br | |
3341 | Sample jobfiles are available in the \fBexamples\fR directory. | |
9040e236 TK |
3342 | .br |
3343 | These are typically located under /usr/share/doc/fio. | |
3344 | ||
e5123c4a | 3345 | \fBHOWTO\fR: http://git.kernel.dk/cgit/fio/plain/HOWTO |
9040e236 | 3346 | .br |
e5123c4a | 3347 | \fBREADME\fR: http://git.kernel.dk/cgit/fio/plain/README |
9040e236 | 3348 | .br |