Merge branch 'evelu-peak' of https://github.com/ErwanAliasr1/fio
[fio.git] / HOWTO
diff --git a/HOWTO b/HOWTO
index e6078c5f1e16e1143d4057b9a1e03bad21954d1f..297a04851a2bbb747d9c3b8e6df0143be45203a2 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -544,6 +544,9 @@ Parameter types
                * *Ti* -- means tebi (Ti) or 1024**4
                * *Pi* -- means pebi (Pi) or 1024**5
 
+       For Zone Block Device Mode:
+               * *z*  -- means Zone
+
        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
        compatibility with old scripts.  For example, 4k means 4096.
@@ -989,6 +992,9 @@ Target file/device
                                single zone. The :option:`zoneskip` parameter
                                is ignored. :option:`zonerange` and
                                :option:`zonesize` must be identical.
+                               Trim is handled using a zone reset operation.
+                               Trim only considers non-empty sequential write
+                               required and sequential write preferred zones.
 
 .. option:: zonerange=int
 
@@ -1052,6 +1058,11 @@ Target file/device
        number of open zones is defined as the number of zones to which write
        commands are issued.
 
+.. option:: job_max_open_zones=int
+
+       Limit on the number of simultaneously opened zones per single
+       thread/process.
+
 .. option:: zone_reset_threshold=float
 
        A number between zero and one that indicates the ratio of logical
@@ -1168,7 +1179,7 @@ I/O type
 
                **1**
                        Backward-compatible alias for **mixed**.
-               
+
                **2**
                        Alias for **both**.
 
@@ -1277,13 +1288,14 @@ I/O type
 .. option:: offset=int
 
        Start I/O at the provided offset in the file, given as either a fixed size in
-       bytes or a percentage. If a percentage is given, the generated offset will be
+       bytes, zones or a percentage. If a percentage is given, the generated offset will be
        aligned to the minimum ``blocksize`` or to the value of ``offset_align`` if
        provided. Data before the given offset will not be touched. This
        effectively caps the file size at `real_size - offset`. Can be combined with
        :option:`size` to constrain the start and end range of the I/O workload.
        A percentage can be specified by a number between 1 and 100 followed by '%',
-       for example, ``offset=20%`` to specify 20%.
+       for example, ``offset=20%`` to specify 20%. In ZBD mode, value can be set as 
+        number of zones using 'z'.
 
 .. option:: offset_align=int
 
@@ -1300,7 +1312,8 @@ I/O type
        intended to operate on a file in parallel disjoint segments, with even
        spacing between the starting points. Percentages can be used for this option.
        If a percentage is given, the generated offset will be aligned to the minimum
-       ``blocksize`` or to the value of ``offset_align`` if provided.
+       ``blocksize`` or to the value of ``offset_align`` if provided. In ZBD mode, value can
+        also be set as number of zones using 'z'.
 
 .. option:: number_ios=int
 
@@ -1700,6 +1713,36 @@ Buffers and memory
        this option will also enable :option:`refill_buffers` to prevent every buffer
        being identical.
 
+.. option:: dedupe_mode=str
+
+       If ``dedupe_percentage=<int>`` is given, then this option controls how fio
+       generates the dedupe buffers.
+
+               **repeat**
+                       Generate dedupe buffers by repeating previous writes
+               **working_set**
+                       Generate dedupe buffers from working set
+
+       ``repeat`` is the default option for fio. Dedupe buffers are generated
+       by repeating previous unique write.
+
+       ``working_set`` is a more realistic workload.
+       With ``working_set``, ``dedupe_working_set_percentage=<int>`` should be provided.
+       Given that, fio will use the initial unique write buffers as its working set.
+       Upon deciding to dedupe, fio will randomly choose a buffer from the working set.
+       Note that by using ``working_set`` the dedupe percentage will converge
+       to the desired over time while ``repeat`` maintains the desired percentage
+       throughout the job.
+
+.. option:: dedupe_working_set_percentage=int
+
+       If ``dedupe_mode=<str>`` is set to ``working_set``, then this controls
+       the percentage of size of the file or device used as the buffers
+       fio will choose to generate the dedupe buffers from
+
+       Note that size needs to be explicitly provided and only 1 file per
+       job is supported
+
 .. option:: invalidate=bool
 
        Invalidate the buffer/page cache parts of the files to be used prior to
@@ -1818,7 +1861,8 @@ I/O size
        If this option is not specified, 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.
+       given, fio will use 20% of the full size of the given files or devices. 
+       In ZBD mode, value can also be set as number of zones using 'z'.
        Can be combined with :option:`offset` to constrain the start and end range
        that I/O will be done within.
 
@@ -1852,7 +1896,8 @@ I/O size
 .. option:: fill_device=bool, fill_fs=bool
 
        Sets size to something really large and waits for ENOSPC (no space left on
-       device) as the terminating condition. Only makes sense with sequential
+       device) or EDQUOT (disk quota exceeded)
+       as the terminating condition. Only makes sense with sequential
        write. For a read workload, the mount point will be filled first then I/O
        started on the result. This option doesn't make sense if operating on a raw
        device node, since the size of that is already known by the file system.
@@ -1923,6 +1968,11 @@ I/O engine
                        character devices. This engine supports trim operations.
                        The sg engine includes engine specific options.
 
+               **libzbc**
+                       Read, write, trim and ZBC/ZAC operations to a zoned
+                       block device using libzbc library. The target can be
+                       either an SG character device or a block device file.
+
                **null**
                        Doesn't transfer any data, just pretends to.  This is mainly used to
                        exercise fio itself and for debugging/testing purposes.
@@ -2096,6 +2146,15 @@ I/O engine
                        I/O engine supporting asynchronous read and write operations to the
                        DAOS File System (DFS) via libdfs.
 
+               **nfs**
+                       I/O engine supporting asynchronous read and write operations to
+                       NFS filesystems from userspace via libnfs. This is useful for
+                       achieving higher concurrency and thus throughput than is possible
+                       via kernel NFS.
+
+               **exec**
+                       Execute 3rd party tools. Could be used to perform monitoring during jobs runtime.
+
 I/O engine specific parameters
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -2104,14 +2163,49 @@ In addition, there are some parameters which are only valid when a specific
 with the caveat that when used on the command line, they must come after the
 :option:`ioengine` that defines them is selected.
 
-.. option:: cmdprio_percentage=int : [io_uring] [libaio]
-
-    Set the percentage of I/O that will be issued with higher priority by setting
-    the priority bit. Non-read I/O is likely unaffected by ``cmdprio_percentage``.
-    This option cannot be used with the `prio` or `prioclass` options. For this
-    option to set the priority bit properly, NCQ priority must be supported and
-    enabled and :option:`direct`\=1 option must be used. fio must also be run as
-    the root user.
+.. option:: cmdprio_percentage=int[,int] : [io_uring] [libaio]
+
+    Set the percentage of I/O that will be issued with the highest priority.
+    Default: 0. A single value applies to reads and writes. Comma-separated
+    values may be specified for reads and writes. This option cannot be used
+    with the :option:`prio` or :option:`prioclass` options. For this option
+    to be effective, NCQ priority must be supported and enabled, and `direct=1'
+    option must be used. fio must also be run as the root user.
+
+.. option:: cmdprio_class=int[,int] : [io_uring] [libaio]
+
+       Set the I/O priority class to use for I/Os that must be issued with
+       a priority when :option:`cmdprio_percentage` or
+       :option:`cmdprio_bssplit` is set. If not specified when
+       :option:`cmdprio_percentage` or :option:`cmdprio_bssplit` is set,
+       this defaults to the highest priority class. A single value applies
+       to reads and writes. Comma-separated values may be specified for
+       reads and writes. See :manpage:`ionice(1)`. See also the
+       :option:`prioclass` option.
+
+.. option:: cmdprio=int[,int] : [io_uring] [libaio]
+
+       Set the I/O priority value to use for I/Os that must be issued with
+       a priority when :option:`cmdprio_percentage` or
+       :option:`cmdprio_bssplit` is set. If not specified when
+       :option:`cmdprio_percentage` or :option:`cmdprio_bssplit` is set,
+       this defaults to 0.
+       Linux limits us to a positive value between 0 and 7, with 0 being the
+       highest. A single value applies to reads and writes. Comma-separated
+       values may be specified for reads and writes. See :manpage:`ionice(1)`.
+       Refer to an appropriate manpage for other operating systems since
+       meaning of priority may differ. See also the :option:`prio` option.
+
+.. option:: cmdprio_bssplit=str[,str] : [io_uring] [libaio]
+       To get a finer control over I/O priority, this option allows
+       specifying the percentage of IOs that must have a priority set
+       depending on the block size of the IO. This option is useful only
+       when used together with the :option:`bssplit` option, that is,
+       multiple different block sizes are used for reads and writes.
+       The format for this option is the same as the format of the
+       :option:`bssplit` option, with the exception that values for
+       trim IOs are ignored. This option is mutually exclusive with the
+       :option:`cmdprio_percentage` option.
 
 .. option:: fixedbufs : [io_uring]
 
@@ -2237,6 +2331,11 @@ with the caveat that when used on the command line, they must come after the
        Set to 1 only when Direct Write to PMem from the remote host is possible.
        Otherwise, set to 0.
 
+.. option:: busy_wait_polling=bool : [librpma_*_server]
+
+       Set to 0 to wait for completion instead of busy-wait polling completion.
+       Default: 1.
+
 .. option:: interface=str : [netsplice] [net]
 
        The IP address of the network interface used to send or receive UDP
@@ -2497,11 +2596,11 @@ with the caveat that when used on the command line, they must come after the
 
 .. option:: pool=str : [dfs]
 
-       Specify the UUID of the DAOS pool to connect to.
+       Specify the label or UUID of the DAOS pool to connect to.
 
 .. option:: cont=str : [dfs]
 
-       Specify the UUID of the DAOS container to open.
+       Specify the label or UUID of the DAOS container to open.
 
 .. option:: chunk_size=int : [dfs]
 
@@ -2513,6 +2612,33 @@ with the caveat that when used on the command line, they must come after the
        Specificy a different object class for the dfs file.
        Use DAOS container's object class by default.
 
+.. option:: nfs_url=str : [nfs]
+
+       URL in libnfs format, eg nfs://<server|ipv4|ipv6>/path[?arg=val[&arg=val]*]
+       Refer to the libnfs README for more details.
+
+.. option:: program=str : [exec]
+
+       Specify the program to execute.
+
+.. option:: arguments=str : [exec]
+
+       Specify arguments to pass to program.
+       Some special variables can be expanded to pass fio's job details to the program.
+
+       **%r**
+               Replaced by the duration of the job in seconds.
+       **%n**
+               Replaced by the name of the job.
+
+.. option:: grace_time=int : [exec]
+
+       Specify the time between the SIGTERM and SIGKILL signals. Default is 1 second.
+
+.. option:: std_redirect=bool : [exec]
+
+       If set, stdout and stderr streams are redirected to files named from the job name. Default is true.
+
 I/O depth
 ~~~~~~~~~
 
@@ -2619,7 +2745,7 @@ I/O rate
        Stall the job for the specified period of time after an I/O has completed before issuing the
        next. May be used to simulate processing being done by an application.
        When the unit is omitted, the value is interpreted in microseconds.  See
-       :option:`thinktime_blocks` and :option:`thinktime_spin`.
+       :option:`thinktime_blocks`, :option:`thinktime_iotime` and :option:`thinktime_spin`.
 
 .. option:: thinktime_spin=time
 
@@ -2644,6 +2770,18 @@ I/O rate
        :option:`thinktime_blocks` blocks. If this is set to `issue`, then the trigger happens
        at the issue side.
 
+.. option:: thinktime_iotime=time
+
+       Only valid if :option:`thinktime` is set - control :option:`thinktime`
+       interval by time. The :option:`thinktime` stall is repeated after IOs
+       are executed for :option:`thinktime_iotime`. For example,
+       ``--thinktime_iotime=9s --thinktime=1s`` repeat 10-second cycle with IOs
+       for 9 seconds and stall for 1 second. When the unit is omitted,
+       :option:`thinktime_iotime` is interpreted as a number of seconds. If
+       this option is used together with :option:`thinktime_blocks`, the
+       :option:`thinktime` stall is repeated after :option:`thinktime_iotime`
+       or after :option:`thinktime_blocks` IOs, whichever happens first.
+
 .. option:: rate=int[,int][,int]
 
        Cap the bandwidth used by this job. The number is in bytes/sec, the normal
@@ -2883,14 +3021,14 @@ Threads, processes and job synchronization
        between 0 and 7, with 0 being the highest.  See man
        :manpage:`ionice(1)`. Refer to an appropriate manpage for other operating
        systems since meaning of priority may differ. For per-command priority
-       setting, see I/O engine specific `cmdprio_percentage` and `hipri_percentage`
-       options.
+       setting, see I/O engine specific :option:`cmdprio_percentage` and
+       :option:`cmdprio` options.
 
 .. option:: prioclass=int
 
        Set the I/O priority class. See man :manpage:`ionice(1)`. For per-command
-       priority setting, see I/O engine specific `cmdprio_percentage` and
-       `hipri_percentage` options.
+       priority setting, see I/O engine specific :option:`cmdprio_percentage`
+       and :option:`cmdprio_class` options.
 
 .. option:: cpus_allowed=str