Unify the time handling
[fio.git] / HOWTO
diff --git a/HOWTO b/HOWTO
index 8211c3b48166cd6f03e4f32d9beddf57cf1e03e2..4dacd98965ea1d12ecb86d9d3998e57404edfd28 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -223,7 +223,8 @@ a string. The following types are used:
 str    String. This is a sequence of alpha characters.
 time   Integer with possible time suffix. In seconds unless otherwise
        specified, use eg 10m for 10 minutes. Accepts s/m/h for seconds,
-       minutes, and hours.
+       minutes, and hours, and accepts 'ms' (or 'msec') for milliseconds,
+       and 'us' (or 'usec') for microseconds.
 int    SI integer. A whole number value, which may contain a suffix
        describing the base of the number. Accepted suffixes are k/m/g/t/p,
        meaning kilo, mega, giga, tera, and peta. The suffix is not case
@@ -384,6 +385,11 @@ unified_rw_reporting=bool  Fio normally reports statistics on a per
 randrepeat=bool        For random IO workloads, seed the generator in a predictable
                way so that results are repeatable across repetitions.
 
+randseed=int   Seed the random number generators based on this seed value, to
+               be able to control what sequence of output is being generated.
+               If not set, the random sequence depends on the randrepeat
+               setting.
+
 use_os_rand=bool Fio can either use the random generator supplied by the OS
                to generator random offsets, or it can use it's own internal
                generator (based on Tausworthe). Default is to use the
@@ -443,9 +449,11 @@ bs=int             The block size used for the io units. Defaults to 4k. Values
                can be given for both read and writes. If a single int is
                given, it will apply to both. If a second int is specified
                after a comma, it will apply to writes only. In other words,
-               the format is either bs=read_and_write or bs=read,write.
-               bs=4k,8k will thus use 4k blocks for reads, and 8k blocks
-               for writes. If you only wish to set the write size, you
+               the format is either bs=read_and_write or bs=read,write,trim.
+               bs=4k,8k will thus use 4k blocks for reads, 8k blocks for
+               writes, and 8k for trims. You can terminate the list with
+               a trailing comma. bs=4k,8k, would use the default value for
+               trims.. If you only wish to set the write size, you
                can do so by passing an empty read size - bs=,8k will set
                8k for writes and leave the read default value.
 
@@ -503,6 +511,11 @@ 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.
 
+bs_is_seq_rand If this option is set, fio will use the normal read,write
+               blocksize settings as sequential,random instead. Any random
+               read or write will use the WRITE blocksize settings, and any
+               sequential read or write will use the READ blocksize setting.
+
 zero_buffers   If this option is given, fio will init the IO buffers to
                all zeroes. The default is to fill them with random data.
 
@@ -535,6 +548,11 @@ buffer_compress_chunk=int  See buffer_compress_percentage. This
                alternate random and zeroed data throughout the IO
                buffer.
 
+buffer_pattern=str     If set, fio will fill the io buffers with this pattern.
+               If not set, the contents of io buffers is defined by the other
+               options related to buffer contents. The setting can be any
+               pattern of bytes, and can be prefixed with 0x for hex values.
+
 nrfiles=int    Number of files to use for this job. Defaults to 1.
 
 openfiles=int  Number of files to keep open at the same time. Defaults to
@@ -568,6 +586,8 @@ ioengine=str        Defines how the job issues io to the file. The following
 
                        vsync   Basic readv(2) or writev(2) IO.
 
+                       psyncv  Basic preadv(2) or pwritev(2) IO.
+
                        libaio  Linux native asynchronous io. Note that Linux
                                may only support queued behaviour with
                                non-buffered IO (set direct=1 or buffered=0).
@@ -686,6 +706,11 @@ direct=bool        If value is true, use non-buffered io. This is usually
                O_DIRECT. Note that ZFS on Solaris doesn't support direct io.
                On Windows the synchronous ioengines don't support direct io.
 
+atomic=bool    If value is true, attempt to use atomic direct IO. Atomic
+               writes are guaranteed to be stable once acknowledged by
+               the operating system. Only Linux supports O_ATOMIC right
+               now.
+
 buffered=bool  If value is true, use buffered io. This is the opposite
                of the 'direct' option. Defaults to true.
 
@@ -700,6 +725,13 @@ offset_increment=int       If this is provided, then the real offset becomes
                which are intended to operate on a file in parallel in disjoint
                segments, with even spacing between the starting points.
 
+number_ios=int Fio will normally perform IOs until it has exhausted the size
+               of the region set by size=, or if it exhaust the allocated
+               time (or hits an error condition). With this setting, the
+               range/size can be set independently of the number of IOs to
+               perform. When fio reaches this number, it will exit normally
+               and report status.
+
 fsync=int      If writing to a file, issue a sync of the dirty data
                for every number of blocks given. For example, if you give
                32 as a parameter, fio will sync the file for every 32
@@ -771,12 +803,10 @@ percentage_random=int     For a random workload, set how big a percentage should
                is fully random. It can be set from anywhere from 0 to 100.
                Setting it to 0 would make the workload fully sequential. Any
                setting in between will result in a random mix of sequential
-               and random IO, at the given percentages.
+               and random IO, at the given percentages. It is possible to
+               set different values for reads, writes, and trim. To do so,
+               simply use a comma separated list. See blocksize.
        
-percentage_sequential=int      See percentage_random. It is guaranteed that
-               they add up to 100. The later setting has priority, each
-               will adjust the other.
-
 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
@@ -828,11 +858,15 @@ thinktime_spin=int
                to sleeping for the rest of the period specified by
                thinktime.
 
-thinktime_blocks
+thinktime_blocks=int
                Only valid if thinktime is set - control how many blocks
                to issue, before waiting 'thinktime' usecs. If not set,
                defaults to 1 which will make fio wait 'thinktime' usecs
-               after every block.
+               after every block. This effectively makes any queue depth
+               setting redundant, since no more than 1 IO will be queued
+               before we have to complete it and do our thinktime. In
+               other words, this setting effectively caps the queue depth
+               if the latter is larger.
 
 rate=int       Cap the bandwidth used by this job. The number is in bytes/sec,
                the normal suffix rules apply. You can use rate=500k to limit
@@ -852,11 +886,25 @@ rate_iops=int     Cap the bandwidth to this number of IOPS. Basically the same
                as rate, just specified independently of bandwidth. If the
                job is given a block size range instead of a fixed value,
                the smallest block size is used as the metric. The same format
-               as rate is used for read vs write seperation.
+               as rate is used for read vs write separation.
 
 rate_iops_min=int If fio doesn't meet this rate of IO, it will cause
                the job to exit. The same format as rate is used for read vs
-               write seperation.
+               write separation.
+
+latency_target=int     If set, fio will attempt to find the max performance
+               point that the given workload will run at while maintaining a
+               latency below this target. The values is given in microseconds.
+               See latency_window and latency_percentile
+
+latency_window=int     Used with latency_target to specify the sample window
+               that the job is run at varying queue depths to test the
+               performance. The value is given in microseconds.
+
+latency_percentile=float       The percentage of IOs that must fall within the
+               criteria specified by latency_target and latency_window. If not
+               set, this defaults to 100.0, meaning that all IOs must be equal
+               or below to the value set by latency_target.
 
 max_latency=int        If set, fio will exit the job if it exceeds this maximum
                latency. It will exit with an ETIME error.
@@ -1021,6 +1069,13 @@ loops=int        Run the specified number of iterations of this job. Used
                to repeat the same workload a given number of times. Defaults
                to 1.
 
+verify_only    Do not perform 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
+               workloads that write data, and does not support workloads
+               with the time_based option set.
+
 do_verify=bool Run the verify phase after a write phase. Only makes sense if
                verify is set. Defaults to 1.
 
@@ -1051,6 +1106,10 @@ verify=str       If writing to a file, fio can verify the file contents
                        crc7    Use a crc7 sum of the data area and store
                                it in the header of each block.
 
+                       xxhash  Use xxhash as the checksum function. Generally
+                               the fastest software checksum that fio
+                               supports.
+
                        sha512  Use sha512 as the checksum function.
 
                        sha256  Use sha256 as the checksum function.
@@ -1059,7 +1118,9 @@ verify=str        If writing to a file, fio can verify the file contents
 
                        meta    Write extra information about each io
                                (timestamp, block number etc.). The block
-                               number is verified. See also verify_pattern.
+                               number is verified. The io sequence number is
+                               verified for workloads that write data.
+                               See also verify_pattern.
 
                        null    Only pretend to verify. Useful for testing
                                internals with ioengine=null, not for much
@@ -1133,9 +1194,6 @@ verify_backlog=int        Fio will normally verify the written contents of a
                holding this meta data. If this option is enabled, fio
                will write only N blocks before verifying these blocks.
 
-               will verify the previously written blocks before continuing
-               to write new ones.
-
 verify_backlog_batch=int       Control how many blocks fio will verify
                if verify_backlog is set. If not set, will default to
                the value of verify_backlog (meaning the entire queue
@@ -1145,7 +1203,7 @@ verify_backlog_batch=int  Control how many blocks fio will verify
                blocks will be verified more than once.
 
 stonewall
-wait_for_previous Wait for preceeding jobs in the job file to exit, before
+wait_for_previous Wait for preceding jobs in the job file to exit, before
                starting this one. Can be used to insert serialization
                points in the job file. A stone wall also implies starting
                a new reporting group.
@@ -1201,7 +1259,7 @@ replay_no_stall=int When replaying I/O with read_iolog the default behavior
 replay_redirect=str While replaying I/O patterns using read_iolog the
                default behavior is to replay the IOPS onto the major/minor
                device that each IOP was recorded from.  This is sometimes
-               undesireable because on a different machine those major/minor
+               undesirable because on a different machine those major/minor
                numbers can map to a different device.  Changing hardware on
                the same system can also result in a different major/minor
                mapping.  Replay_redirect causes all IOPS to be replayed onto
@@ -1230,13 +1288,10 @@ write_lat_log=str Same as write_bw_log, except that this option stores io
 
                write_lat_log=foo
 
-               The actual log names will be foo_slat.log, foo_slat.log,
+               The actual log names will be foo_slat.log, foo_clat.log,
                and foo_lat.log. This helps fio_generate_plot fine the logs
                automatically.
 
-write_bw_log=str If given, write an IOPS log of the jobs in this job
-               file. See write_bw_log.
-
 write_iops_log=str Same as write_bw_log, but writes IOPS. If no filename is
                given with this option, the default filename of
                "jobname_type.log" is used. Even if the filename is given,
@@ -1255,10 +1310,12 @@ lockmem=int     Pin down the specified amount of memory with mlock(2). Can
                The amount specified is per worker.
 
 exec_prerun=str        Before running this job, issue the command specified
-               through system(3).
+               through system(3). Output is redirected in a file called
+               jobname.prerun.txt.
 
 exec_postrun=str After the job completes, issue the command specified
-                though system(3).
+                though system(3). Output is redirected in a file called
+                jobname.postrun.txt.
 
 ioscheduler=str        Attempt to switch the device hosting the file to the specified
                io scheduler before running.
@@ -1430,11 +1487,20 @@ that defines them is selected.
 [netsplice] hostname=str
 [net] hostname=str The host name or IP address to use for TCP or UDP based IO.
                If the job is a TCP listener or UDP reader, the hostname is not
-               used and must be omitted.
+               used and must be omitted unless it is a valid UDP multicast
+               address.
 
 [netsplice] port=int
 [net] port=int The TCP or UDP port to bind to or connect to.
 
+[netsplice] interface=str
+[net] interface=str  The IP address of the network interface used to send or
+               receive UDP multicast
+
+[netsplice] ttl=int
+[net] ttl=int  Time-to-live value for outgoing UDP multicast packets.
+               Default: 1
+
 [netsplice] nodelay=bool
 [net] nodelay=bool     Set TCP_NODELAY on TCP connections.
 
@@ -1444,7 +1510,9 @@ that defines them is selected.
 [net] proto=str        The network protocol to use. Accepted values are:
 
                        tcp     Transmission control protocol
+                       tcpv6   Transmission control protocol V6
                        udp     User datagram protocol
+                       udpv6   User datagram protocol V6
                        unix    UNIX domain socket
 
                When the protocol is TCP or UDP, the port must also be given,
@@ -1455,7 +1523,7 @@ that defines them is selected.
 [net] listen   For TCP network connections, tell fio to listen for incoming
                connections rather than initiating an outgoing connection. The
                hostname must be omitted if this option is used.
-[net] pingpong Normal a network writer will just continue writing data, and
+[net] pingpong Normaly a network writer will just continue writing data, and
                a network reader will just consume packages. 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. This
@@ -1463,6 +1531,9 @@ that defines them is selected.
                and completion latencies then measure local time spent
                sending or receiving, and the completion latency measures
                how long it took for the other end to receive and send back.
+               For UDP multicast traffic pingpong=1 should only be set for a
+               single reader when multiple readers are listening to the same
+               address.
 
 [e4defrag] donorname=str
                File will be used as a block donor(swap extents between files)
@@ -1658,9 +1729,9 @@ Split up, the format is as follows:
                          Read merges, write merges,
                          Read ticks, write ticks,
                          Time spent in queue, disk utilization percentage
-       Additional Info (dependant on continue_on_error, default off): total # errors, first error code
+       Additional Info (dependent on continue_on_error, default off): total # errors, first error code
 
-       Additional Info (dependant on description being set): Text description
+       Additional Info (dependent on description being set): Text description
 
 Completion latency percentiles can be a grouping of up to 20 sets, so
 for the terse output fio writes all of them. Each field will look like this: