prefixes. To specify power-of-10 decimal values defined in the
International System of Units (SI):
- * *Ki* -- means kilo (K) or 1000
- * *Mi* -- means mega (M) or 1000**2
- * *Gi* -- means giga (G) or 1000**3
- * *Ti* -- means tera (T) or 1000**4
- * *Pi* -- means peta (P) or 1000**5
+ * *ki* -- means kilo (K) or 1000
+ * *mi* -- means mega (M) or 1000**2
+ * *gi* -- means giga (G) or 1000**3
+ * *ti* -- means tera (T) or 1000**4
+ * *pi* -- means peta (P) or 1000**5
To specify power-of-2 binary values defined in IEC 80000-13:
* *k* -- means kibi (Ki) or 1024
- * *M* -- means mebi (Mi) or 1024**2
- * *G* -- means gibi (Gi) or 1024**3
- * *T* -- means tebi (Ti) or 1024**4
- * *P* -- means pebi (Pi) or 1024**5
+ * *m* -- means mebi (Mi) or 1024**2
+ * *g* -- means gibi (Gi) or 1024**3
+ * *t* -- means tebi (Ti) or 1024**4
+ * *p* -- means pebi (Pi) or 1024**5
With :option:`kb_base`\=1024 (the default), the unit prefixes are opposite
from those specified in the SI and IEC 80000-13 standards to provide
**float_list**
A list of floating point numbers, separated by a ':' character.
+With the above in mind, here follows the complete list of fio job parameters.
+
Units
~~~~~
Bit based.
-With the above in mind, here follows the complete list of fio job parameters.
-
-
Job description
~~~~~~~~~~~~~~~
typically won't work with direct I/O, as that normally requires sector
alignment.
-.. option:: bs_is_seq_rand
+.. option:: bs_is_seq_rand=bool
If this option is set, fio will use the normal read,write blocksize settings
as sequential,random blocksize settings instead. Any random read or write
**cudamalloc**
Use GPU memory as the buffers for GPUDirect RDMA benchmark.
+ The ioengine must be rdma.
The area allocated is a function of the maximum allowed bs size for the job,
multiplied by the I/O depth given. Note that for **shmhuge** and
[libhdfs]
- the listening port of the HFDS cluster namenode.
+ The listening port of the HFDS cluster namenode.
.. option:: interface=str : [netsplice] [net]
**0**
Default. Preallocate donor's file on init.
**1**
- Allocate space immediately inside defragment event, and free right
+ Allocate space immediately inside defragment event, and free right
after event.
.. option:: clustername=str : [rbd]
.. option:: chunk_size : [libhdfs]
- the size of the chunk to use for each file.
+ The size of the chunk to use for each file.
I/O depth
replay, the file needs to be turned into a blkparse binary data file first
(``blkparse <device> -o /dev/null -d file_for_fio.bin``).
-.. option:: replay_no_stall=int
+.. option:: replay_no_stall=bool
When replaying I/O with :option:`read_iolog` the default behavior is to
attempt to respect the timestamps within the log and replay them with the
.. option:: verifysort_nr=int
- Pre-load and sort verify blocks for a read workload.
+ Pre-load and sort verify blocks for a read workload.
.. option:: verify_offset=int
.. option:: trim_backlog=int
- Verify that trim/discarded blocks are returned as zeros.
+ Trim after this number of blocks are written.
.. option:: trim_backlog_batch=int
all jobs in a file will be part of the same reporting group, unless
separated by a :option:`stonewall`.
-.. option:: stats
+.. option:: stats=bool
By default, fio collects and shows final output results for all jobs
that run. If this option is set to 0, then fio will ignore it in
you instead want to log the maximum value, set this option to 1. Defaults to
0, meaning that averaged values are logged.
-.. option:: log_offset=int
+.. option:: log_offset=bool
If this is set, the iolog options will include the byte offset for the I/O
entry as well as the other data values. Defaults to 0 meaning that
o->compress_percentage = le32_to_cpu(top->compress_percentage);
o->compress_chunk = le32_to_cpu(top->compress_chunk);
o->dedupe_percentage = le32_to_cpu(top->dedupe_percentage);
- o->skip_bad = le32_to_cpu(top->skip_bad);
o->block_error_hist = le32_to_cpu(top->block_error_hist);
o->replay_align = le32_to_cpu(top->replay_align);
o->replay_scale = le32_to_cpu(top->replay_scale);
top->compress_chunk = cpu_to_le32(o->compress_chunk);
top->dedupe_percentage = cpu_to_le32(o->dedupe_percentage);
top->block_error_hist = cpu_to_le32(o->block_error_hist);
- top->skip_bad = cpu_to_le32(o->skip_bad);
top->replay_align = cpu_to_le32(o->replay_align);
top->replay_scale = cpu_to_le32(o->replay_scale);
top->per_job_logs = cpu_to_le32(o->per_job_logs);
#include <mtd/mtd-user.h>
#include "../fio.h"
+#include "../optgroup.h"
#include "../verify.h"
#include "../oslib/libmtd.h"
struct mtd_dev_info info;
};
+struct fio_mtd_options {
+ void *pad; /* avoid off1 == 0 */
+ unsigned int skip_bad;
+};
+
+static struct fio_option options[] = {
+ {
+ .name = "skip_bad",
+ .lname = "Skip operations against bad blocks",
+ .type = FIO_OPT_BOOL,
+ .off1 = offsetof(struct fio_mtd_options, skip_bad),
+ .help = "Skip operations against known bad blocks.",
+ .hide = 1,
+ .def = "0",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_MTD,
+ },
+ {
+ .name = NULL,
+ },
+};
+
static int fio_mtd_maybe_mark_bad(struct thread_data *td,
struct fio_mtd_data *fmd,
struct io_u *io_u, int eb)
{
struct fio_file *f = io_u->file;
struct fio_mtd_data *fmd = FILE_ENG_DATA(f);
+ struct fio_mtd_options *o = td->eo;
int local_offs = 0;
int ret;
(int)fmd->info.eb_size - eb_offs);
char *buf = ((char *)io_u->buf) + local_offs;
- if (td->o.skip_bad) {
+ if (o->skip_bad) {
ret = fio_mtd_is_bad(td, fmd, io_u, eb);
if (ret == -1)
break;
.close_file = fio_mtd_close_file,
.get_file_size = fio_mtd_get_file_size,
.flags = FIO_SYNCIO | FIO_NOEXTEND,
+ .options = options,
+ .option_struct_size = sizeof(struct fio_mtd_options),
};
static void fio_init fio_mtd_register(void)
.I int
Integer. A whole number value, which may contain an integer prefix
and an integer suffix.
-
+.RS
+.RS
+.P
[*integer prefix*] **number** [*integer suffix*]
-
+.RE
+.P
The optional *integer prefix* specifies the number's base. The default
is decimal. *0x* specifies hexadecimal.
-
+.P
The optional *integer suffix* specifies the number's units, and includes an
optional unit prefix and an optional unit. For quantities of data, the
default unit is bytes. For quantities of time, the default unit is seconds
unless otherwise specified.
-
-With \fBkb_base=1000\fR, fio follows international standards for unit
+.P
+With `kb_base=1000', fio follows international standards for unit
prefixes. To specify power-of-10 decimal values defined in the
International System of Units (SI):
-
-.nf
+.RS
+.P
ki means kilo (K) or 1000
+.RE
+.RS
mi means mega (M) or 1000**2
+.RE
+.RS
gi means giga (G) or 1000**3
+.RE
+.RS
ti means tera (T) or 1000**4
+.RE
+.RS
pi means peta (P) or 1000**5
-.fi
-
+.RE
+.P
To specify power-of-2 binary values defined in IEC 80000-13:
-
-.nf
+.RS
+.P
k means kibi (Ki) or 1024
+.RE
+.RS
m means mebi (Mi) or 1024**2
+.RE
+.RS
g means gibi (Gi) or 1024**3
+.RE
+.RS
t means tebi (Ti) or 1024**4
+.RE
+.RS
p means pebi (Pi) or 1024**5
-.fi
-
-With \fBkb_base=1024\fR (the default), the unit prefixes are opposite
+.RE
+.P
+With `kb_base=1024' (the default), the unit prefixes are opposite
from those specified in the SI and IEC 80000-13 standards to provide
compatibility with old scripts. For example, 4k means 4096.
-
+.P
For quantities of data, an optional unit of 'B' may be included
(e.g., 'kB' is the same as 'k').
-
+.P
The *integer suffix* is not case sensitive (e.g., m/mi mean mebi/mega,
not milli). 'b' and 'B' both mean byte, not bit.
-
-Examples with \fBkb_base=1000\fR:
-
-.nf
+.P
+Examples with `kb_base=1000':
+.RS
+.P
4 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB
+.RE
+.RS
1 MiB: 1048576, 1m, 1024k
+.RE
+.RS
1 MB: 1000000, 1mi, 1000ki
+.RE
+.RS
1 TiB: 1073741824, 1t, 1024m, 1048576k
+.RE
+.RS
1 TB: 1000000000, 1ti, 1000mi, 1000000ki
-.fi
-
-Examples with \fBkb_base=1024\fR (default):
-
-.nf
+.RE
+.P
+Examples with `kb_base=1024' (default):
+.RS
+.P
4 KiB: 4096, 4096b, 4096B, 4k, 4kb, 4kB, 4K, 4KB
+.RE
+.RS
1 MiB: 1048576, 1m, 1024k
+.RE
+.RS
1 MB: 1000000, 1mi, 1000ki
+.RE
+.RS
1 TiB: 1073741824, 1t, 1024m, 1048576k
+.RE
+.RS
1 TB: 1000000000, 1ti, 1000mi, 1000000ki
-.fi
-
+.RE
+.P
To specify times (units are not case sensitive):
-
-.nf
+.RS
+.P
D means days
+.RE
+.RS
H means hours
+.RE
+.RS
M mean minutes
+.RE
+.RS
s or sec means seconds (default)
+.RE
+.RS
ms or msec means milliseconds
+.RE
+.RS
us or usec means microseconds
-.fi
-
+.RE
+.P
If the option accepts an upper and lower range, use a colon ':' or
minus '-' to separate such values. See `irange` parameter type.
If the lower value specified happens to be larger than the upper value
the two values are swapped.
+.RE
.TP
.I bool
Boolean. Usually parsed as an integer, however only defined for
.B exitall
Terminate all jobs when one finishes. Default: wait for each job to finish.
.TP
-.B exitall_on_error \fR=\fPbool
+.B exitall_on_error
Terminate all jobs if one job finishes in error. Default: wait for each job
to finish.
.TP
Specifies the number of iterations (runs of the same workload) of this job.
Default: 1.
.TP
-.BI verify_only \fR=\fPbool
+.BI verify_only
Do not perform the specified workload, only verify data still matches previous
invocation of this workload. This option allows one to check data multiple
times at a later date without overwriting it. This option makes sense only for
Replay the I/O patterns contained in the specified file generated by
\fBwrite_iolog\fR, or may be a \fBblktrace\fR binary file.
.TP
-.BI replay_no_stall \fR=\fPint
+.BI replay_no_stall \fR=\fPbool
While replaying I/O patterns using \fBread_iolog\fR the default behavior
attempts to respect timing information between I/Os. Enabling
\fBreplay_no_stall\fR causes I/Os to be replayed as fast as possible while
connections rather than initiating an outgoing connection. The
hostname must be omitted if this option is used.
.TP
-.BI (net,netsplice)pingpong \fR=\fPbool
+.BI (net,netsplice)pingpong
Normally a network writer will just continue writing data, and a network reader
will just consume packets. If pingpong=1 is set, a writer will send its normal
payload to the reader, then wait for the reader to send the same payload back.
cluster. If the clustername is specified, the clientname shall be the full
type.id string. If no type. prefix is given, fio will add 'client.' by default.
.TP
-.BI (mtd)skipbad \fR=\fPbool
+.BI (mtd)skip_bad \fR=\fPbool
Skip operations against known bad blocks.
.SH OUTPUT
While running, \fBfio\fR will display the status of the created jobs. For
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_IO_FLOW,
},
- {
- .name = "skip_bad",
- .lname = "Skip operations against bad blocks",
- .type = FIO_OPT_BOOL,
- .off1 = offsetof(struct thread_options, skip_bad),
- .help = "Skip operations against known bad blocks.",
- .hide = 1,
- .def = "0",
- .category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_MTD,
- },
{
.name = "steadystate",
.lname = "Steady state threshold",
fio_fp64_t latency_percentile;
unsigned block_error_hist;
- unsigned int skip_bad;
unsigned int replay_align;
unsigned int replay_scale;
fio_fp64_t latency_percentile;
uint32_t block_error_hist;
- uint32_t skip_bad;
uint32_t replay_align;
uint32_t replay_scale;