Software Woes

Rants, tips and tricks



Wednesday, August 08, 2007



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.

8 Comments:

At 4:04 AM, Blogger AbsintheSyringe said...

You should try VirualBox, seriously not bad at all.

 
At 9:34 PM, Blogger Milan Babuskov said...

Looking at the website, it does seem very cool. And is also open source. I'll try it ASAP.

 
At 1:32 PM, Anonymous Anonymous said...

Why we use virtualisation in production environments:

1) We can provision a new 'box' for a new project in minutes not days (no cooling/rack/power/lan connectivity to sort out, no arguing with hardware suppliers about box specs). If you are running more than 100 boxes (we run tens of thousands) savings are good.
2) We can snapshot and roll back any major changes quickly and easily if they cause probs in production that did not show up in test.
3) We can migrate a virtual machine about between physical boxes to get maximum return for our hardware estate.
4) Power bills for our datacentre are down nearly 30% from virtualising. Moving to DC supplies will further reduce this.
5) On-going maintenance and support costs are lower

 
At 3:33 AM, Anonymous sims said...

@AbsintheSyringe

Problem is the OSE(open source edition) does not have functionality for running "headless" VMs. So it really sucks for server functionality and automation. I guess you could use a dummy X server. However, KVM is coming along nicely. It's probably the way to go for servers.

 
At 12:34 AM, Anonymous Anonymous said...

Are you really comparing Linux HOst performance with Windows quest performance for gcc.

Yep that would really mess up your benchmark to be totally inconclusive

 
At 9:16 AM, Blogger Milan Babuskov said...

My benchmark is about QEmu vs VMWare, not about GCC performance.

Anyway, I tried VirtualBox in the meantime, and I'm only using that now. It's most user-friendly VM on Linux and works out of the box. But, I only use VM for testing, not for production, so YMMV.

 
At 10:20 PM, Anonymous SWEDENROXX said...

Wow I suppose you have uberservers there in serbia :D

You know nothing about system administration kid so stfu. There are hundreds of reasons why you SHOULD use vmware in production and why companies using it. One of them is the high reliability, you have 2 vmware host machines 1 spare 1 running on like 40% if machine 2 goes out you can copy the prod images from backup to 1 and load it up or already have it on 1 as well and load it up in 5 mins. In the meantime replacing physical server takes a long time.

BTW you haven't even try any vmware tunings and your amd turion64 is a pile of trash machine so don't run vmware on that poorie...

 
At 8:55 PM, Blogger Milan Babuskov said...

SWEDENROXX, this was back in 2007. things have changed a lot since then. I don't even have that old computer anymore. Of course I host my websites on VPS now.

 

Post a Comment

Links to this post:

Create a Link

<< Home