Windows XP uses 200% CPU when given 2 VCPUs

Bug #654913 reported by .:. brainsik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

When using libvirt to give a domain 2 CPUs (<domain type='kvm'><vcpu>2</vcpu></domain>), the Windows XP kvm process will use 200% CPU when Windows is idle. Switching the number of CPUs back to 1, the kvm process gives normal idle percentages.

Using libvirt 0.8.3-1ubuntu9, tried with the following qemu-kvm packages:

qemu-kvm_0.12.4+noroms-0ubuntu7_amd64.deb
qemu-kvm_0.12.5+noroms-0ubuntu4_amd64.deb

The smp flag being set by libvirt is:

-smp 2,sockets=2,cores=1,threads=1

Revision history for this message
.:. brainsik (brainsik) wrote :

It turns out, that if you use the ACPI Multiprocessor, this problem goes away. If you use MPS Multiprocessor, then this problem occurs. The worst part is if you originally built the VM without ACPI, then there is *no way* to use on the ACPI HALs in Windows XP without reinstalling. There's a ton of MS knowledge base articles about this.

Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

I think this can safely be closed - it's a known guest (winXP) behavour, as in, "use right drivers".

Changed in qemu:
status: New → Invalid
Revision history for this message
.:. brainsik (brainsik) wrote :

Can you tell me what the "right drivers" are? Or do you mean enabling "ACPI"?

I've just finished a whole slew of benchmarks and I'm going back to no-acpi with the 200% CPU issue, because the VMs are actually faster that way. Turning on ACPI is very slow.

Looking throw QEMU bug reports, I found that a single CPU WinXP guest used to use 100% CPU, but that was fixed. Why is this not considered a bug as well?

Thank you.

Changed in qemu:
status: Invalid → New
Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

What I mean is that ACPI is required nowadays for any sane SMP. Yes, enabling ACPI.

Speaking of 200% CPU for "MPS" being faster than ACPI version - maybe it's your cpufreq code, and switching from 'ondemand' to 'performance' governer will make ACPI version faster?

I see no difference in speed between ACPI and non-ACPI version of a _single_-CPU winXP, and my winXP does not boot at all (BSOD) with -smp 2 and -no-acpi. I never tried to find out why, because felt it's not the right way anyway (and it shows similar BSOD when wrongly switching between ACPI and non-ACPI in winXP on many older (PIII etc) - again, non-smp - boxes).

/mjt

Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

WinXP chews 200% CPU when switched in device manager to "MPS computer" from "ACPI computer" even if there's no -no-acpi on the kvm command line (after some tries I was able to switch it from ACPI to MPS). So it is how windows works, not how kvm works.

Changed in qemu:
status: New → Invalid
Revision history for this message
.:. brainsik (brainsik) wrote :

Thank you for looking into this issue. Do you know if later versions of Windows work better in SMP? Like 2003?

.:.

Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

I see no problems in my tests wrt SMP performance (tried two cores only so far). MPS variant in winXP works noticeable slower in my case, apparently due to CPU wastage. ACPI variant runs almost at native speed (when run in winXP booted on bare metal) - I tried some simple multi-treaded java benchmarks. So I'm not quite sure what are you asking.

Yet again, on _slightly_ loaded guest, MPS variant works a bit better, but I just confirmed by previous guess - switching to performance cpufreq governor restores that, but without CPU wastage.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.