Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEMU 8.0 performance regression on emulation #5516

Open
christophenouvel opened this issue Aug 3, 2023 · 11 comments
Open

QEMU 8.0 performance regression on emulation #5516

christophenouvel opened this issue Aug 3, 2023 · 11 comments
Labels
qemu QEMU related
Milestone

Comments

@christophenouvel
Copy link

Hi all,

I have a Windows 10 VM running acceptably fast with UTM, from the early versions to 4.2.5 (included).

I give 6 cores to reach that performance level (Mac M1 Pro).
Activity monitor shows bout 600% CPU usage for UTM.

Since 4.3.0 beta, every version including 4.3.4, VM is more than twice slower.
Activity monitor shows about 300% CPU usage.

I did not modify any VM setting.

Installing version 4.2.5 again solves the problem...

Any idea WHY??

Regards,

Christophe.
@osy
Copy link
Contributor

osy commented Aug 3, 2023

Wish you had reported this before if it happened during the beta period. Now you’ll have to wait for the next release for the fix. Anyways, post your config.plist and debug.log like the issue template asked for along with your host config details.

@christophenouvel
Copy link
Author

Sorry about being so late in reporting...

It's the first time I send debug log, hope format will be correct, it comes from launching utm in terminal.

Fist point : debug log for 4.2.5 is short, while debug log for 4.3.4 (only tried that version) is really huge!
Second point : I didn't notice "export debug" in QEMU tab of a VM before generting logs...

Debug UTM.zip

I'm surprised to be the only one confronted to this problem : UTM is the only way for me to not need and x86 Mac aside the M1 one! x86 emulation is not perfect because of relatively low performance, but it is really stable. Every % gained in speed is really appreciated. It is a great software.

This VM needs a USB smartcard reader, no problem so far, and disks are encrypted (https://www.primx.eu/fr/encryption-software/cryhod/). If the VM runs too slowly or not at all : I need 2 physical machines... Historically, this VM is converted from a VirtualBox one, running on an Intel Mac.

Regards,

Christophe.

@osy
Copy link
Contributor

osy commented Aug 5, 2023

Can you try v4.3.5? We reverted back to QEMU 7.2.0 so it would be interesting to see if QEMU is the issue.

@christophenouvel
Copy link
Author

4.3.5 is Ok from a performance point of view.
No noticeable gain, but hey : not worse than 4.2.5 and really better than 4.3.4.

@osy
Copy link
Contributor

osy commented Aug 5, 2023

So it’s expected to be the same as 4.2.5. So basically you’re confirming that QEMU 8.0 was the problem?

@christophenouvel
Copy link
Author

I confirm a performance problem between (including) 4.3.0 beta and 4.3.4, no such problem neither with 4.2.5 nor with 4.3.5.

@git2wing
Copy link

I confirm too, on ipad pro M1 , same performance problem between (including) 4.3.0 beta and 4.3.4.

@freebrowser1
Copy link

freebrowser1 commented Aug 19, 2023

I upgraded from 4.2.5 to 4.3.5 and performance of Windows 11 X64 and Ubuntu 22.04 x64 is the same, i.e. not degraded.
The Ubuntu VM was migrated from VirtualBox on an Intel Mac and the Windows 11 x64 is installed on UTM 4.2.5 on M1 Mac.

@osy osy added the qemu QEMU related label Aug 19, 2023
@osy osy added this to the Future milestone Aug 19, 2023
@osy osy changed the title X86 emulation twice slower since 4.3.0beta... QEMU 8.0 performance regression on emulation Aug 19, 2023
@AwlsomeAlex
Copy link

AwlsomeAlex commented Dec 13, 2023

@osy Hoping that this could be useful for a recreate...

Running on an M1 Pro 16" MacBook Pro (macOS 14.2) using UTM 4.4.5 and qemu 8.1.3.
utm-qemu.txt
qemu.txt

2 CPUs, 2GB of ram. Forced MBR boot. Just let it sit on the boot menu.
You'll notice in Activity Monitor that QEMULauncher pegs the CPU at 200%, whereas qemu should sit around 20%.

Once you tell each to load, you'll notice the CPU % for QEMULauncher go up to 300%, whereas qemu only goes up to 150%. As far as I can tell each are told to use 2 CPU cores and use the same acceleration.

qemu.mov

It's not a complete one-to-one since I couldn't get homebrew qemu working with spice... but maybe it's something to work off of? I don't notice a significant difference in performance.

(Tribblix was just the only x86_64 ISO I had lying around ¯_(ツ)_/¯)

@stuaxo
Copy link

stuaxo commented Feb 10, 2024

I'm vaguely hoping 8.2.1 will fix the freeze issues I see regularly.

@volkert-fastned
Copy link

Since this issue apparently specifically pertains to Windows guests, would it be possible to enhance UTM to select a major version of QEMU (7.x, 8.x, or 9.x) for each VM? This way, the advantages of the newer major QEMU versions could at least be made available for non-Windows guests, notably Linux guests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qemu QEMU related
Projects
None yet
Development

No branches or pull requests

7 participants