Skip to main content

Test Steps

CPU and Memory Performance Testing

Test Environment

Operating System: CentOS 7 Cloud Platform Version: >= v3.7.7 Host: Dell PowerEdge R730xd

  • CPU: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz
  • Memory: DDR4 2133 MHz 256GB (16GB x 16)
  • Disk: Mechanical disk 20TB PERC H730P Mini (RAID 10)
  • Network Card: 10000Mb/s

Install Test Software

Test Tools:

  • UnixBench: Test virtual machine CPU performance
  • mbw: Test memory performance
# Install UnixBench
$ yum install -y git gcc autoconf gcc-c++ time perl-Time-HiRes
$ git clone https://github.com/kdlucas/byte-unixbench.git

# Install mbw
$ git clone https://github.com/raas/mbw.git && cd mbw
$ make && ./mbw 512

CPU Test

Test Command:

$ cd byte-unixbench/UnixBench
$ ./Run -c 1 whetstone-double dhry2reg fsdisk

Conclusion:

MetricPhysical MachineVirtual MachineVirtualization Overhead (Physical-Virtual/ Physical)
Dhrystone34839728.4 lps33964545.0 lps2.5%
Double-Precision Whetstone4368.3 MWIPS4244.3 MWIPS2.8%
File Copy1825548.4 KBps1788048.3 KBps2.1%

Memory Test

Conclusion:

MetricPhysical MachineVirtual MachineVirtualization Overhead (Physical-Virtual/Physical)
MEMCPY AVG7578.348 MiB/s6254.520 MiB/s1.7%

Local Storage IO Testing

Test Method

Use fio, test with the following scenarios and commands:

  • 4KB Random Read
fio --name=random-read --ioengine=posixaio --rw=randread --bs=4k --size=4g --numjobs=1 --iodepth=16 --runtime=60 --time_based --direct=1
  • 4KB Random Write
fio --name=random-write --ioengine=posixaio --rw=randwrite --bs=4k --size=4g --numjobs=1 --iodepth=16 --runtime=60 --time_based --direct=1 --end_fsync=1
  • 4K Sequential Read
fio --name=random-read --ioengine=posixaio --rw=read --bs=4k --size=4g --numjobs=1 --iodepth=16 --runtime=60 --time_based --direct=1
  • 4K Sequential Write
fio --name=random-write --ioengine=posixaio --rw=write --bs=4k --size=4g --numjobs=1 --iodepth=16 --runtime=60 --time_based --direct=1 --end_fsync=1
  • 1MB Sequential Read
fio --name=seq-read --ioengine=posixaio --rw=read --bs=1m --size=16g --numjobs=1 --iodepth=1 --runtime=60 --time_based --direct=1
  • 1MB Sequential Write
fio --name=seq-write --ioengine=posixaio --rw=write --bs=1m --size=16g --numjobs=1 --iodepth=1 --runtime=60 --time_based --direct=1 --end_fsync=1

Test Environment

  • Physical Machine

    OS: CentOS Linux release 7.9.2009 (Core) Kernel: 3.10.0-1062.4.3.el7.yn20191203.x86_64 CPU: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz Memory: 256G RAID Controller: Broadcom / LSI MegaRAID SAS-3 3108 RAID Level: RAID10

  • Linux Virtual Machine

    OS: CentOS Linux release 7.6.1810 (Core) Kernel: 3.10.0-957.12.1.el7.x86_64 Configuration: 4 cores CPU 4G memory 30G system disk 100G data disk

  • Windows Virtual Machine

    OS: Windows Server 2008 R2 Datacenter 6.1 Configuration: 4 cores CPU 4G memory 40G system disk 100G data disk

Test Results

Scenario4KBRandom Read4KBRandom Write4KBSequential Read4KBSequential Write1MBSequential Read1MBSequential Write
IOPSThroughputIOPSThroughputIOPSThroughputIOPSThroughputIOPSThroughputIOPSThroughput
Physical Machine195782KiB/s734928.7MiB/s22.1k86.3MiB/s24.5k95.8MiB/s10551056MiB/s11171118MiB/s
(100%)(100%)(100%)(100%)(100%)(100%)(100%)(100%)(100%)(100%)(100%)(100%)
Linux Virtual Machine245981KiB/s609623.8MiB/s945836.9MiB/s627824.5MiB/s979980MiB/s10581059MiB/s
(cache=none)(126%)(125%)(83%)(83%)(43%)(43%)(26%)(26%)(93%)(93%)(95%)(95%)
Linux Virtual Machine243973KiB/s748329.2MiB/s11.5k44.9MiB/s727128.4MiB/s958959MiB/s10521052MiB/s
(cache=none,queues=4)(125%)(124%)(102%)(102%)(52%)(52%)(30%)(30%)(91%)(91%)(94%)(94%)
Linux Virtual Machine13.0k54.5MiB/s836032.7MiB/s13.1k51.3MiB/s897635.1MiB/s25502551MiB/s10451046MiB/s
(cache=writeback)(6667%)(6969%)(114%)(114%)(59%)(59%)(37%)(37%)(242%)(242%)(94%)(94%)
Linux Virtual Machine28.7k112MiB/s12.2k47.5MiB/s29.6k116MiB/s11.2k43.8MiB/s29312932MiB/s12201220MiB/s
(cache=writeback,queues=4)(14718%)(14322%)(166%)(166%)(134%)(134%)(46%)(46%)(278%)(278%)(109%)(109%)
Windows Virtual Machine281111.0MiB/s600223.4MiB/s11.8k46.1MiB/s428916.8MiB/s10091009MiB/s685686MiB/s
(cache=none)(1441%)(1407%)(82%)(82%)(53%)(53%)(18%)(18%)(96%)(96%)(61%)(61%)
Windows Virtual Machine279410.9MiB/s744829.1MiB/s21.1k82.6MiB/s25.5k99.7MiB/s930930MiB/s10131014MiB/s
(cache=none,queues=4)(1432%)(1394%)(101%)(101%)(95%)(96%)(104%)(104%)(88%)(88%)(91%)(91%)
Windows Virtual Machine24839935KiB/s743029.0MiB/s10.9k42.8MiB/s13.6k53.0MiB/s19931994MiB/s920920MiB/s
(cache=writeback)(1273%)(1270%)(101%)(101%)(49%)(50%)(56%)(55%)(189%)(189%)(82%)(82%)
Windows Virtual Machine452017.7MiB/s18.8k73.6MiB/s23.3k90.8MiB/s21.8k85.1MiB/s26282628MiB/s11911192MiB/s
(cache=writeback,queues=4)(2317%)(2263%)(2558%)(2564%)(105%)(105%)(89%)(89%)(249%)(249%)(106%)(106%)

Test Conclusions

  1. Compared to physical machines, in 4KB random read/write, 1MB sequential read/write aspects, there is about 10% virtualization overhead. Virtual machine performance can be considered equivalent to physical machines. Due to caching effects, virtual machine performance even exceeds physical machines in some scenarios.
  2. After enabling writeback and multi-queue, write performance has significant acceleration
  3. In 4KB sequential read/write performance, virtual machines only have half the performance of physical machines. This is because disks use thin provision mode. Sequential read/write inside virtual machines actually becomes random read/write on physical machines. To improve virtual machine 4KB sequential read/write performance, virtual disk files need to be pre-allocated. This way sequential read/write inside virtual machines is also sequential read/write on physical machines.

Shared Storage (ceph) IO Performance Testing

Test Environment

  1. Host Configuration:

    OS: CentOS Linux release 7.9.2009 (Core) Kernel: 3.10.0-1062.4.3.el7.yn20191203.x86_64 CPU: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz Memory: 256GB

  2. Virtual Machine Configuration:

    OS: CentOS Linux release 7.6.1810 (Core) Kernel: 3.10.0-957.12.1.el7.x86_64 Configuration: 4 cores CPU 4G memory 30G system disk 100G data disk

  3. Ceph Storage Configuration

    Network Card: 2x10G dual optical port storage network + 2x10G dual optical port access network Disk: All-flash SSD

Test Data

Scenario4KBRandom Read4KBRandom Write4KBSequential Read4KBSequential Write1MBSequential Read1MBSequential Write
IOPSThroughputIOPSThroughputIOPSThroughputIOPSThroughputIOPSThroughputIOPSThroughput
cache=none10544217KiB/s4051622KiB/s18647456KiB/s5522209KiB/s159159MiB/s163164MiB/s
cache=none,queues=411524608KiB/s4411767KiB/s20668265KiB/s3681472KiB/s168169MiB/s168168MiB/s
cache=writeback9783913KiB/s942536.8MiB/s16236494KiB/s10.7k41.7MiB/s149149MiB/s474474MiB/s
cache=writeback,queues=410714284KiB/s12.6k49.3MiB/s17116848KiB/s15.1k59.1MiB/s161161MiB/s475475MiB/s

Test Conclusions

  1. Enabling writeback and multi-queue can significantly improve write performance
  2. Read performance is relatively difficult to optimize. You can increase read ahead cache inside virtual machines (blockdev --setra /dev/sda)
  3. Ceph did not saturate the network, nor did it fully utilize SSD performance. Performance bottleneck seems to be at the software level

Network Testing

Test Conditions

  1. By default, virtual machines have traffic limits. You need to change bandwidth to 0 on the frontend or using command line tool climc server-change-bandwidth to cancel rate limiting.

  2. By default, VPC virtual machines' EIPs also have bandwidth limits (default 30Mbps). You also need to modify the limit to 0 on the frontend, or using climc to cancel the limit.

Test Method:

# Find a machine to run iperf server mode, assume ip is 10.127.100.3
$ iperf3 -s --bind 10.127.100.3

# On another machine, connect to server as iperf client mode
$ iperf3 -c 10.127.100.3 -t 30

Execute the above three times, take the best result.

Classic Network Performance Testing

Environment
  1. Host Configuration:

    OS: CentOS Linux release 7.9.2009 (Core) Kernel: 3.10.0-1062.4.3.el7.yn20191203.x86_64 CPU: Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz Memory: 256GB

  2. Virtual Machine Configuration:

    OS: CentOS Linux release 7.6.1810 (Core) Kernel: 3.10.0-957.12.1.el7.x86_64 Configuration: 2 cores CPU 2G memory 30G system disk

Conclusion
Source \ DestinationPhysical MachineVirtual Machine
Physical Machine8.35 Gbps (100%)8.40 Gbps (101%)
Virtual Machine8.41 Gbps (101%)8.33 Gbps (99.7%)

Note: Saturated traffic testing, network virtualization overhead is very low (1% level).

VPC Network Performance Testing

Test Environment
  1. Host Configuration:

    OS: CentOS Linux release 7.7.1908 (Core) Kernel: 5.4.130-1.yn20210710.el7.x86_64 CPU: Intel(R) Xeon(R) Gold 5218R CPU @ 2.10GHz Memory: 256GB

  2. Virtual Machine Configuration:

    OS: CentOS Linux release 7.8.2003 Kernel: 3.10.0-1127.el7.x86_64 Configuration: 2 cores CPU 2G memory 30G system disk

Conclusion
ScenarioPhysical to PhysicalVirtual to VirtualVirtual EIP to Virtual EIP
Performance (Gbps)9.19 (100%)8.96 (97%)5.83 (63%)

Note: Under saturated traffic conditions, network virtualization overhead is very low (3% level). Due to longer conversion paths, EIP performance is much worse (36% loss).