Sample Header Ad - 728x90

Why Disk stats show many read operations when I measure NVME squance write with fio and mmap as ioengine

0 votes
1 answer
209 views
Here is my fio configure and report:
# cat fio-write.fio 
[global]
name=fio-seq-writes
filename=test
rw=write
bs=1M
direct=0
numjobs=1
[file1]
size=1G
ioengine=mmap
iodepth=1

# fio --version
fio-3.30
# fio fio-write.fio 
file1: (g=0): rw=write, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=mmap, iodepth=1
fio-3.30
Starting 1 process
Jobs: 1 (f=1): [W(1)][-.-%][w=373MiB/s][w=373 IOPS][eta 00m:00s]
file1: (groupid=0, jobs=1): err= 0: pid=421: Sun Nov 14 21:12:09 2021
  write: IOPS=330, BW=330MiB/s (346MB/s)(1024MiB/3102msec); 0 zone resets
    clat (usec): min=2118, max=11668, avg=2598.40, stdev=1333.02
     lat (usec): min=2171, max=11754, avg=2673.15, stdev=1339.15
    clat percentiles (usec):
     |  1.00th=[ 2114],  5.00th=[ 2147], 10.00th=[ 2147], 20.00th=[ 2147],
     | 30.00th=[ 2147], 40.00th=[ 2180], 50.00th=[ 2212], 60.00th=[ 2343],
     | 70.00th=[ 2409], 80.00th=[ 2474], 90.00th=[ 2606], 95.00th=[ 4621],
     | 99.00th=[ 9241], 99.50th=, 99.90th=, 99.95th=,
     | 99.99th=
   bw (  KiB/s): min=122880, max=385024, per=99.76%, avg=337237.33, stdev=105105.84, samples=6
   iops        : min=  120, max=  376, avg=329.33, stdev=102.64, samples=6
  lat (msec)   : 4=94.14%, 10=4.98%, 20=0.88%
  cpu          : usr=28.25%, sys=61.08%, ctx=253, majf=262144, minf=11
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=0,1024,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: bw=330MiB/s (346MB/s), 330MiB/s-330MiB/s (346MB/s-346MB/s), io=1024MiB (1074MB), run=3102-3102msec

Disk stats (read/write):
  nvme0n1: ios=1908/757, merge=0/0, ticks=1255/3876, in_queue=5130, util=84.41%
As you can see, the Disk stats say there are 1908 read and 757 write(ios is _Number of I/Os performed by all groups_), this testcase is **sequence writing only**(configured via *rw=write*), why does it show my NVME issues 1908 readings? I also tried * sequence read(read only)
Disk stats (read/write):
  nvme0n1: ios=2026/0, merge=0/0, ticks=630/0, in_queue=631, util=69.47%
* random read(255234 read, 991 write)
Disk stats (read/write):
  nvme0n1: ios=255234/991, merge=0/6, ticks=3936/1739, in_queue=5674, util=95.55%
* random read(259349 read, 2 write)
Disk stats (read/write):
  nvme0n1: ios=259349/2, merge=0/0, ticks=3453/0, in_queue=3454, util=93.49%
I also tried other ioengines like libaio, io_uring and psync(fio's default ioengine), their seq|non-seq read only issue read operations and seq|non-seq write only issue write operations, which is as expected, so only mmap behavior weirdly.
Asked by Li Chen (397 rep)
Jun 5, 2022, 03:28 PM
Last activity: Aug 11, 2022, 09:21 AM