Reduce LOG_MSEC_SLACK
authorJeff Furlong <jeff.furlong@wdc.com>
Wed, 7 Mar 2018 00:53:20 +0000 (17:53 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Mar 2018 00:53:20 +0000 (17:53 -0700)
Starting in fio 2.99, there is an odd problem when --ramp_time is used
with --write_iops_log.  The reported IOPs for the first ~200s or so are
artificially inflated by fio, always monotonically increasing until
about 200s, then resets to normal.  With fio 2.99, disabling --ramp_time
avoids the issue.  And, with fio 2.21, using --ramp_time and
--write_iops_log does not create the problem.  Consider a job:

fio --name=test --ioengine=libaio --direct=1 --rw=randread --iodepth=1 \\
--size=100% --bs=4k --filename=/dev/nvme1n1 --runtime=300s \\
--ramp_time=10s --write_iops_log=test --log_avg_msec=1000

See the attached plot for fio induced IOPs during the first ~200s.
Using a longer runtime makes identifying the issue easier if the DUT is
consistently performing.

One simple method to resolve this inflation is by reducing the
LOG_MSEC_SLACK from 10 milliseconds to 1 millisecond, given that we now
operate some time structures to the nanosecond level (so 10ms of slack
seems excessive).  Below I also fixup some data type issues to match
existing types (avoids typecasts or potential compiler warnings).

Signed-off-by: Jens Axboe <axboe@kernel.dk>

No differences found