qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Win10 always takes 100% cpu power even when idle
@ 2021-03-17 16:11 Reinoud Zandijk
  2021-03-17 16:18 ` Daniel P. Berrangé
  0 siblings, 1 reply; 5+ messages in thread
From: Reinoud Zandijk @ 2021-03-17 16:11 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]

Hi,

when executing Qemu with

  qemu-system-x86_64 -m 4G -smp cores=2 -M q35 -snapshot \
    -drive file=/home/reinoud/Downloads/Win10-demo.raw,format=raw \
    -rtc base=localtime,clock=host -spice port=5924,disable-ticketing=on \
    -vga qxl -usb -device usb-tablet -net nic -net tap,ifname=tap0,script=no

my cpu usage in Windows10 *allways* reports 100% cpu usage. On the host system
its always 190%+ ie it is really taking two cores completely.

Using our NVMM accelerator makes it run a whole lot faster, as good as native
speed, but it always takes up the whole two processors too! Windows10 also
*allways* reports 100% cpu usage. Its not a startup thing for even when
letting it run for quite some time never reduces the cpu time.

In contrast, running NetBSD in the VM takes no CPU time at all when idle.

When Googling about this, I saw this come by quite often. Is there something
Qemu can do about this? What makes it spin like this and why is it Windows10
specific? This is a specific VM aware version too if I may believe it saying
so. I already replaced drivers to virtio etc but to no avail. Always 100% CPU
time for all CPUs.

Could this also be an ACPI thing?

With regards,
Reinoud


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Win10 always takes 100% cpu power even when idle
  2021-03-17 16:11 Win10 always takes 100% cpu power even when idle Reinoud Zandijk
@ 2021-03-17 16:18 ` Daniel P. Berrangé
  2021-03-17 17:00   ` Reinoud Zandijk
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel P. Berrangé @ 2021-03-17 16:18 UTC (permalink / raw)
  To: Reinoud Zandijk; +Cc: qemu-devel

On Wed, Mar 17, 2021 at 05:11:22PM +0100, Reinoud Zandijk wrote:
> Hi,
> 
> when executing Qemu with
> 
>   qemu-system-x86_64 -m 4G -smp cores=2 -M q35 -snapshot \
>     -drive file=/home/reinoud/Downloads/Win10-demo.raw,format=raw \
>     -rtc base=localtime,clock=host -spice port=5924,disable-ticketing=on \
>     -vga qxl -usb -device usb-tablet -net nic -net tap,ifname=tap0,script=no
> 
> my cpu usage in Windows10 *allways* reports 100% cpu usage. On the host system
> its always 190%+ ie it is really taking two cores completely.
> 
> Using our NVMM accelerator makes it run a whole lot faster, as good as native
> speed, but it always takes up the whole two processors too! Windows10 also
> *allways* reports 100% cpu usage. Its not a startup thing for even when
> letting it run for quite some time never reduces the cpu time.
> 
> In contrast, running NetBSD in the VM takes no CPU time at all when idle.
> 
> When Googling about this, I saw this come by quite often. Is there something
> Qemu can do about this? What makes it spin like this and why is it Windows10
> specific? This is a specific VM aware version too if I may believe it saying
> so. I already replaced drivers to virtio etc but to no avail. Always 100% CPU
> time for all CPUs.
> 
> Could this also be an ACPI thing?

IIRC,  "-usb" still adds a USB-1 controller and that's known to be bad
for causing high load in Windows guests in particular. So before
debugging anything else, I'd suggest configuring a USB-3 controller
instead - see docs/usb2.txt XHCI info.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Win10 always takes 100% cpu power even when idle
  2021-03-17 16:18 ` Daniel P. Berrangé
@ 2021-03-17 17:00   ` Reinoud Zandijk
  2021-03-17 17:05     ` Daniel P. Berrangé
  0 siblings, 1 reply; 5+ messages in thread
From: Reinoud Zandijk @ 2021-03-17 17:00 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

On Wed, Mar 17, 2021 at 04:18:53PM +0000, Daniel P. Berrangé wrote:
> On Wed, Mar 17, 2021 at 05:11:22PM +0100, Reinoud Zandijk wrote:
> > when executing Qemu with
> > 
> >   qemu-system-x86_64 -m 4G -smp cores=2 -M q35 -snapshot \
> >     -drive file=/home/reinoud/Downloads/Win10-demo.raw,format=raw \
> >     -rtc base=localtime,clock=host -spice port=5924,disable-ticketing=on \
> >     -vga qxl -usb -device usb-tablet -net nic -net tap,ifname=tap0,script=no
> > 
> > my cpu usage in Windows10 *allways* reports 100% cpu usage. On the host system
> > its always 190%+ ie it is really taking two cores completely.

> IIRC,  "-usb" still adds a USB-1 controller and that's known to be bad for
> causing high load in Windows guests in particular. So before debugging
> anything else, I'd suggest configuring a USB-3 controller instead - see
> docs/usb2.txt XHCI info.

I tried that and added `-device qemu-xhci' instead of the `-usb' and it indeed
showed an USB 3 interface. It didn't help though; its still consuming 100% CPU
from both configured CPUs.

When I completely remove USB, i get the jagged mouse again but it makes no
difference :-/

Reinoud


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Win10 always takes 100% cpu power even when idle
  2021-03-17 17:00   ` Reinoud Zandijk
@ 2021-03-17 17:05     ` Daniel P. Berrangé
  2021-03-17 21:29       ` Reinoud Zandijk
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel P. Berrangé @ 2021-03-17 17:05 UTC (permalink / raw)
  To: Reinoud Zandijk; +Cc: qemu-devel

On Wed, Mar 17, 2021 at 06:00:37PM +0100, Reinoud Zandijk wrote:
> On Wed, Mar 17, 2021 at 04:18:53PM +0000, Daniel P. Berrangé wrote:
> > On Wed, Mar 17, 2021 at 05:11:22PM +0100, Reinoud Zandijk wrote:
> > > when executing Qemu with
> > > 
> > >   qemu-system-x86_64 -m 4G -smp cores=2 -M q35 -snapshot \
> > >     -drive file=/home/reinoud/Downloads/Win10-demo.raw,format=raw \
> > >     -rtc base=localtime,clock=host -spice port=5924,disable-ticketing=on \
> > >     -vga qxl -usb -device usb-tablet -net nic -net tap,ifname=tap0,script=no
> > > 
> > > my cpu usage in Windows10 *allways* reports 100% cpu usage. On the host system
> > > its always 190%+ ie it is really taking two cores completely.
> 
> > IIRC,  "-usb" still adds a USB-1 controller and that's known to be bad for
> > causing high load in Windows guests in particular. So before debugging
> > anything else, I'd suggest configuring a USB-3 controller instead - see
> > docs/usb2.txt XHCI info.
> 
> I tried that and added `-device qemu-xhci' instead of the `-usb' and it indeed
> showed an USB 3 interface. It didn't help though; its still consuming 100% CPU
> from both configured CPUs.
> 
> When I completely remove USB, i get the jagged mouse again but it makes no
> difference :-/

Possibly you need some of the hyperv enlightenments enabled too. Though
I can't recall the precise command line offhand, as I just rely on
virt-install virt-manager to do the right thing for Windows guests.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Win10 always takes 100% cpu power even when idle
  2021-03-17 17:05     ` Daniel P. Berrangé
@ 2021-03-17 21:29       ` Reinoud Zandijk
  0 siblings, 0 replies; 5+ messages in thread
From: Reinoud Zandijk @ 2021-03-17 21:29 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

Hi,

On Wed, Mar 17, 2021 at 05:05:39PM +0000, Daniel P. Berrangé wrote:
> Possibly you need some of the hyperv enlightenments enabled too. Though
> I can't recall the precise command line offhand, as I just rely on
> virt-install virt-manager to do the right thing for Windows guests.

HuperV support/emulation is only available under KVM and thus only under
Linux, so that is not going to help :-/

My question is more on what causes this? Say a 10% to 20% cpu usage loss due
to IPI's and interrupts not working as smooth as could be is not nice but
workable, a 200% constant cpu usage that makes it unresponsive and bog slow is
unworkable.

Is some interrupt never cleared correctly and constantly triggered? Is the
pauze/wait for interrupt not implemented correctly? Regardless of which
accelerator, basic TCG doesn't work either. And why don't the BSDs and Linux
as guests suffer from this?

How to trace this? Is there something I could trace that details this
behaviour?

With regards,
Reinoud


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-17 21:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 16:11 Win10 always takes 100% cpu power even when idle Reinoud Zandijk
2021-03-17 16:18 ` Daniel P. Berrangé
2021-03-17 17:00   ` Reinoud Zandijk
2021-03-17 17:05     ` Daniel P. Berrangé
2021-03-17 21:29       ` Reinoud Zandijk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).