[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-09-16 Thread Bug Watch Updater
Launchpad has imported 2 comments from the remote bug at https://bugzilla.redhat.com/show_bug.cgi?id=1851244. If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://hel

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-26 Thread Kevin Locke
I agree that QEMU shouldn't use much CPU when paused, regardless of VM settings. For reference, I narrowed down a (more) minimal test case: Using the Windows 10 May 2020 English 64-bit ISO from https://www.microsoft.com/en-us/software-download/windows10ISO qemu-system-x86_64 \ -no-user-c

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-26 Thread Pedro Côrte-Real
Thanks for pursuing this. I tried those settings and my paused VM now uses less than 1% CPU when before it used around 3%. So although I haven't been able to reproduce the ~30% CPU usage of before it was still an improvement. It's still odd to me that a paused VM consumes any CPU at all but at leas

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-25 Thread Christian Ehrhardt 
** Also affects: virt-manager (Ubuntu) Importance: Undecided Status: New ** Bug watch added: Red Hat Bugzilla #1851244 https://bugzilla.redhat.com/show_bug.cgi?id=1851244 ** Also affects: virt-manager via https://bugzilla.redhat.com/show_bug.cgi?id=1851244 Importance: Unknown

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-25 Thread Kevin Locke
I re-opened the discussion that @Christian found on the kvm mailing list and Paolo Bonzini helped identify a fix: enabling the Hyper-V hv_stimer enlightenment. Although it may not fix the issue for guests which don't support that enli

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-25 Thread Christian Ehrhardt 
Hi Pedro, it is more like "while still running the guest programs the rtc timers" then later on when the guest is paused no guest code runs, but this bit seems to be something the host can't pause continue. I'm not deep enough into (virt)timer programming to explain deeper, but that is how it ov

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-25 Thread Pedro Côrte-Real
Annoyingly (for solving the bug but not for me) I haven't been able to reproduce this in quite a while, which is why I never posted any more information. I was hoping it was fixed but apparently it's just hard to reproduce. It seems odd that the problem could be on the Windows side. I'm assuming t

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-24 Thread Christian Ehrhardt 
That is great data to have @Kevin, thank you. There is no problem at all that you've done that with some slightly other versions. The loop around KVM_IRQ_LINE_STATUS really seems interesting and certainly will help to identify things. In fact with that I already found: - https://bugzilla.redhat.

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-24 Thread Kevin Locke
** Attachment added: "pidstat concurrent with strace for high-CPU thread of paused Windows 10 VM" https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1851062/+attachment/5386880/+files/qemu-high-cpu.pidstat -- You received this bug notification because you are a member of Ubuntu Bugs, which

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2020-06-24 Thread Kevin Locke
I just ran into what I think is the same issue. Windows 10 VM controlled from virt-manager using ~30% CPU while paused. I'm attaching the output of pidstat -p $(pidof qemu-system-x86_64) -T ALL -rtuw 5 5 and the first thousand lines of strace -rT -ff -f -o paused-but-busy -p $(pidof qemu-system-x

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2019-11-13 Thread Pedro Côrte-Real
As far as I can tell qemu will stay at 30% indefinitely in these situations. I'll produce more diagnostics when I can reproduce it again. One possible clue is that this may be happening when the VM is waiting for network responses. I'm not certain of that but it definitely doesn't happen just becau

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2019-11-13 Thread Christian Ehrhardt 
Interesting, so the main qemu in the host consumes ~17% user and ~18% system while this is going on. And this goes on for at least the 15 seconds we traced things (and from your report I assume it keeps going on). We also see context switches, but no faults - this really just seems to "do somethi

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2019-11-12 Thread Pedro Côrte-Real
Unpausing the VM, letting it get to a lower level of CPU usage and then pausing again brings qemu to the more usual ~2% of continuous CPU usage. Which still seems high but isn't as bad. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. h

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2019-11-12 Thread Pedro Côrte-Real
Here's an example where the VM was at 100% CPU when I paused it to not have it consume as much CPU as I wasn't using it. After pausing it is now at 30% CPU usage continuously even though it's paused. ** Attachment added: "qemu-stats" https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1851062/

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2019-11-06 Thread Pedro Côrte-Real
I can't replicate this on demand. Doing it now only gave me 3% CPU usage. I'll keep an eye on this and run this diagnostic when it's happening again. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/18510

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2019-11-06 Thread Christian Ehrhardt 
Thank you for taking the time to report this bug and helping to make Ubuntu better. Since there isn't enough information in your report to differentiate between a local configuration problem and a bug in Ubuntu, I'm marking this bug as Incomplete. If indeed this is a local configuration problem,

[Bug 1851062] Re: Qemu using CPU even when the VM is paused

2019-11-06 Thread Christian Ehrhardt 
A paused guest still can have some action in I/O threads or UI, but 15% seems a lot. None of the automatic logs helps for this. You should gather some metrics which thread is using the CPU and where. pidstat -p $(pidof qemu-system-x86_64) -T ALL -rtuw 5 5 Report that back here on the bug to dis