
Performance Indicators: KVM vs. Xen
- Transfer
At Cloud4Y, we see VmWare as the leading virtualization solution. However, we are interested in other solutions, including Xen and KVM. And here is what we noticed: there is not so much information that allows us to compare these hypervisors: the latest practical studies that we found on the network date back to 2012 and, of course, can no longer be considered relevant. Today we will present to your attention also not the newest, but, in our opinion, quite useful research devoted to the performance of the KVM and Xen hypervisors.

Hypervisor KVM
Yes, the virtualization guru will forgive us, but first we’ll remind readers what a hypervisor is and why it is needed. To perform tasks of different meanings (software development, hosting
KVM is software that allows you to organize PC-based virtualization running Linux and similar. Recently, KVM is considered a component of the
In the process, KVM accesses the kernel directly through a

Hypervisor Xen
Initially, Cambridge students launched a project that eventually became a commercial version of Xen. The first release is dated 2003, and in 2007, the source code was purchased by Citrix. Xen is a cross-platform hypervisor with great functionality and huge capabilities, which makes it possible to use it in the corporate field. Xen supports paravirtualization, a special kernel mode of the operating system when the kernel is configured to work simultaneously with the hypervisor.
Only the necessary set of functions has been added to the Xen code: managing virtual memory and processor clock speed, working with DMA, a real-time timer, and interrupts. The rest of the functionality is moved to domains, that is, to virtual machines that are running at that time. Thus, Xen is the lightest hypervisor.
The essence of the study
Testing is based on the use of two SuperMicro servers, each of which has a quad-core Intel Xeon
For hosting and virtual machines, we took Fedora 20 (with SELinux). Here are the software versions we have taken:
- Kernel: 3.14.8
- For KVM:
qemu-kvm 1.6.2 - For Xen: xen 4.3.2
All root file systems are XFS with default configuration. Virtual machines are created using
Explanations
In addition, competition between hypervisors is tightly controlled and minimized. On most virtual servers, you will have several virtual machines fighting over CPU time, I / O devices and network access. Our testing does not take this into account. One hypervisor can have low productivity with low competition for resources, and then show much greater efficiency than competitors when the struggle for resources is higher.
The study was conducted on Intel processors, so its results may differ for AMD and ARM.
results
Tests for virtual machines installed directly on hardware, that is, without an operating system (hereinafter referred to as hardware), served as the basis for testing virtual machines. The performance deviation between the two servers without virtualization was 0.51% or less.
KVM performance fell within 1.5% compared to hardware in almost all tests. Only two tests showed a different result: one of them is the
In the PostMark test, Xen was 14.41% slower than hardware. When restarting, the test results differed from the initial ones by 2%. The best test for KVM, MAFFT, was second on the list of worst for Xen.
Here is a short test result:
Best value | Bare metal | Kvm | Xen | |
---|---|---|---|---|
Timed MAFFT Alignment | lower | 7.78 | 7.795 | 8.42 |
Smallpt | lower | 160 | 162 | 167.5 |
Pov ray | lower | 230.02 | 232.44 | 235.89 |
Postmark | higher | 3667 | 3824 | 3205 |
Openssl | higher | 397.68 | 393.95 | 388.25 |
John the Ripper (MD5) | higher | 49548 | 48899.5 | 46653.5 |
John the Ripper (DES) | higher | 7374833.5 | 7271833.5 | 6911167 |
John the Ripper (Blowfish) | higher | 3026 | 2991.5 | 2856 |
CLOMP | higher | 3.3 | 3.285 | 3.125 |
C ray | lower | 35.35 | 35.66 | 36.13 |
7-zip | higher | 12467.5 | 12129.5 | 11879 |
If you want to see the full results, follow the link .
Instead of a conclusion
In our testing, KVM was almost always 2% slower than hardware. Xen was 2.5% slower in three out of ten tests, and worse in the rest: by 5-7%. Although KVM showed its best in the PostMark test, it should be noted that we conducted only one I / O test, and to get a more reliable picture, it’s worth a few more.
To select the right hypervisor, you must correctly evaluate the nature of your workloads. If your workloads require less CPU and more I / O, then you can do more I / O tests. If you work mainly with audio and video, try the x264 or mp3 tests.
[UPD] As mister_fog rightly pointed out , in 2007 Citrix bought not Xen source code, but XenSource, which was founded by Xen developers and was engaged in the commercial development of this open source project. Proof .