[PATCH] Add in-progress io rate
[fio.git] / HOWTO
diff --git a/HOWTO b/HOWTO
index 227bc5133866e0e64bcf408e4ec5e01695e367d9..c17d29e5652a864de9d3ffbf0763f68be6e4a4c1 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -82,6 +82,18 @@ more than one job file on the command line, fio will serialize the running
 of those files. Internally that is the same as using the 'stonewall'
 parameter described the the parameter section.
 
+If the job file contains only one job, you may as well just give the
+parameters on the command line. The command line parameters are identical
+to the job parameters, with a few extra that control global parameters
+(see README). For example, for the job file parameter iodepth=2, the
+mirror command line option would be --iodepth 2 or --iodepth=2. You can
+also use the command line for giving more than one job entry. For each
+--name option that fio sees, it will start a new job with that name.
+Command line entries following a --name entry will apply to that job,
+until there are no more entries or a new --name entry is seen. This is
+similar to the job file options, where each option applies to the current
+job until a new [] job entry is seen.
+
 fio does not need to run as root, except if the files or devices specified
 in the job section requires that. Some other options may also be restricted,
 such as memory locking, io scheduler switching, and descreasing the nice value.
@@ -115,7 +127,11 @@ size=128m
 
 As you can see, the job file sections themselves are empty as all the
 described parameters are shared. As no filename= option is given, fio
-makes up a filename for each of the jobs as it sees fit.
+makes up a filename for each of the jobs as it sees fit. On the command
+line, this job would look as follows:
+
+$ fio --name=global --rw=randread --size=128m --name=job1 --name=job2
+
 
 Lets look at an example that have a number of processes writing randomly
 to files.
@@ -136,7 +152,11 @@ Here we have no global section, as we only have one job defined anyway.
 We want to use async io here, with a depth of 4 for each file. We also
 increased the buffer size used to 32KiB and define numjobs to 4 to
 fork 4 identical jobs. The result is 4 processes each randomly writing
-to their own 64MiB file.
+to their own 64MiB file. Instead of using the above job file, you could
+have given the parameters on the command line. For this case, you would
+specify:
+
+$ fio --name=random-writers --ioengine=libaio --iodepth=4 --rw=randwrite --bs=32k --direct=0 --size=64m --numjobs=4
 
 fio ships with a few example job files, you can also look there for
 inspiration.
@@ -166,7 +186,9 @@ parameters.
 
 name=str       ASCII name of the job. This may be used to override the
                name printed by fio for this job. Otherwise the job
-               name is used.
+               name is used. On the command line this parameter has the
+               special purpose of also signalling the start of a new
+               job.
 
 directory=str  Prefix filenames with this directory. Used to places files
                in a different location than "./".
@@ -198,10 +220,24 @@ size=siint        The total size of file io for this job. This may describe
 
 bs=siint       The block size used for the io units. Defaults to 4k.
 
+read_bs=siint
+write_bs=siint If the workload is a mixed read-write workload, you can use
+               these options to set seperate block sizes.
+
 bsrange=irange Instead of giving a single block size, specify a range
                and fio will mix the issued io block sizes. The issued
                io unit will always be a multiple of the minimum value
-               given.
+               given (also see bs_unaligned).
+
+read_bsrange=irange
+write_bsrange=irange
+               If the workload is a mixed read-write workload, you can use
+               one of these options to set separate block size ranges for
+               reads and writes.
+
+bs_unaligned   If this option is given, any byte size value within bsrange
+               may be used as a block range. This typically wont work with
+               direct IO, as that normally requires sector alignment.
 
 nrfiles=int    Number of files to use for this job. Defaults to 1.
 
@@ -262,6 +298,13 @@ rwmixwrite=int     How large a percentage of the mix should be writes. If both
                up to 100%, the latter of the two will be used to override
                the first.
 
+norandommap    Normally fio will cover every block of the file when doing
+               random IO. If this option is given, fio will just get a
+               new random offset without looking at past io history. This
+               means that some blocks may not be read or written, and that
+               some blocks may be read/written more than once. This option
+               is mutually exclusive with verify= for that reason.
+
 nice=int       Run the job with the given nice value. See man nice(2).
 
 prio=int       Set the io priority value of this job. Linux limits us to
@@ -411,7 +454,7 @@ cpuchunks=int       If the job is a CPU cycle eater, split the load into
 fio spits out a lot of output. While running, fio will display the
 status of the jobs created. An example of that would be:
 
-Threads running: 1: [_r] [24.79% done] [eta 00h:01m:31s]
+Threads running: 1: [_r] [24.79% done] [ 13509/  8334 kb/s] [eta 00h:01m:31s]
 
 The characters inside the square brackets denote the current status of
 each thread. The possible values (in typical life cycle order) are:
@@ -433,9 +476,9 @@ E           Thread exited, not reaped by main thread yet.
 _              Thread reaped.
 
 The other values are fairly self explanatory - number of threads
-currently running and doing io, and the estimated completion percentage
-and time for the running group. It's impossible to estimate runtime
-of the following groups (if any).
+currently running and doing io, rate of io since last check, and the estimated
+completion percentage and time for the running group. It's impossible to
+estimate runtime of the following groups (if any).
 
 When fio is done (or interrupted by ctrl-c), it will show the data for
 each thread, group of threads, and disks in that order. For each data