drawkcaB | Backward Compatible logo

rants and tips about software

QEmu vs VMWare benchmark

Some time ago I did a benchmark comparison of VMWare and QEmu (using kqemu acceleration). I get asked about it so often, that I decided to post it on the blog. My tests involve memory and CPU intensive operations like compiling, so it might not be what you’re using your virtual machine for, but I only use VMs to test my applications on various platforms.

Host System:

Slackware 10.2, vanilla 2.6.13 kernel that comes with it
RAM: 512MB
CPU: AMD Turion64 MT30
It is a 64bit CPU, but I only run 32bit OS.

Software:
QEmu 0.8.2
- using slack10.2 package from linuxpackages.net: qemu-0.8.2-i486-1gds.tgz
KQEmu 1.3.0 pre9
- compiled from source from kqemu-1.3.0pre9.tar.gz
VMWare Player 1.0.3 build-34682
- installed from VMWare-player-1.0.3-34682.tar.gz

Since Slackware doesn’t have SysVinit, before installing vmplayer I created directory /opt/vmware

and subdirectories rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d, rc6.d.

When wmplayer installer asked, I gave it /opt/vmware directory.

I aslo installed vmware-tools. I extracted the .iso file from vmware-server package,
and installed it inside guest system.

Guest OS is Windows 2000 Pro.

Test1: QEmu

- Loaded kqemu module:

# modprobe kqemu
# lsmod | grep kq
kqemu                 105604  0

- Created 4G image for guest system

$ qemu-img create -f qcow c.img 4G
Formating ‘c.img’, fmt=qcow, size=4194304 kB

I’m not sure this was really needed, but it complained, so:

# echo 1024 > /proc/sys/dev/rtc/max-user-freq

Win2k is installed like this:

$ qemu -cdrom ../install/windows/win2000server/win2k.iso -hda c.img -m 256 -boot d -localtime

Test2: VMPlayer

With VMPlayer I created image with qemu-img and created a small .vmx file:

# /opt/vmware/vmware start
$ qemu-img create -f vmdk win2k.vmdk 4G
$ vmplayer win2k.vmx

I had to disable sound and network while installing, otherwise it would get stuck at some point.

Running the installed system:

$ qemu -hda c.img -m 256 -localtime -kernel-kqemu
$ vmplayer win2.vmx
    

Benchmark

I did ./configure of wxWidgets 2.8.0rc1

On each test I freshly unpacked the archive and ran:

$ time -p ./configure

I also rebooted the machine to make sure VMWare and QEmu don’t interfere with each other.

Host system:
51.44

QEmu (kqemu module loaded):
1962.29

QEmu with -kernel-kqemu:
1471.51

VMPlayer:
587.20

As you can see, GCC in virtual machine performs 10x slower than on real computer. I really like VM technology and it has good uses for testing and QA, but I really don’t understand people using it in production. Hardware is cheaper than ever and with VM you also have a single point of failure - if some hardware component fails, instead of losing one server, you lose all of them.

Milan Babuškov, 2007-08-08
Copyright © Milan Babu┼íkov 2006-2014