Qemu - Same vs different host-guest architecture virtual machines performance

I have a plan to run multiple guests inside an x86_64 host to provide various small, simple services. The guest OS of choice is OpenWrt, which is lightweight but still get the job done. OpenWrt provides various images for multiple architectures: x86, x86_64, armhf, aarch64, mips...

Without KVM , will the performance suffer if I decide to run a VM of different architecture than the host's? For example arm VMs on an x86_64 host, or x86 guests on a Raspberry Pi board... compared to same host-guest architecture? The emulator is QEMU, if it matters.

FYI: I also have a plan to install OpenWrt on a Raspberry Pi 4 and run multiple virtual machines on it too.

Yes, for maximum performance, your guests' architecture should be as close as possible to your host's.


in a nutshell yes. your question is really a general qemu question... and would be better asked at the relevant qemu support channel...

generally though, the way to look at it is this...;

  • non x64 host = differences
  • each guest-arch + qemu version = differences

best thing to do is just try it and see...

1 Like

It is normal for a software to be asked on a distro support forum. Unfortunately I found no good benchmark tools on OpenWrt. So a precise test number is not possible.

yeah, it is a reasonable question to be asked of the distro itself... the point i'm making here is that the software quirbles with relation to what you've asked far outweigh the hardware ones... of which it seems your initial question seemed to overfocus. seeking support from the relevant channel doesn't make your question abnormal.

never had that issue

After 3 months learning QEMU full time, I can finally answer my own question 2 years ago. First, you must understand what QEMU does and what KVM does.

QEMU does emulation of all hardware, including CPU. The emulated CPU has decent performance, but it is no match for KVM. KVM enable a physical CPU to be shared between multiple operating systems -- in other word, the virtual machine instructions shall be executed directly on the host physical CPU, not on an emulated CPU.

So, it is best to use a host architecture where KVM is supported (aarch64 and x86_64) and run a QEMU virtual machine of the same architecture.

Even if KVM is not supported (mipsel for example), there is no reason to emulate a foreign architecture. Differences between architectures lead to difficulties in emulation, and result in performance penalties (such as emulating the PlayStation 3 Cell architecture on x86_64).

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.