Qemu varying performance
Running Debian's vmlinux-2.6.32-5-4kc-malta under qemu-system-mips works very well--the system is fast, and when it is idle the qemu-system-mips process on the host system consumes insignificant CPU. (The same is true for qemu-system-mipsel, using the correesponding 'el' Debian kernel.)
But running Debian's 64-bit kernel vmlinux-2.6.32-5-5kc-malta under qemu-system-mips64 consumes 100% on the host system, whether the guest is idle or busy. (And for qemu-system-mips64el, the same is true for the corresponding 64-bit el kernel.)
This cpu usage makes it somewhat inconvenient to let the qemu processes stay running. Is there anything that can be done about the cpu usage? Is it a Linux problem (say, that the 64-bit kernel fails to invoke some clever system sleep instruction when in the idle loop), or is it a qemu problem?
Another issue I ran into what the sh4 qemu performance. It is much worse than other qemu ports (except perhaps ppc64). What is the reason behind that? (The idle thing works well for sh4, though.)
My host system runs FreeBSD 8.2. The Debian installs all use 6.0.2.
Signature · 1 line
Torbjörn
Am 28.09.2011 02:25, schrieb Torbjorn Granlund:
Quoted 5 lines
Another issue I ran into what the sh4 qemu performance. It is much worse than other qemu ports (except perhaps ppc64). What is the reason behind that? (The idle thing works well for sh4, though.)
My host system runs FreeBSD 8.2. The Debian installs all use 6.0.2.
Is your host 32-bit? Which architecture?
Andreas
Andreas Färber <[email protected]> writes:
Am 28.09.2011 02:25, schrieb Torbjorn Granlund:
Quoted 5 lines
Another issue I ran into what the sh4 qemu performance. It is much worse than other qemu ports (except perhaps ppc64). What is the reason behind that? (The idle thing works well for sh4, though.)
My host system runs FreeBSD 8.2. The Debian installs all use 6.0.2.
Is your host 32-bit? Which architecture?
It is an amd64 system. The CPU is a 6-core 3.2 GHz Phenom 2. The system has 16 GB RAM. It is running the 64-bit version of FreeBSD.
The simulated system has only 64 MiB of RAM, but this is not the problem; my usage of the system requires just a few MiB.
Signature · 1 line
Torbjörn
Quoted 11 lines · Torbjorn Granlund
Running Debian's vmlinux-2.6.32-5-4kc-malta under qemu-system-mips works very well--the system is fast, and when it is idle the qemu-system-mips process on the host system consumes insignificant CPU. (The same is true for qemu-system-mipsel, using the correesponding 'el' Debian kernel.)
But running Debian's 64-bit kernel vmlinux-2.6.32-5-5kc-malta under qemu-system-mips64 consumes 100% on the host system, whether the guest is idle or busy. (And for qemu-system-mips64el, the same is true for the corresponding 64-bit el kernel.)
Quoted 5 lines
This cpu usage makes it somewhat inconvenient to let the qemu processes stay running. Is there anything that can be done about the cpu usage? Is it a Linux problem (say, that the 64-bit kernel fails to invoke some clever system sleep instruction when in the idle loop), or is it a qemu problem?
Hi, It could be any of them or both. You'll have to dig a bit deeper and see if WAIT insns are beeing issued and if QEMU is successfully decoding them etc.
Quoted 3 lines
Another issue I ran into what the sh4 qemu performance. It is much worse than other qemu ports (except perhaps ppc64). What is the reason behind that? (The idle thing works well for sh4, though.)
IIRC, the SH has an MMU that is a bit problematic wrt performance in QEMU.
Cheers
Quoted 4 lines · Edgar E. Iglesias
But running Debian's 64-bit kernel vmlinux-2.6.32-5-5kc-malta under qemu-system-mips64 consumes 100% on the host system, whether the guest is idle or busy. (And for qemu-system-mips64el, the same is true for the corresponding 64-bit el kernel.)
Hi, It could be any of them or both. You'll have to dig a bit deeper and see if WAIT insns are beeing issued and if QEMU is successfully decoding them etc.
Thanks for this advice!
I naively ran 'objdump -dw' on the kernel, looked for wait, and thanks to the naming of kernel idle loop functions, was able to make educated guesses about which processors would be fed the 'wait' instruction.
The feeble conclusion made, that passing '-cpu 5Kc' to qemu-system-mips64{el,} would help, turned out to be correct--now my mips64 systems uses insignificant host CPU when they idle.
Signature · 1 line
Torbjörn