nvme硬盘性能测试方法

1,查看nvme盘

[root@42 ~]# nvme list
Node                  SN                   Model                                    Namespace Usage                      Format           FW Rev  
--------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1          S63WNE0R100530       SAMSUNG MZQL2960HCJR-00B7C               1          32.67  GB / 960.20  GB    512   B +  0 B   GDA53C2Q
/dev/nvme1n1          S63WNE0R100492       SAMSUNG MZQL2960HCJR-00B7C               1          20.16  GB / 960.20  GB    512   B +  0 B   GDA53C2Q
/dev/nvme2n1          SH205007827          P5510CH0192T00                           1           1.92  TB /   1.92  TB    512   B +  0 B   224005A0

2,dd 测试裸盘 

bs = 4KB 速度提升明显,达 2.7 GB/s

[root@42 ~]# dd if=/dev/zero of=/dev/nvme0n1 bs=512 count=1000000
1000000+0 records in
1000000+0 records out
512000000 bytes (512 MB, 488 MiB) copied, 1.99117 s, 257 MB/s
[root@42 ~]# dd if=/dev/zero of=/dev/nvme0n1 bs=1024 count=1000000
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB, 977 MiB) copied, 3.48962 s, 293 MB/s
[root@42 ~]# dd if=/dev/zero of=/dev/nvme0n1 bs=2048 count=1000000
1000000+0 records in
1000000+0 records out
2048000000 bytes (2.0 GB, 1.9 GiB) copied, 6.51846 s, 314 MB/s
[root@42 ~]# dd if=/dev/zero of=/dev/nvme0n1 bs=4096 count=1000000
1000000+0 records in
1000000+0 records out
4096000000 bytes (4.1 GB, 3.8 GiB) copied, 1.51598 s, 2.7 GB/s
[root@42 ~]# dd if=/dev/zero of=/dev/nvme0n1 bs=8192 count=1000000
1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB, 7.6 GiB) copied, 2.69523 s, 3.0 GB/s

3,fio 性能测试

对于nvme盘,4KB block的性能比512 block的性能好很多

[root@42 ~]# fio -ioengine=libaio -bs=4k -direct=1 -thread -rw=write -filename=/dev/nvme0n1 -name="BS 4KB read test" -iodepth=128 -runtime=30
BS 4KB read test: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=128
fio-3.19
Starting 1 thread
Jobs: 1 (f=1): [W(1)][100.0%][w=1441MiB/s][w=369k IOPS][eta 00m:00s]
BS 4KB read test: (groupid=0, jobs=1): err= 0: pid=60840: Fri Dec 24 01:09:51 2021
  write: IOPS=369k, BW=1441MiB/s (1511MB/s)(42.2GiB/30001msec); 0 zone resets

[root@42 ~]# fio -ioengine=libaio -bs=512 -direct=1 -thread -rw=write -filename=/dev/nvme0n1 -name="BS 4KB read test" -iodepth=128 -runtime=30
BS 4KB read test: (g=0): rw=write, bs=(R) 512B-512B, (W) 512B-512B, (T) 512B-512B, ioengine=libaio, iodepth=128
fio-3.19
Starting 1 thread
Jobs: 1 (f=1): [W(1)][100.0%][w=192MiB/s][w=392k IOPS][eta 00m:00s]
BS 4KB read test: (groupid=0, jobs=1): err= 0: pid=60689: Fri Dec 24 01:05:34 2021
  write: IOPS=392k, BW=191MiB/s (201MB/s)(5740MiB/30001msec); 0 zone resets

[root@42 ~]# fdisk -l
Disk /dev/nvme0n1: 894.3 GiB, 960197124096 bytes, 1875385008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 131072 bytes / 131072 bytes


Disk /dev/nvme2n1: 1.8 TiB, 1920383410176 bytes, 3750748848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme1n1: 894.3 GiB, 960197124096 bytes, 1875385008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 131072 bytes / 131072 bytes
 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值