From a4d3b4dbf594be6223a21a47a7ce4c21c7dddaf0 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 10 Dec 2014 19:21:37 -0700 Subject: [PATCH] Update size/io_size descriptions Hopefully this is clearer. Also add an alias for io_limit to io_size, since that is probably more descriptive of what this option does. Signed-off-by: Jens Axboe --- HOWTO | 27 +++++++++++++++------------ fio.1 | 22 ++++++++++++---------- options.c | 5 +++-- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/HOWTO b/HOWTO index 57d3fb7f..8da5527a 100644 --- a/HOWTO +++ b/HOWTO @@ -462,23 +462,26 @@ fadvise_hint=bool By default, fio will use fadvise() to advise the kernel size=int The total size of file io for this job. Fio will run until this many bytes has been transferred, unless runtime is - limited by other options (such as 'runtime', for instance). - Unless specific nrfiles and filesize options are given, - fio will divide this size between the available files - specified by the job. If not set, fio will use the full - size of the given files or devices. If the files do not - exist, size must be given. It is also possible to give - size as a percentage between 1 and 100. If size=20% is - given, fio will use 20% of the full size of the given - files or devices. - + limited by other options (such as 'runtime', for instance, + or increased/decreased by 'io_size'). Unless specific nrfiles + and filesize options are given, fio will divide this size + between the available files specified by the job. If not set, + fio will use the full size of the given files or devices. + If the files do not exist, size must be given. It is also + possible to give size as a percentage between 1 and 100. If + size=20% is given, fio will use 20% of the full size of the + given files or devices. + +io_size=int io_limit=int Normally fio operates within the region set by 'size', which means that the 'size' option sets both the region and size of IO to be performed. Sometimes that is not what you want. With this option, it is possible to define just the amount of IO that fio should do. For instance, if 'size' is set to 20G and - 'io_limit' is set to 5G, fio will perform IO within the first - 20G but exit when 5G have been done. + 'io_size' is set to 5G, fio will perform IO within the first + 20G but exit when 5G have been done. The opposite is also + possible - if 'size' is set to 20G, and 'io_size' is set to + 40G, then fio will do 40G of IO within the 0..20G region. filesize=int Individual file sizes. May be a range, in which case fio will select sizes for files at random within the given range diff --git a/fio.1 b/fio.1 index 0e66206e..33b26cca 100644 --- a/fio.1 +++ b/fio.1 @@ -377,21 +377,23 @@ are likely to be issued. Default: true. .TP .BI size \fR=\fPint Total size of I/O for this job. \fBfio\fR will run until this many bytes have -been transferred, unless limited by other options (\fBruntime\fR, for instance). -Unless \fBnrfiles\fR and \fBfilesize\fR options are given, this amount will be -divided between the available files for the job. If not set, fio will use the -full size of the given files or devices. If the files do not exist, size -must be given. It is also possible to give size as a percentage between 1 and -100. If size=20% is given, fio will use 20% of the full size of the given -files or devices. -.TP -.BI io_limit \fR=\fPint +been transferred, unless limited by other options (\fBruntime\fR, for instance, +or increased/descreased by \fBio_size\fR). Unless \fBnrfiles\fR and +\fBfilesize\fR options are given, this amount will be divided between the +available files for the job. If not set, fio will use the full size of the +given files or devices. If the files do not exist, size must be given. It is +also possible to give size as a percentage between 1 and 100. If size=20% is +given, fio will use 20% of the full size of the given files or devices. +.TP +.BI io_size \fR=\fPint "\fR,\fB io_limit \fR=\fPint Normally fio operates within the region set by \fBsize\fR, which means that the \fBsize\fR option sets both the region and size of IO to be performed. Sometimes that is not what you want. With this option, it is possible to define just the amount of IO that fio should do. For instance, if \fBsize\fR is set to 20G and \fBio_limit\fR is set to 5G, fio will perform IO within -the first 20G but exit when 5G have been done. +the first 20G but exit when 5G have been done. The opposite is also +possible - if \fBsize\fR is set to 20G, and \fBio_size\fR is set to 40G, then +fio will do 40G of IO within the 0..20G region. .TP .BI fill_device \fR=\fPbool "\fR,\fB fill_fs" \fR=\fPbool Sets size to something really large and waits for ENOSPC (no space left on diff --git a/options.c b/options.c index afca7270..a01b2d9b 100644 --- a/options.c +++ b/options.c @@ -1641,8 +1641,9 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .group = FIO_OPT_G_INVALID, }, { - .name = "io_limit", - .lname = "IO Limit", + .name = "io_size", + .alias = "io_limit", + .lname = "IO Size", .type = FIO_OPT_STR_VAL, .off1 = td_var_offset(io_limit), .interval = 1024 * 1024, -- 2.25.1