0

I am doing some tests on the performance of QEMU (qemu-system-i386) in full emulation mode (with TCG), and avoiding KVM. I have installed the version available in the debian repository (QEMU emulator version 1.1.2 (Debian 1.1.2+dfsg-6a+deb7u6), and downloaded and compiled the sources for Qemu 2.3.0, Qemu 1.0.0, Qemu 1.1.2, and also the source for Debian 1.1.2+dfsg-6a+deb7u6.

I am configuring the project in the following way, in all cases: ./configure --enable-sdl --target-list=i386-softmmu --disable-kvm --enable-tcg-interpreter

The version installed from the repository is quite faster than any of the versions manually compiled. I am always using the same image for the hard drive). I have ensured that kvm is never enabled or loaded: * Querying qemu (info kvm) * Looking for loaded drivers (lsmod | grep kvm), and (ls /dev/kvm).

Kvm is not loaded in any of the cases.

I have also tried to change the -O2 by -O3 in the configuration file, and stripped the symbols in the binary (which should not be a difference).

I must be missing something (default configuration for the debian package, compilation options... but I cannot figure out what).

Which could be the reason for this performance difference? (Any idea, experience?)

Thank you very much!

4

1 回答 1

1

这里的问题是您要配置的“--enable-tcg-interpreter”参数。这会为主机 CPU 禁用通常的基于 JIT 的 TCG 后端,转而使用慢速解释后端。除非 QEMU 根本不支持您的主机 CPU,否则您永远不需要解释器;正如您所发现的,它明显比默认的 JIT 慢。

于 2015-05-12T19:21:54.083 回答