QEMU simulates with style
Open-source QEMU straddles virtualization-emulation line with aplomb
There are so many attractive aspects to QEMU, it’s hard to know where to start. For example, on Linux, running it in “user-mode emulation” allows you to execute a Linux app written for a CPU other than the one running in your host system. QEMU intercepts calls to the Linux kernel (from the guest app), and manages the marshalling of data in both directions. Consequently, even if the endianness of the host is different from that of the guest, QEMU will take care of it.
I was also smitten by the wealth of command-line options available. For example, you can configure the guest environment to recognize up to two virtual floppies and four virtual hard drives. If you want to protect the content of any of your virtual drives from being overwritten, you can start QEMU in “snapshot” mode, which diverts all write operations to a temporary directory.
Even better, if you later decide you want to commit those write operations, you can do so through the QEMU monitor. You can adjust the guest OS’s memory, turn sound hardware on and off, enable and disable USB drives, and on, and on. If that’s not enough, QEMU can also emulate an SMP system. I wasn’t able to test this, but the documentation claims that you can simulate up to 255 virtual processors.
To get an idea of how well QEMU performs next to VMware, I used Puppy Linux, a small-footprint Linux distribution. The Puppy Linux image takes less that 100MB and fits easily on a USB pendrive; nevertheless, it includes a remarkable array of applications. I downloaded a QEMU-enabled version of Puppy Linux and VMware. Both were the same Linux release, and I adjusted the VMware version so both had 256 MB available.
For my test, I downloaded a moderately large JPEG file from the www.photo.net site and performed a blur operation in the mtPaint application provided with Puppy Linux. On my 1GHz Dell system, the VMware version ran approximately 10 percent faster than the QEMU version. Note that this was a comparison of raw processor execution; I imagine that applications that make heavy use of virtualized hardware (such as an RDBMS performing a lot of seek operations) would produce a wider gap, with VMware outperforming QEMU even more.
At this point, QEMU will be most attractive to a small or midsize software development organization that needs to create a testbed of various OS flavors, and has decided that QEMU’s zero cost overwhelms its performance shortcomings. QEMU’s performance can’t compete with commercial virtualizers; at least, not yet.
Even so, with the capabilities it has -- its ability to run in multiple systems; the ease with which new virtual machines can be created; the performance enhancement of the Windows accelerator -- QEMU can hold its head high next to even the likes of VMware.