[Drbd-dev] [RFC] block: Change the granularity of io ticks from ms to ns
Gulam Mohamed
gulam.mohamed at oracle.com
Tue Dec 6 19:15:36 CET 2022
Use ktime to change the granularity of IO accounting in block layer from
milli-seconds to nano-seconds to get the proper latency values for the
devices whose latency is in micro-seconds. After changing the granularity
to nano-seconds the iostat command, which was showing incorrect values for
%util, is now showing correct values.
We did not work on the patch to drop the logic for
STAT_PRECISE_TIMESTAMPS yet. Will do it if this patch is ok.
The iostat command was run after starting the fio with following command
on an NVME disk. For the same fio command, the iostat %util was showing
~100% for the disks whose latencies are in the range of microseconds.
With the kernel changes (granularity to nano-seconds), the %util was
showing correct values. Following are the details of the test and their
output:
fio command
-----------
[global]
bs=128K
iodepth=1
direct=1
ioengine=libaio
group_reporting
time_based
runtime=90
thinktime=1ms
numjobs=1
name=raw-write
rw=randrw
ignore_error=EIO:EIO
[job1]
filename=/dev/nvme0n1
Correct values after kernel changes:
====================================
iostat output
-------------
iostat -d /dev/nvme0n1 -x 1
Device r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
nvme0n1 0.08 0.05 0.06 128.00 128.00 0.07 6.50
Device r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
nvme0n1 0.08 0.06 0.06 128.00 128.00 0.07 6.30
Device r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
nvme0n1 0.06 0.05 0.06 128.00 128.00 0.06 5.70
More information about the drbd-dev
mailing list