Let fadvise_hint also apply too mmap engine and madvise
[fio.git] / HOWTO
diff --git a/HOWTO b/HOWTO
index e7142c57b03df0e6f500b35ad95cf712d4c20617..307b50d47c85762f07d82e2e8e332cf5c77f1fb6 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -173,7 +173,16 @@ Command line options
 .. option:: --eta=when
 
        Specifies when real-time ETA estimate should be printed.  `when` may be
-       `always`, `never` or `auto`.
+       `always`, `never` or `auto`. `auto` is the default, it prints ETA
+       when requested if the output is a TTY. `always` disregards the output
+       type, and prints ETA when requested. `never` never prints ETA.
+
+.. option:: --eta-interval=time
+
+       By default, fio requests client ETA status roughly every second. With
+       this option, the interval is configurable. Fio imposes a minimum
+       allowed time to avoid flooding the console, less than 250 msec is
+       not supported.
 
 .. option:: --eta-newline=time
 
@@ -1084,8 +1093,9 @@ I/O type
 
 .. option:: fadvise_hint=str
 
-       Use :manpage:`posix_fadvise(2)` to advise the kernel on what I/O patterns
-       are likely to be issued.  Accepted values are:
+       Use :manpage:`posix_fadvise(2)` or :manpage:`posix_fadvise(2)` to
+       advise the kernel on what I/O patterns are likely to be issued.
+       Accepted values are:
 
                **0**
                        Backwards-compatible hint for "no hint".
@@ -1254,6 +1264,9 @@ I/O type
                **zoned**
                                Zoned random distribution
 
+               **zoned_abs**
+                               Zone absolute random distribution
+
        When using a **zipf** or **pareto** distribution, an input value is also
        needed to define the access pattern. For **zipf**, this is the `Zipf
        theta`. For **pareto**, it's the `Pareto power`. Fio includes a test
@@ -1278,10 +1291,26 @@ I/O type
 
                random_distribution=zoned:60/10:30/20:8/30:2/40
 
-       similarly to how :option:`bssplit` works for setting ranges and percentages
-       of block sizes. Like :option:`bssplit`, it's possible to specify separate
-       zones for reads, writes, and trims. If just one set is given, it'll apply to
-       all of them.
+       A **zoned_abs** distribution works exactly like the **zoned**, except
+       that it takes absolute sizes. For example, let's say you wanted to
+       define access according to the following criteria:
+
+               * 60% of accesses should be to the first 20G
+               * 30% of accesses should be to the next 100G
+               * 10% of accesses should be to the next 500G
+
+       we can define an absolute zoning distribution with:
+
+               random_distribution=zoned_abs=60/20G:30/100G:10/500g
+
+       For both **zoned** and **zoned_abs**, fio supports defining up to
+       256 separate zones.
+
+       Similarly to how :option:`bssplit` works for setting ranges and
+       percentages of block sizes. Like :option:`bssplit`, it's possible to
+       specify separate zones for reads, writes, and trims. If just one set
+       is given, it'll apply to all of them. This goes for both **zoned**
+       **zoned_abs** distributions.
 
 .. option:: percentage_random=int[,int][,int]
 
@@ -1372,34 +1401,39 @@ Block size
 
 .. option:: bssplit=str[,str][,str]
 
-       Sometimes you want even finer grained control of the block sizes issued, not
-       just an even split between them.  This option allows you to weight various
-       block sizes, so that you are able to define a specific amount of block sizes
-       issued. The format for this option is::
+       Sometimes you want even finer grained control of the block sizes
+       issued, not just an even split between them.  This option allows you to
+       weight various block sizes, so that you are able to define a specific
+       amount of block sizes issued. The format for this option is::
 
                bssplit=blocksize/percentage:blocksize/percentage
 
-       for as many block sizes as needed. So if you want to define a workload that
-       has 50% 64k blocks, 10% 4k blocks, and 40% 32k blocks, you would write::
+       for as many block sizes as needed. So if you want to define a workload
+       that has 50% 64k blocks, 10% 4k blocks, and 40% 32k blocks, you would
+       write::
 
                bssplit=4k/10:64k/50:32k/40
 
-       Ordering does not matter. If the percentage is left blank, fio will fill in
-       the remaining values evenly. So a bssplit option like this one::
+       Ordering does not matter. If the percentage is left blank, fio will
+       fill in the remaining values evenly. So a bssplit option like this one::
 
                bssplit=4k/50:1k/:32k/
 
-       would have 50% 4k ios, and 25% 1k and 32k ios. The percentages always add up
-       to 100, if bssplit is given a range that adds up to more, it will error out.
+       would have 50% 4k ios, and 25% 1k and 32k ios. The percentages always
+       add up to 100, if bssplit is given a range that adds up to more, it
+       will error out.
 
        Comma-separated values may be specified for reads, writes, and trims as
        described in :option:`blocksize`.
 
-       If you want a workload that has 50% 2k reads and 50% 4k reads, while having
-       90% 4k writes and 10% 8k writes, you would specify::
+       If you want a workload that has 50% 2k reads and 50% 4k reads, while
+       having 90% 4k writes and 10% 8k writes, you would specify::
 
                bssplit=2k/50:4k/50,4k/90,8k/10
 
+       Fio supports defining up to 64 different weights for each data
+       direction.
+
 .. option:: blocksize_unaligned, bs_unaligned
 
        If set, fio will issue I/O units with any size within
@@ -1434,9 +1468,12 @@ Buffers and memory
 .. option:: refill_buffers
 
        If this option is given, fio will refill the I/O buffers on every
-       submit. The default is to only fill it at init time and reuse that
-       data. Only makes sense if zero_buffers isn't specified, naturally. If data
-       verification is enabled, `refill_buffers` is also automatically enabled.
+       submit. Only makes sense if :option:`zero_buffers` isn't specified,
+       naturally. Defaults to being unset i.e., the buffer is only filled at
+       init time and the data in it is reused when possible but if any of
+       :option:`verify`, :option:`buffer_compress_percentage` or
+       :option:`dedupe_percentage` are enabled then `refill_buffers` is also
+       automatically enabled.
 
 .. option:: scramble_buffers=bool
 
@@ -1448,22 +1485,30 @@ Buffers and memory
 
 .. option:: buffer_compress_percentage=int
 
-       If this is set, then fio will attempt to provide I/O buffer content (on
-       WRITEs) that compresses to the specified level. Fio does this by providing a
-       mix of random data and a fixed pattern. The fixed pattern is either zeros,
-       or the pattern specified by :option:`buffer_pattern`. If the pattern option
-       is used, it might skew the compression ratio slightly. Note that this is per
-       block size unit, for file/disk wide compression level that matches this
-       setting, you'll also want to set :option:`refill_buffers`.
+       If this is set, then fio will attempt to provide I/O buffer content
+       (on WRITEs) that compresses to the specified level. Fio does this by
+       providing a mix of random data followed by fixed pattern data. The
+       fixed pattern is either zeros, or the pattern specified by
+       :option:`buffer_pattern`. If the `buffer_pattern` option is used, it
+       might skew the compression ratio slightly. Setting
+       `buffer_compress_percentage` to a value other than 100 will also
+       enable :option:`refill_buffers` in order to reduce the likelihood that
+       adjacent blocks are so similar that they over compress when seen
+       together. See :option:`buffer_compress_chunk` for how to set a finer or
+       coarser granularity for the random/fixed data region. Defaults to unset
+       i.e., buffer data will not adhere to any compression level.
 
 .. option:: buffer_compress_chunk=int
 
-       See :option:`buffer_compress_percentage`. This setting allows fio to manage
-       how big the ranges of random data and zeroed data is. Without this set, fio
-       will provide :option:`buffer_compress_percentage` of blocksize random data,
-       followed by the remaining zeroed. With this set to some chunk size smaller
-       than the block size, fio can alternate random and zeroed data throughout the
-       I/O buffer.
+       This setting allows fio to manage how big the random/fixed data region
+       is when using :option:`buffer_compress_percentage`. When
+       `buffer_compress_chunk` is set to some non-zero value smaller than the
+       block size, fio can repeat the random/fixed region throughout the I/O
+       buffer at the specified interval (which particularly useful when
+       bigger block sizes are used for a job). When set to 0, fio will use a
+       chunk size that matches the block size resulting in a single
+       random/fixed region within the I/O buffer. Defaults to 512. When the
+       unit is omitted, the value is interpreted in bytes.
 
 .. option:: buffer_pattern=str
 
@@ -1500,7 +1545,9 @@ Buffers and memory
        writing. These buffers will be naturally dedupable. The contents of the
        buffers depend on what other buffer compression settings have been set. It's
        possible to have the individual buffers either fully compressible, or not at
-       all. This option only controls the distribution of unique buffers.
+       all -- this option only controls the distribution of unique buffers. Setting
+       this option will also enable :option:`refill_buffers` to prevent every buffer
+       being identical.
 
 .. option:: invalidate=bool
 
@@ -1738,7 +1785,8 @@ I/O engine
                **rdma**
                        The RDMA I/O engine supports both RDMA memory semantics
                        (RDMA_WRITE/RDMA_READ) and channel semantics (Send/Recv) for the
-                       InfiniBand, RoCE and iWARP protocols.
+                       InfiniBand, RoCE and iWARP protocols. This engine defines engine
+                       specific options.
 
                **falloc**
                        I/O engine that does regular fallocate to simulate data transfer as
@@ -1815,9 +1863,14 @@ I/O engine
                        details of writing an external I/O engine.
 
                **filecreate**
-                       Simply create the files and do no IO to them.  You still need to
+                       Simply create the files and do no I/O to them.  You still need to
                        set  `filesize` so that all the accounting still occurs, but no
-                       actual IO will be done other than creating the file.
+                       actual I/O will be done other than creating the file.
+
+               **libpmem**
+                       Read and write using mmap I/O to a file on a filesystem
+                       mounted with DAX on a persistent memory device through the NVML
+                       libpmem library.
 
 I/O engine specific parameters
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1875,10 +1928,15 @@ with the caveat that when used on the command line, they must come after the
                this will be the starting port number since fio will use a range of
                ports.
 
-.. option:: hostname=str : [netsplice] [net]
+   [rdma]
 
-       The hostname or IP address to use for TCP or UDP based I/O.  If the job is
-       a TCP listener or UDP reader, the hostname is not used and must be omitted
+               The port to use for RDMA-CM communication. This should be the same value
+               on the client and the server side.
+
+.. option:: hostname=str : [netsplice] [net] [rdma]
+
+       The hostname or IP address to use for TCP, UDP or RDMA-CM based I/O.  If the job
+       is a TCP listener or UDP reader, the hostname is not used and must be omitted
        unless it is a valid UDP multicast address.
 
 .. option:: interface=str : [netsplice] [net]
@@ -1984,6 +2042,21 @@ with the caveat that when used on the command line, they must come after the
 
        The size of the chunk to use for each file.
 
+.. option:: verb=str : [rdma]
+
+       The RDMA verb to use on this side of the RDMA ioengine connection. Valid
+       values are write, read, send and recv. These correspond to the equivalent
+       RDMA verbs (e.g. write = rdma_write etc.). Note that this only needs to be
+       specified on the client side of the connection. See the examples folder.
+
+.. option:: bindname=str : [rdma]
+
+       The name to use to bind the local RDMA-CM connection to a local RDMA device.
+       This could be a hostname or an IPv4 or IPv6 address. On the server side this
+       will be passed into the rdma_bind_addr() function and on the client site it
+       will be used in the rdma_resolve_add() function. This can be useful when
+       multiple paths exist between the client and the server or in certain loopback
+       configurations.
 
 I/O depth
 ~~~~~~~~~
@@ -2060,7 +2133,7 @@ I/O depth
        changing data and the overlapping region has a non-zero size. Setting
        ``serialize_overlap`` tells fio to avoid provoking this behavior by explicitly
        serializing in-flight I/Os that have a non-zero overlap. Note that setting
-       this option can reduce both performance and the `:option:iodepth` achieved.
+       this option can reduce both performance and the :option:`iodepth` achieved.
        Additionally this option does not work when :option:`io_submit_mode` is set to
        offload. Default: false.
 
@@ -2145,6 +2218,13 @@ I/O rate
        (https://en.wikipedia.org/wiki/Poisson_point_process). The lambda will be
        10^6 / IOPS for the given workload.
 
+.. option:: rate_ignore_thinktime=bool
+
+       By default, fio will attempt to catch up to the specified rate setting,
+       if any kind of thinktime setting was used. If this option is set, then
+       fio will ignore the thinktime and continue doing IO at the specified
+       rate, instead of entering a catch-up mode after thinktime is done.
+
 
 I/O latency
 ~~~~~~~~~~~
@@ -2722,47 +2802,46 @@ Measurements and reporting
 .. option:: write_bw_log=str
 
        If given, write a bandwidth log for this job. Can be used to store data of
-       the bandwidth of the jobs in their lifetime. The included
-       :command:`fio_generate_plots` script uses :command:`gnuplot` to turn these
-       text files into nice graphs. See :option:`write_lat_log` for behavior of
-       given filename. For this option, the postfix is :file:`_bw.x.log`, where `x`
-       is the index of the job (`1..N`, where `N` is the number of jobs). If
-       :option:`per_job_logs` is false, then the filename will not include the job
-       index.  See `Log File Formats`_.
+       the bandwidth of the jobs in their lifetime.
 
-.. option:: write_lat_log=str
+       If no str argument is given, the default filename of
+       :file:`jobname_type.x.log` is used. Even when the argument is given, fio
+       will still append the type of log. So if one specifies::
+
+               write_bw_log=foo
+
+       The actual log name will be :file:`foo_bw.x.log` where `x` is the index
+       of the job (`1..N`, where `N` is the number of jobs). If
+       :option:`per_job_logs` is false, then the filename will not include the
+       `.x` job index.
 
-       Same as :option:`write_bw_log`, except that this option stores I/O
-       submission, completion, and total latencies instead. If no filename is given
-       with this option, the default filename of :file:`jobname_type.log` is
-       used. Even if the filename is given, fio will still append the type of
-       log. So if one specifies::
+       The included :command:`fio_generate_plots` script uses :command:`gnuplot` to turn these
+       text files into nice graphs. See `Log File Formats`_ for how data is
+       structured within the file.
 
-               write_lat_log=foo
+.. option:: write_lat_log=str
 
-       The actual log names will be :file:`foo_slat.x.log`, :file:`foo_clat.x.log`,
-       and :file:`foo_lat.x.log`, where `x` is the index of the job (`1..N`, where `N`
-       is the number of jobs). This helps :command:`fio_generate_plots` find the
-       logs automatically. If :option:`per_job_logs` is false, then the filename
-       will not include the job index.  See `Log File Formats`_.
+       Same as :option:`write_bw_log`, except this option creates I/O
+       submission (e.g., :file:`name_slat.x.log`), completion (e.g.,
+       :file:`name_clat.x.log`), and total (e.g., :file:`name_lat.x.log`)
+       latency files instead. See :option:`write_bw_log` for details about
+       the filename format and `Log File Formats`_ for how data is structured
+       within the files.
 
 .. option:: write_hist_log=str
 
-       Same as :option:`write_lat_log`, but writes I/O completion latency
-       histograms. If no filename is given with this option, the default filename
-       of :file:`jobname_clat_hist.x.log` is used, where `x` is the index of the
-       job (`1..N`, where `N` is the number of jobs). Even if the filename is given,
-       fio will still append the type of log.  If :option:`per_job_logs` is false,
-       then the filename will not include the job index. See `Log File Formats`_.
+       Same as :option:`write_bw_log` but writes an I/O completion latency
+       histogram file (e.g., :file:`name_hist.x.log`) instead. Note that this
+       file will be empty unless :option:`log_hist_msec` has also been set.
+       See :option:`write_bw_log` for details about the filename format and
+       `Log File Formats`_ for how data is structured within the file.
 
 .. option:: write_iops_log=str
 
-       Same as :option:`write_bw_log`, but writes IOPS. If no filename is given
-       with this option, the default filename of :file:`jobname_type.x.log` is
-       used, where `x` is the index of the job (`1..N`, where `N` is the number of
-       jobs). Even if the filename is given, fio will still append the type of
-       log. If :option:`per_job_logs` is false, then the filename will not include
-       the job index. See `Log File Formats`_.
+       Same as :option:`write_bw_log`, but writes an IOPS file (e.g.
+       :file:`name_iops.x.log`) instead. See :option:`write_bw_log` for
+       details about the filename format and `Log File Formats`_ for how data
+       is structured within the file.
 
 .. option:: log_avg_msec=int
 
@@ -2780,15 +2859,16 @@ Measurements and reporting
        :option:`log_avg_msec` is inaccurate. Setting this option makes fio log
        histogram entries over the specified period of time, reducing log sizes for
        high IOPS devices while retaining percentile accuracy.  See
-       :option:`log_hist_coarseness` as well. Defaults to 0, meaning histogram
-       logging is disabled.
+       :option:`log_hist_coarseness` and :option:`write_hist_log` as well.
+       Defaults to 0, meaning histogram logging is disabled.
 
 .. option:: log_hist_coarseness=int
 
        Integer ranging from 0 to 6, defining the coarseness of the resolution of
        the histogram logs enabled with :option:`log_hist_msec`. For each increment
        in coarseness, fio outputs half as many bins. Defaults to 0, for which
-       histogram logs contain 1216 latency bins. See `Log File Formats`_.
+       histogram logs contain 1216 latency bins. See :option:`write_hist_log`
+       and `Log File Formats`_.
 
 .. option:: log_max_value=bool
 
@@ -2888,20 +2968,27 @@ Measurements and reporting
 
 .. option:: lat_percentiles=bool
 
-       Enable the reporting of percentiles of IO latencies. This is similar
+       Enable the reporting of percentiles of I/O latencies. This is similar
        to :option:`clat_percentiles`, except that this includes the
        submission latency. This option is mutually exclusive with
        :option:`clat_percentiles`.
 
 .. option:: percentile_list=float_list
 
-       Overwrite the default list of percentiles for completion latencies and the
-       block error histogram.  Each number is a floating number in the range
-       (0,100], and the maximum length of the list is 20. Use ``:`` to separate the
-       numbers, and list the numbers in ascending order. For example,
-       ``--percentile_list=99.5:99.9`` will cause fio to report the values of
-       completion latency below which 99.5% and 99.9% of the observed latencies
-       fell, respectively.
+       Overwrite the default list of percentiles for completion latencies and
+       the block error histogram.  Each number is a floating number in the
+       range (0,100], and the maximum length of the list is 20. Use ``:`` to
+       separate the numbers, and list the numbers in ascending order. For
+       example, ``--percentile_list=99.5:99.9`` will cause fio to report the
+       values of completion latency below which 99.5% and 99.9% of the observed
+       latencies fell, respectively.
+
+.. option:: significant_figures=int
+
+       If using :option:`--output-format` of `normal`, set the significant
+       figures to this value. Higher values will yield more precise IOPS and
+       throughput units, while lower values will round. Requires a minimum
+       value of 1 and a maximum value of 10. Defaults to 4.
 
 
 Error handling
@@ -3258,7 +3345,7 @@ writes in the example above).  In the order listed, they denote:
                short or dropped.
 
 **IO latency**
-               These values are for `--latency-target` and related options. When
+               These values are for :option:`latency_target` and related options. When
                these options are engaged, this section describes the I/O depth required
                to meet the specified latency target.