Online.net SSD 独服裸机benchmark

在这台服务器上测试了Xen, KVM 和 Esxi 虚拟化之后,再次在这个服务器上安装了centos 7 来测试非虚拟化的条件下, SSD 的IO 符合

SSD 使用的是镁光的1100

测试程序使用的是:

wget -qO- bench.sh | bash

下面是测试结果:

----------------------------------------------------------------------
CPU model : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
Number of cores : 12
CPU frequency : 1200.134 MHz
Total size of Disk : 462.3 GB (1.5 GB Used)
Total amount of Mem : 96565 MB (802 MB Used)
Total amount of Swap : 8191 MB (0 MB Used)
System uptime : 0 days, 0 hour 3 min
Load average : 0.36, 0.23, 0.10
OS : CentOS 7.6.1810
Arch : x86_64 (64 Bit)
Kernel : 3.10.0-957.el7.x86_64
----------------------------------------------------------------------
I/O speed(1st run) : 402 MB/s
I/O speed(2nd run) : 395 MB/s
I/O speed(3rd run) : 397 MB/s
Average I/O speed : 398.0 MB/s

可以看到的在KVM 和 Esxi 的虚拟化条件下, SSD 的IO 和裸机的IO 基本保持一致, 其中Esxi 可能是因为驱动的原因,稍微强那么一点点

Xen 的虚拟化没有做任何优化, SSD 的IO 只有KVM 和 ESXi 的一半

Online.net SSD 基于KVM虚拟化的benchmark

机器为online.net 的 SSD 机器, VM 配置是4 vCPU 和 4 GB RAM

测试使用程序为:

wget -qO- bench.sh | bash

以下是测试结果:

----------------------------------------------------------------------
CPU model : Common KVM processor
Number of cores : 4
CPU frequency : 3495.948 MHz
Total size of Disk : 28.0 GB (1.1 GB Used)
Total amount of Mem : 4354 MB (73 MB Used)
Total amount of Swap : 4509 MB (0 MB Used)
System uptime : 0 days, 0 hour 4 min
Load average : 0.02, 0.05, 0.01
OS : Debian GNU/Linux 10
Arch : x86_64 (64 Bit)
Kernel : 4.19.0-5-amd64
----------------------------------------------------------------------
I/O speed(1st run) : 359 MB/s
I/O speed(2nd run) : 351 MB/s
I/O speed(3rd run) : 358 MB/s
Average I/O speed : 356.0 MB/s

在disk 打开cache(write back)以后的测试结果:
----------------------------------------------------------------------
CPU model            : Common KVM processor
Number of cores      : 4
CPU frequency        : 3495.948 MHz
Total size of Disk   : 28.0 GB (1.1 GB Used)
Total amount of Mem  : 4354 MB (70 MB Used)
Total amount of Swap : 4509 MB (0 MB Used)
System uptime        : 0 days, 0 hour 1 min
Load average         : 0.00, 0.00, 0.00
OS                   : Debian GNU/Linux 10
Arch                 : x86_64 (64 Bit)
Kernel               : 4.19.0-5-amd64
----------------------------------------------------------------------
I/O speed(1st run)   : 378 MB/s
I/O speed(2nd run)   : 369 MB/s
I/O speed(3rd run)   : 374 MB/s
Average I/O speed    : 373.7 MB/s

Quadranet HDD VM benchmark

母鸡是Quadranet 的一台古董机,硬盘是使用了快5年的HDD, 虚拟化使用的是Xen, 管理工具是Xenserver

测试使用程序:

wget -qO- bench.sh | bash

下面是测试结果:

----------------------------------------------------------------------
CPU model : Intel(R) Xeon(R) CPU E3-1241 v3 @ 3.50GHz
Number of cores : 2
CPU frequency : 3500.404 MHz
Total size of Disk : 28.3 GB (2.1 GB Used)
Total amount of Mem : 1402 MB (166 MB Used)
Total amount of Swap : 1906 MB (0 MB Used)
System uptime : 94 days, 1 hour 16 min
Load average : 0.00, 0.01, 0.05
OS : CentOS 7.6.1810
Arch : x86_64 (64 Bit)
Kernel : 3.10.0-957.1.3.el7.x86_64
----------------------------------------------------------------------
I/O speed(1st run) : 34.8 MB/s
I/O speed(2nd run) : 37.0 MB/s
I/O speed(3rd run) : 36.9 MB/s
Average I/O speed : 36.2 MB/s

 

Digitalocean VM benchmark

测试使用的程序为:

wget -qO- bench.sh | bash

下面是测试结果:

----------------------------------------------------------------------
CPU model : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
Number of cores : 1
CPU frequency : 2199.998 MHz
Total size of Disk : 25.0 GB (5.1 GB Used)
Total amount of Mem : 991 MB (361 MB Used)
Total amount of Swap : 2047 MB (0 MB Used)
System uptime : 296 days, 22 hour 43 min
Load average : 0.00, 0.02, 0.05
OS : CentOS 7.5.1804
Arch : x86_64 (64 Bit)
Kernel : 3.10.0-862.14.4.el7.x86_64
----------------------------------------------------------------------
I/O speed(1st run) : 560 MB/s
I/O speed(2nd run) : 550 MB/s
I/O speed(3rd run) : 446 MB/s
Average I/O speed : 518.7 MB/s

AWS Lightsail benchmark

Lightsail  的IO 和选择的配置有关,配置越高, IO 越高

使用的程序为:

wget -qO- bench.sh | bash

下面是测试结果:

----------------------------------------------------------------------
CPU model : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
Number of cores : 2
CPU frequency : 2400.130 MHz
Total size of Disk : 160.0 GB (5.2 GB Used)
Total amount of Mem : 7819 MB (689 MB Used)
Total amount of Swap : 0 MB (0 MB Used)
System uptime : 78 days, 21 hour 5 min
Load average : 0.00, 0.01, 0.05
OS : CentOS 7.6.1810
Arch : x86_64 (64 Bit)
Kernel : 3.10.0-957.12.2.el7.x86_64
----------------------------------------------------------------------
I/O speed(1st run) : 139 MB/s
I/O speed(2nd run) : 130 MB/s
I/O speed(3rd run) : 130 MB/s
Average I/O speed : 133.0 MB/s

Linode 达拉斯 VM Benchmark

测试使用的程序:

wget -qO- bench.sh | bash

VM的配置为:

1 vCPU

2GB RAM

30 GB SSD

下面为测试结果:

----------------------------------------------------------------------
CPU model : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
Number of cores : 1
CPU frequency : 2799.998 MHz
Total size of Disk : 26.0 GB (9.3 GB Used)
Total amount of Mem : 1976 MB (992 MB Used)
Total amount of Swap : 4095 MB (0 MB Used)
System uptime : 56 days, 6 hour 32 min
Load average : 0.02, 0.06, 0.02
OS : CentOS 6.10
Arch : x86_64 (64 Bit)
Kernel : 5.1.11-x86_64-linode127
----------------------------------------------------------------------
I/O speed(1st run) : 968 MB/s
I/O speed(2nd run) : 962 MB/s
I/O speed(3rd run) : 973 MB/s
Average I/O speed : 967.7 MB/s

Xenserver 的VM 的基本benchmarks

服务器仍然为online.net 的服务器,硬盘是 3 x 500 GB SSD

测试使用的程序:

wget -qO- bench.sh | bash

VM 的配置为:

8 vCPU
8GB RAM
80GB SSD

下面是测试结果(主要侧重于IO测试):

----------------------------------------------------------------------
CPU model            : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
Number of cores      : 8
CPU frequency        : 3493.688 MHz
Total size of Disk   : 71.3 GB (2.0 GB Used)
Total amount of Mem  : 8040 MB (203 MB Used)
Total amount of Swap : 7628 MB (0 MB Used)
System uptime        : 2 days, 8 hour 12 min
Load average         : 0.08, 0.02, 0.01
OS                   : Debian GNU/Linux 9
Arch                 : x86_64 (64 Bit)
Kernel               : 4.9.0-8-amd64
----------------------------------------------------------------------
I/O speed(1st run)   : 235 MB/s
I/O speed(2nd run)   : 234 MB/s
I/O speed(3rd run)   : 214 MB/s
Average I/O speed    : 227.7 MB/s

 

VMware vSphere 6.7 VM IO Benchmark

测试使用的程序:

wget -qO- bench.sh | bash

VM配置:

Debian 10

4 vCPU

4GB RAM

50GB SSD

online.net 的 独立服务器,服务器为3 X 500 GB SSD

在使用新的ahci driver (vmw_achi)的情况下:

CPU model : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
Number of cores : 4
CPU frequency : 3495.951 MHz
Total size of Disk : 46.0 GB (0.9 GB Used)
Total amount of Mem : 3946 MB (133 MB Used)
Total amount of Swap : 4092 MB (0 MB Used)
System uptime : 0 days, 0 hour 55 min
Load average : 0.00, 0.00, 0.00
OS : Debian GNU/Linux 10
Arch : x86_64 (64 Bit)
Kernel : 4.19.0-5-amd64
----------------------------------------------------------------------
I/O speed(1st run) : 77.6 MB/s
I/O speed(2nd run) : 79.3 MB/s
I/O speed(3rd run) : 76.9 MB/s
Average I/O speed : 77.9 MB/s
-----------------------------------

在退回旧的ahci driver(sata-achi)的情况下:

----------------------------------------------------------------------
CPU model : Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
Number of cores : 4
CPU frequency : 3495.951 MHz
Total size of Disk : 46.0 GB (0.9 GB Used)
Total amount of Mem : 3946 MB (101 MB Used)
Total amount of Swap : 4092 MB (0 MB Used)
System uptime : 0 days, 0 hour 1 min
Load average : 0.02, 0.01, 0.00
OS : Debian GNU/Linux 10
Arch : x86_64 (64 Bit)
Kernel : 4.19.0-5-amd64
----------------------------------------------------------------------
I/O speed(1st run) : 407 MB/s
I/O speed(2nd run) : 408 MB/s
I/O speed(3rd run) : 407 MB/s
Average I/O speed : 407.3 MB/s

基本回到了满速,这个IO 甚是欣慰,虽然比使用纯ssd 要慢点,但还是可以接受的

ESXi 6.7 的这个IO 问题,从6.5 就一直存在,但是到了6.7 还是没有解决

在ESXi 的host上,使用如下命令可以看到:

[[email protected]:~] esxcli software vib list | grep ahci
sata-ahci 3.0-22vmw.650.0.0.4564106 VMW VMwareCertified 2016-11-16
vmw-ahci 1.0.0-32vmw.650.0.0.4564106 VMW VMwareCertified 2016-11-16

说明系统上存在两种driver,一个是sata-achi, 另外一个是vmw-achi. VMware 在vShpere 新的版本中,对于sata 都采用了全新的driver vmw-achi, 目前看来这个driver 还是有一定问题的,因此最好是回退到原来的driver中去

直接登录VMware 的 host,storage -> Adapters, 可以看到driver 用的是vmw_achi

我们需要将这个driver 回退到sata_achi中去:

[[email protected]:~] esxcli system module set --enabled=false --module="vmw_ahci"
[[email protected]:~] esxcli system module list | more
Name Is Loaded Is Enabled
----------------------------- --------- ----------
vmkernel true true
chardevs true true
user true true
....

....
vmkapi_v2_1_0_0_vmkernel_shim true true
vmkusb true true
igbn true true
vmw_ahci true false
iscsi_trans true true
iscsi_trans_compat_shim true true
vmkapi_v2_2_0_0_iscsiInc_shim true true

重启,我们就会发现driver 已经回退到sata-achi了, SSD 的性能又回来了

参考文章: https://anthonyspiteri.net/homelab-supermicro-5020d-tnt4-storage-driver-performance-issues-and-fix/#prettyPhoto

https://kb.vmware.com/s/article/2044993

https://communities.vmware.com/thread/554004