前面的测试有点不太规范,这次又机会重新测试一下。
机器配置是Xeon E5 1650V3, 96GB RAM, 3X500GB SSD
测试使用的程序是:
wget -qO- bench.sh | bash
直接测试IO,使用的是下面的commands:
dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && rm -f test_$$
直接在服务器裸机上安装Centos 7, 下面是测试结果:
[root@sd ~]# hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 1454 MB in 3.00 seconds = 484.53 MB/sec [root@sd ~]# hdparm -t /dev/sdb /dev/sdb: Timing buffered disk reads: 1472 MB in 3.00 seconds = 490.04 MB/sec [root@sd ~]# hdparm -t /dev/sdc /dev/sdc: iming buffered disk reads: 1470 MB in 3.00 seconds = 489.96 MB/sec
[root@sd sda~]# dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && rm -f test_$$ 16384+0 records in 16384+0 records out 1073741824 bytes (1.1 GB) copied, 2.65959 s, 404 MB/s
测试了几次,都在400 MB/s 左右
[root@sd sdb]# dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && rm -f test_$$ 16384+0 records in 16384+0 records out 1073741824 bytes (1.1 GB) copied, 2.69217 s, 399 MB/s
[root@sd sdc]# dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && rm -f test_$$ 16384+0 records in 16384+0 records out 1073741824 bytes (1.1 GB) copied, 2.70218 s, 397 MB/s
可以看到裸机直接测试的话,SSD 的IO 一般就在400 MB/s 左右
在Host上安装上Esxi 6.7 以后,分别测试Debian 9 和 Debian 10
Debian 9 测试结果:
---------------------------------------------------------------------- CPU model : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz Number of cores : 8 CPU frequency : 3495.142 MHz Total size of Disk : 55.0 GB (0.9 GB Used) Total amount of Mem : 3907 MB (92 MB Used) Total amount of Swap : 4045 MB (0 MB Used) System uptime : 0 days, 0 hour 11 min Load average : 0.96, 0.28, 0.09 OS : Debian GNU/Linux 9 Arch : x86_64 (64 Bit) Kernel : 4.9.0-9-amd64 ---------------------------------------------------------------------- I/O speed(1st run) : 82.2 MB/s I/O speed(2nd run) : 79.9 MB/s I/O speed(3rd run) : 80.1 MB/s Average I/O speed : 80.7 MB/s
Debian 10 测试结果:
---------------------------------------------------------------------- CPU model : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz Number of cores : 8 CPU frequency : 3495.951 MHz Total size of Disk : 55.0 GB (1.0 GB Used) Total amount of Mem : 3897 MB (150 MB Used) Total amount of Swap : 4045 MB (0 MB Used) System uptime : 0 days, 0 hour 25 min Load average : 1.14, 0.31, 0.11 OS : Debian GNU/Linux 10 Arch : x86_64 (64 Bit) Kernel : 4.19.0-5-amd64 ---------------------------------------------------------------------- I/O speed(1st run) : 78.0 MB/s I/O speed(2nd run) : 77.0 MB/s I/O speed(3rd run) : 76.9 MB/s Average I/O speed : 77.3 MB/s
本来以为Debian 10 有什么特殊科技呢,IO 测试和Debian 9 差不多
下面是重头戏,回退一些Esxi 的 ACHI 的driver,再来测试一下:
---------------------------------------------------------------------- CPU model : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz Number of cores : 8 CPU frequency : 3494.956 MHz Total size of Disk : 55.0 GB (0.9 GB Used) Total amount of Mem : 3907 MB (91 MB Used) Total amount of Swap : 4045 MB (0 MB Used) System uptime : 0 days, 0 hour 4 min Load average : 0.22, 0.05, 0.02 OS : Debian GNU/Linux 9 Arch : x86_64 (64 Bit) Kernel : 4.9.0-9-amd64 ---------------------------------------------------------------------- I/O speed(1st run) : 301 MB/s I/O speed(2nd run) : 299 MB/s I/O speed(3rd run) : 303 MB/s Average I/O speed : 301.0 MB/s
数据在350-370 之间乱跳
在Debian 10上,闲时IO 能到400 MB/s, 平时也基本就是300-350左右
---------------------------------------------------------------------- CPU model : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz Number of cores : 8 CPU frequency : 3495.951 MHz Total size of Disk : 55.0 GB (2.0 GB Used) Total amount of Mem : 3897 MB (148 MB Used) Total amount of Swap : 4045 MB (0 MB Used) System uptime : 0 days, 0 hour 21 min Load average : 0.00, 0.01, 0.01 OS : Debian GNU/Linux 10 Arch : x86_64 (64 Bit) Kernel : 4.19.0-5-amd64 ---------------------------------------------------------------------- I/O speed(1st run) : 306 MB/s I/O speed(2nd run) : 300 MB/s I/O speed(3rd run) : 299 MB/s Average I/O speed : 301.7 MB/s