Qemu vs. Qemu+USB Tablet vs. VMPlayer using PCMark05

Qemu vs. Qemu+USB Tablet vs. VMPlayer using PCMark05

I have been running a WinXP 32-bit guest on a Debian x86 host computer for some time. I began by using Qemu+KQEMU in -kernel-kqemu mode. I switched to the free vmplayer because I noticed that it was faster than Qemu. When running Qemu, my host processor seemed to spend a majority of its time in kernel mode. This was as reported by top, which apprently is quite unreliable, but was a hint at a problem with my configuration. Apparently, using the very convenient usb tablet emulation wastes a lot of CPU cycles. So I determined to see how much of a difference there was between Qemu+KQEMU and Qemu+KQEMU with usb tablet emulation. While I was at this, I figured I would run a benchmark on the vmplayer.

Host System

CPUPentium 4 2.66GHz

Qemu+KQEMU without USB Tablet Emulation CVS 20061216
qemu -hda windowsxp.qcow -m 512 -kernel-kqemu -net nic -net tap,ifname=tap3

Qemu+KQEMU with USB Tablet Emulation CVS 20061216
qemu -hda windowsxp.qcow -m 512 -kernel-kqemu -net nic -net tap,ifname=tap3 -usbdevice tablet

Qemu+KQEMU with USB Tablet Emulation Patch CVS 20061219
qemu -hda windowsxp.qcow -m 512 -kernel-kqemu -net nic -net tap,ifname=tap3 -usbdevice tablet

VMPlayer 1.0.2 build-29634
config.version = "8"
virtualHW.version = "3"
ide0:0.present = "TRUE"
ide0:0.filename = "winxp2.vmdk"
memsize = "512"
MemAllowAutoScaleDown = "FALSE"
ide1:0.present = "TRUE"
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"
ide1:0.autodetect = "TRUE"
floppy0.present = "FALSE"
ethernet0.present = "TRUE"
usb.present = "FALSE"
sound.present = "FALSE"
sound.virtualDev = "es1371"
displayName = "Windows XP Pro"
guestOS = "winxppro"
nvram = "winxp2.nvram"
MemTrimRate = "-1"
ide0:0.redo = ""
ethernet0.addressType = "generated"
uuid.location = "56 4d 88 59 b6 23 e5 8c-3d 31 6d 36 ad 34 c7 99"
uuid.bios = "56 4d 88 59 b6 23 e5 8c-3d 31 6d 36 ad 34 c7 99"
ethernet0.generatedAddress = "00:0c:29:34:c7:99"
ethernet0.generatedAddressOffset = "0"
tools.syncTime = "TRUE"
ide1:0.startConnected = "TRUE"
uuid.action = "create"
checkpoint.vmState = ""
tools.remindInstall = "TRUE"

I used Futuremark’s PCMark05 for no particular reason, and it was particularly cranky with my display adapters and drivers. I have no expertise or experience benchmarking anything and I do not lay claim to be a benchmarking expert. I performed these tests to determine if there was a *noticeable* difference in two particular areas. HDD I/O and memory access speeds. I am assuming that since Qemu+KQEMU and VMPlayer are both virtualization products they should perform similarly well with CPU-intensive tasks. I am not interested in finding small performance differences, I’m looking for something significant.

The percentages below are relative to the Qemu+KQEMU without USB tablet emulation. You can see that with the USB tablet emulation, Qemu is slowed to almost half the speed it would be without USB tablet emulation.

QemuQemu USB TabletQemu USB Tablet PatchVMPlayer
HDD – XP Startup5.78 MB/s4.94 MB/s5.78 MB/s9.25 MB/s
Web Page Rendering0.58 Pages/s0.26 MB/s0.48 Pages/s1.37 Pages/s
File Decryption41.8 MB/s24.44 MB/s40.23 MB/s47.91 MB/s
HDD – General Usage8.02 MB/s5.08 MB/s7.17 MB/s7.39 MB/s
MT / Audio Compression726.63 KB/s375.43 KB/s690.24 KB/s1247.69 KB/s
MT / Video Encoding90.98 KB/s47.01 KB/s86.63 KB/s115.04 KB/s
MT / Text Edit15.1 Pages/s7.51 Pages/s14.77 Pages/s45.92 Pages/s
MT / Image Decompression7.3 MPixels/s4.86 MPixels/s7.53 MPixels/s5.49 MPixels/s
MT / File Compression1.65 MB/s0.94 MB/s1.64 MB/s1.93 MB/s
MT / File Encryption11.18 MB/s7.01 MB/s9.89 MB/s13.42 MB/s
MT / HDD – Virus Scan17.14 MB/s9.53 MB/s17.61 MB/s21.4 MB/s
MT / Memory Latency – Random 16MB1.03 MAccesses/s0.31 MAccesses/s1.07 MAccesses/s4.31 MAccesses/s
Qemu USB Tablet %VMPlayer %
HDD – XP Startup85.47%160.03%
Web Page Rendering44.83%236.21%
File Decryption58.47%114.62%
HDD – General Usage63.34%92.14%
MT / Audio Compression51.67%171.71%
MT / Video Encoding51.67%126.45%
MT / Text Edit49.74%304.11%
MT / Image Decompression66.58%75.21%
MT / File Compression56.97%116.97%
MT / File Encryption62.70%120.04%
MT / HDD – Virus Scan55.60%124.85%
MT / Memory Latency – Random 16MB30.10%418.45%
Average (Completely Meaningless)56.43%171.73%

What Does It Mean?
Well, Qemu’s USB tablet emulation sucks, unless of course you really need it, then it’s great 😉 It is very interesting that the CPU speed results of Qemu vs. VMPlayer are similar and that the disk I/O speeds are also similar. Why is that interesting? Because the memory access of VMPlayer is about 4 times faster than Qemu. Almost all of the differences in performance between Qemu and VMPlayer in these results could be attributed to the memory performance differences. I consider this good news because disk I/O seems slightly faster in Qemu than VMPlayer. Once the memory access speed issue is worked out in Qemu, Qemu is likely to be faster than VMPlayer. I’m assuming that this is an issue for KQEMU or Qvm86 and that the Qemu developers can do little about it. Fabrice, what can be the culprit?