I read an article about Virtualization of Linux servers over the weekend. This paper tests the performance of several major open-source virtual products, just in line with the isolation performance of several different virtual technologies that I saw some time ago. The performance and isolation of virtual machines are very important performance indicators of virtual technology. It takes a lot of time and effort to test and compare different products in a large area, this article comprehensively tests the performance of different virtual products in Linux, including KQEMU, KVM, Linux-VServer, OpenVZ, VirtualBox, and Xen.
Test Method
The entire test was performed on an IBM/Lenovo Desktop PC equipped with an Intel Core 2 Duo 6300 processor, 4 GB memory, and 80 gb sata hard drive. The host operating system is Ubuntu 7.10, the kernel is 2.6.22-14, and the Virtual Machine (guest) Operating System is Ubuntu 6.10. The Network part is tested through another PC. The test software and parameters used are as follows:
Kernel Build
$ Make defconfig
$ Date + % s. % N & make & date + % s. % N
$ Make clean
Dbench
$/Usr/local/bin/dbench-t 300-D/var/tmp 100
Netperf
$ Netserver # server side
$ Netperf-H # client side
Rsync
Experiment 1:
$ Date + % s. % N & rsync-av: kernel/var/tmp & date + % s. % N # client side
# Where 'kernel 'is the linux-2.6.22.14 file tree (294 M)
$ Rm-fr/var/tmp /*
Experiment 2:
$ Date + % s. % N & rsync-av: iso/var/tmp & date + % s. % N # client side
# Where 'iso 'is ubuntu-6.06.1-server-i386.iso (433 M)
$ Rm-fr/var/tmp /*
Dd
Experiment 1:
$ Dd if =/opt/iso/ ubuntu-6.06.1-server-i386.iso of =/var/tmp/out. iso
$ Rm-fr/var/tmp /*
Experiment 2:
$ Dd if =/dev/zero of =/dev/null count = 117187560 #117187560 = 60G
Bzip2
$ Cp/opt/ubuntu-6.06.1-server-i386.iso.
$ Date + % s. % N & bzip2-9 ubuntu-6.06.1-server-i386.iso & date + % s. % N
$ Rm ubuntu-6.06.1-server-i386.iso.bz2
SysBench
$ Mysql> create database sbtest;
$ Sysbench-test = oltp-mysql-user = root-mysql-host = localhost-debug = off prepare
$ Sysbench-test = oltp-mysql-user = root-mysql-host = localhost-debug = off run
Test Results
- Kernel build: kernel compilation is a CPU processing process with heavy loads for a long time. It also involves multi-threaded processing and small file read/write operations. The performance of virtual products using OS-level and para-virtualization technology is better than that of Linux.
- Dbench: a file system test tool used to test the load on the file server. Linux-VServer won a big victory in this test, and VirtualBox won the crash for unknown reasons in this test, the testing results of other products are about 30% lower than those of Linux.
- Netperf: a tool used to test network performance. It uses a TCP packet stream to test network data exchange performance. In this test, the performance of QEMU-based virtual products is poor, and VirtualBox performs well in this test, which may be related to VirtualBox's use of a special network driver.
- Rsync: used to test the network. OpenVZ is the best, KVM is the worst, and the rest are similar.
- Dd: used to test disk I/O performance. It does not involve too many CPUs. Xen and KVM. OpenVZ is obviously slow.
- Bzip2: compression is also a heavy-load CPU, but does not require frequent disk IO operations. In addition to KQEMU and OpenVZ, the performance of other virtual machines is similar to that of Linux.
- Sysbench: database server test. In this test, the performance of Linux-VServer and Xen is close to that of Linux, while that of KVM and OpenVZ is only half of that of Linux.
- Scale: In the last and most challenging scale test of Virtual Technology (sysbench at scale), Xen performs well. When the number of other virtual products reaches 32, performance is greatly reduced. Only Xen can increase the number of virtual machines while maintaining good performance loss. KVM has the best performance in 8 virtual machines, VirtualBox has the best performance in 16, and other products have the best performance when the number of virtual machines reaches 4.
In general, Xen not only lags behind in dbench file system tests, but also performs well in all other tests, especially in the final scale test.