koct9i / ioping

simple disk I/0 latency measuring tool
GNU General Public License v3.0
947 stars 76 forks source link

Works not correctly with M.2 NVMe #48

Closed somera closed 2 years ago

somera commented 3 years ago

I get strange results on my NVMe. I'm testing it on Ubuntu 20.04.3 with ioping 1.1.

SATA III SSD:

$ ioping .
4 KiB <<< . (ext4 /dev/sda1): request=1 time=201.2 us (warmup)
4 KiB <<< . (ext4 /dev/sda1): request=2 time=3.33 ms
4 KiB <<< . (ext4 /dev/sda1): request=3 time=3.02 ms
4 KiB <<< . (ext4 /dev/sda1): request=4 time=3.33 ms
4 KiB <<< . (ext4 /dev/sda1): request=5 time=3.20 ms
4 KiB <<< . (ext4 /dev/sda1): request=6 time=3.20 ms
4 KiB <<< . (ext4 /dev/sda1): request=7 time=3.17 ms
4 KiB <<< . (ext4 /dev/sda1): request=8 time=3.31 ms
4 KiB <<< . (ext4 /dev/sda1): request=9 time=3.05 ms
4 KiB <<< . (ext4 /dev/sda1): request=10 time=3.19 ms
4 KiB <<< . (ext4 /dev/sda1): request=11 time=2.98 ms (fast)
4 KiB <<< . (ext4 /dev/sda1): request=12 time=1.53 ms (fast)
4 KiB <<< . (ext4 /dev/sda1): request=13 time=3.09 ms
4 KiB <<< . (ext4 /dev/sda1): request=14 time=3.07 ms
4 KiB <<< . (ext4 /dev/sda1): request=15 time=3.17 ms
4 KiB <<< . (ext4 /dev/sda1): request=16 time=3.06 ms
4 KiB <<< . (ext4 /dev/sda1): request=17 time=3.16 ms
4 KiB <<< . (ext4 /dev/sda1): request=18 time=3.18 ms
4 KiB <<< . (ext4 /dev/sda1): request=19 time=3.17 ms
4 KiB <<< . (ext4 /dev/sda1): request=20 time=3.18 ms
4 KiB <<< . (ext4 /dev/sda1): request=21 time=3.18 ms
4 KiB <<< . (ext4 /dev/sda1): request=22 time=3.08 ms
4 KiB <<< . (ext4 /dev/sda1): request=23 time=3.19 ms
4 KiB <<< . (ext4 /dev/sda1): request=24 time=3.20 ms
4 KiB <<< . (ext4 /dev/sda1): request=25 time=3.14 ms
4 KiB <<< . (ext4 /dev/sda1): request=26 time=3.09 ms
4 KiB <<< . (ext4 /dev/sda1): request=27 time=3.18 ms
^C
--- . (ext4 /dev/sda1) ioping statistics ---
26 requests completed in 80.5 ms, 104 KiB read, 323 iops, 1.26 MiB/s
generated 27 requests in 26.3 s, 108 KiB, 1 iops, 4.11 KiB/s
min/avg/max/mdev = 1.53 ms / 3.09 ms / 3.33 ms / 324.0 us

M.2 NVMe:

$ ioping .
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=1 time=143.1 us (warmup)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=2 time=94.1 us
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=3 time=14.1 ms
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=4 time=14.1 ms
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=5 time=124.6 us
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=6 time=14.2 ms
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=7 time=14.1 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=8 time=174.7 us (fast)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=9 time=14.1 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=10 time=14.2 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=11 time=14.2 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=12 time=14.3 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=13 time=14.2 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=14 time=167.6 us (fast)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=15 time=14.0 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=16 time=14.3 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=17 time=183.9 us (fast)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=18 time=14.1 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=19 time=14.1 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=20 time=149.9 us (fast)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=21 time=14.2 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=22 time=14.2 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=23 time=14.2 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=24 time=14.2 ms (slow)
4 KiB <<< . (ext4 /dev/nvme0n1p2): request=25 time=14.1 ms (slow)
^C
--- . (ext4 /dev/nvme0n1p2) ioping statistics ---
24 requests completed in 255.6 ms, 96 KiB read, 93 iops, 375.6 KiB/s
generated 25 requests in 24.6 s, 100 KiB, 1 iops, 4.07 KiB/s
min/avg/max/mdev = 94.1 us / 10.7 ms / 14.3 ms / 6.06 ms

With ioping 1.2.16.gf549dff I get same results.

koct9i commented 3 years ago

Most likely this caused by power-saving features. Try with option -burst 3 I've just pushed.