Does QEMU’s performance (still) lag VirtualBox’s and is there a way to improve it without the hardware support+kvm kernel module

qemuvirtualboxvirtualization

I've noticed several articles that have claimed that QEMU is slower than VirtualBox (without hardware assistance) but several are years old, and the newest seemed to be from last year.

  • Is it true that QEMU is slower than VirtualBox?
  • If so why?
  • Are there any tricks to close the performance gap?

Some of my host systems do not have hardware virtualization support so I'm especially interested in performance tips that work without the kernel module.

Best Answer

If you're talking about x86 virtualization on an x86 host, be advised that kqemu (the old acceleration kernel module for qemu) is deprecated. Kernel Virtual Machine (KVM) is "the way forward" but it only works on Linux hosts. The guest can be whatever OS you want as long as it's x86 architecture.

Cross-architecture, qemu is still really slow; just today I was trying latest qemu with Debian MIPS64 in the guest.... it was usable from a terminal but horribly slow in Xorg. to the best of my knowledge, you can't use processor acceleration instructions like extended page tables or VT-x when you're going cross-architecture. It's all emulated in software.

So for x86 to x86 virtualization, "raw" qemu is slow, but KVM (which uses qemu) is fast. Quite fast. So fast that it's Red Hat's recommended virtualization solution for RHEL.

VirtualBox still blows away anything qemu/kvm can offer in terms of hardware-accelerated 2d/3d graphics performance, because kvm focuses on server virtualization and virtualbox focuses on desktop virtualization. But I'd definitely recommend that you check out kvm if you dealing with a server.

Edit: For your hosts that don't have any hardware acceleration, you're going to suffer from a pretty large overhead regardless of which virt solution you use. Emulating hardware things in software is hard, and expensive.