
硬盘性能测试步骤
1.服务器配置
CPU: 2 x Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz
内存: 2 x 16G
2.性能对比测试中的相同条件
2.1 测试数据块大小为4K 8K 16K
2.2 4K读取和写入数据分别为4GB,8K读取和写入数据分别为8GB,16K读取和写入数据分别为16GB
2.3 读数据和写数据全部绕过操作系统的缓存,直接读取和写入数据到SSD中,读数据测试设置dd参数iflag=direct绕过系统缓存,写数据测试设置dd参数oflag=direct绕过系统缓存
1.4 读数据和写数据全部将数据强制写入磁盘,设置dd参数conv=fsync
1.5 硬盘容量:DERA 6.4TB ScaleFlux 6.4TB的容量相同,(LONGSYS 7.68TB 容量不同)
1.6 SSD全部为裸设备,未格式化文件系统
1.7写入数据流全部用随机的字节流
/dev/urandom,不使用连续的零字节/dev/zero
2.dd工具对比测试结果
2.1.读数据对比
# 使用命令 dd if=/dev/nvme1n1 of=/dev/null bs=4k count=1000000 iflag=direct2.2.写数据对比
# 使用命令 dd if=/dev/urandom of=/dev/nvme1n1 bs=4k count=1000000 conv=fsync oflag=directdone
3.fio工具对比测试结果
3.1.读数据对比
# 使用命令 fio -filename=/dev/nvme1n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=4G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme1n1_randw3.2.写数据对比
# 使用命令 fio -filename=/dev/nvme1n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=4G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme1n1_randwdone
4.SSD读写测试命令执行结果
4.1 块设备读测试
1.使用dd工具
对磁盘进行连续读取,每次读取4k、8k、16k的数据,执行读取100万次
nvme1n1(ScaleFlux 6.4TB)
[root@h3c ~]# dd if=/dev/nvme1n1 of=/dev/null bs=4k count=1000000 iflag=direct [root@h3c ~]# dd if=/dev/nvme1n1 of=/dev/null bs=8k count=1000000 iflag=direct [root@h3c ~]# dd if=/dev/nvme1n1 of=/dev/null bs=16k count=1000000 iflag=directnvme2n1(LONGSYS 7.68TB)
[root@h3c ~]# dd if=/dev/nvme2n1 of=/dev/null bs=4k count=1000000 iflag=direct [root@h3c ~]# dd if=/dev/nvme2n1 of=/dev/null bs=8k count=1000000 iflag=direct [root@h3c ~]# dd if=/dev/nvme2n1 of=/dev/null bs=16k count=1000000 iflag=directnvme3n1(DERA 6.4TB)
[root@h3c ~]# dd if=/dev/nvme3n1 of=/dev/null bs=4k count=1000000 iflag=direct [root@h3c ~]# dd if=/dev/nvme3n1 of=/dev/null bs=8k count=1000000 iflag=direct [root@h3c ~]# dd if=/dev/nvme3n1 of=/dev/null bs=16k count=1000000 iflag=directdone
2.使用fio工具测试
指定测试大小为4K,8k,16k文件大小为4G8G16G,测试时常最长为120s,测试硬盘随机读
nvme1n1(ScaleFlux 6.4TB)
[root@h3c ~]# fio -filename=/dev/nvme1n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=4G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme1n1_randw [root@h3c ~]# fio -filename=/dev/nvme1n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=8k -size=8G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme1n1_randw [root@h3c ~]# fio -filename=/dev/nvme1n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=16k -size=16G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme1n1_randwnvme2n1(LONGSYS 7.68TB)
[root@h3c ~]# fio -filename=/dev/nvme2n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=4G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme2n1_randw [root@h3c ~]# fio -filename=/dev/nvme2n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=8k -size=8G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme2n1_randw [root@h3c ~]# fio -filename=/dev/nvme2n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=16k -size=16G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme2n1_randwnvme3n1(DERA 6.4TB)
[root@h3c ~]# fio -filename=/dev/nvme3n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=4k -size=4G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme3n1_randw [root@h3c ~]# fio -filename=/dev/nvme3n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=8k -size=8G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme3n1_randw [root@h3c ~]# fio -filename=/dev/nvme3n1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=16k -size=16G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme3n1_randwdone
4.2块设备写测试
1.使用dd指令
nvme1n1(ScaleFlux 6.4TB)
[root@h3c ~]# dd if=/dev/urandom of=/dev/nvme1n1 bs=4k count=1000000 conv=fsync oflag=direct [root@h3c ~]# dd if=/dev/urandom of=/dev/nvme1n1 bs=8k count=1000000 conv=fsync oflag=direct [root@h3c ~]# dd if=/dev/urandom of=/dev/nvme1n1 bs=16k count=1000000 conv=fsync oflag=directnvme2n1(LONGSYS 7.68TB)
[root@h3c ~]# dd if=/dev/urandom of=/dev/nvme2n1 bs=4k count=1000000 conv=fsync oflag=direct [root@h3c ~]# dd if=/dev/urandom of=/dev/nvme2n1 bs=8k count=1000000 conv=fsync oflag=direct [root@h3c ~]# dd if=/dev/urandom of=/dev/nvme2n1 bs=16k count=1000000 conv=fsync oflag=directnvme3n1(DERA 6.4TB)
[root@h3c ~]# dd if=/dev/urandom of=/dev/nvme3n1 bs=4k count=1000000 conv=fsync oflag=direct [root@h3c ~]# dd if=/dev/urandom of=/dev/nvme3n1 bs=8k count=1000000 conv=fsync oflag=direct [root@h3c ~]# dd if=/dev/urandom of=/dev/nvme3n1 bs=16k count=1000000 conv=fsync oflag=directdone
2.使用fio工具测试
nvme1n1(ScaleFlux 6.4TB)
[root@h3c ~]# fio -filename=/dev/nvme1n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=4G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme1n1_randw [root@h3c ~]# fio -filename=/dev/nvme1n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=8k -size=8G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme1n1_randw [root@h3c ~]# fio -filename=/dev/nvme1n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=16G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme1n1_randwnvme2n1(LONGSYS 7.68TB)
[root@h3c ~]# fio -filename=/dev/nvme2n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=4G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme2n1_randw [root@h3c ~]# fio -filename=/dev/nvme2n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=8k -size=8G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme2n1_randw [root@h3c ~]# fio -filename=/dev/nvme2n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=16G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme2n1_randwnvme3n1(DERA 6.4TB)
[root@h3c ~]# fio -filename=/dev/nvme3n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=4k -size=4G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme3n1_randw [root@h3c ~]# fio -filename=/dev/nvme3n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=8k -size=8G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme3n1_randw [root@h3c ~]# fio -filename=/dev/nvme3n1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=16G -numjobs=1 -runtime=120 -allow_mounted_write=1 -group_reporting -name=nvme3n1_randwdone