Vmware vs Virtualbox vs KVM vs XEN: virtual machines performance comparison

Written by Gionatan Danti on . Posted in Virtualization

User Rating:  / 166
PoorBest 

Network subsystem

To benchmark the pure network speed, I flooded each guest machine with many pings, using the command “ping -f 192.168.122.166 -c 25000 -s 1024” from a Linux client. The Linux client and the host server machine were connected to the same 10/100 switch.

What was the best-performing guest?

Ping flood test

The results are quite close, with Xen only slight slower.

What about CPU load?

Ping flood CPU load

With this test we transferred and received a 1 KB x 25000, for a total of 25.6 MB sent and 25.6 MB received. As you can see from the previous graph, the CPU load is not approaching 100% for any guest machine, so why we need 25 seconds to transfer a total of 51.2 Mbytes? While is true that the virtualizer add a considerable CPU overhead and the IP and Ethernet encapsulation add some extra bytes sent on the LAN link, I think that in this case I nearly saturate the packet-forwarding rate of the little switch used to connect the two machines.

Anyway, the test remain very interesting as, in this case, I recorded interrupt and privileged time. To really understand this graph, you need to know that the former is really a subcomponent of privileged time, so you don't need to add it to the latter to get CPU time. In other word, the privileged time is the sum on IRQ time + syscall time.

Recording the total privileged time and IRQ time, we can easily have an idea of syscall time (privileged time - IRQ time).

We can see that KVM was the best performing virtual machine, with a privileged time dominated by IRQ servicing time: this means that the network-related syscalls executed quite fast on KVM.

On contrary, Xen has a very high privilege time but a lower IRQ time: the network-related syscalls executed slowly. VMware as a extraordinary low IRQ time, probably a courtesy of its paravirtualized network driver, while VirtualBox is overall a decent performer.

UPDATE: a recent article comparing KVM vs VirtualBox can be found here: http://www.ilsistemista.net/index.php/virtualization/12-kvm-vs-virtualbox-40-on-rhel-6.html

Comments   

 
#1 Nathan 2012-09-12 03:12
This is a terrible review, to install the VMware paravirtual drivers but not the KVM Windows paravirtual drivers. All results from VMware must be discarded for comparison purposes.
 
 
#2 Marcelo 2015-11-15 03:16
A quick comparison I made between VMware Workstation Player and VirtualBox, with XP as guest, shows a ridiculous I/O advantage of VB, while VMware has a big advantage on 3D graphics.
 
 
#3 Gionatan Danti 2015-11-15 09:32
Quoting Marcelo:
A quick comparison I made between VMware Workstation Player and VirtualBox, with XP as guest, shows a ridiculous I/O advantage of VB, while VMware has a big advantage on 3D graphics.


Hi Marcelo,
VBox higher I/O speed probably is an artifact of VBox not honoring write barrier (synchronized writes) by default. While this give much higher speed, storage consistency is somewhat reduced and I do not suggest to disable write barriers on production host/machines.
 

You have no rights to post comments