KVM eats 100% CPU, Host Hardy64, Guest XP with more than 1 VCPU

Bug #228442 reported by reference2myself
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kvm (Ubuntu)
Confirmed
Low
Unassigned
virt-manager (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: kvm

KVM eats 100% of my processing power when running XP with more then 1 Virtual CPU on my dual core processor. Running Ubuntu Hardy Heron 8.04 AMD64. KVM installed from the repository version 1:62+dfsg-0ubuntu7. Have and AMD Athlon X2 5600 with virtualization turned on in the bios. XP runs fine if I set it up to use just one processing core, but eats my processor if using two. I tried several different coppies of Windows XP with the same result. It works fine for Windows Vista using both cores. I'm using virt-manager to set it all up and run it.

Revision history for this message
reference2myself (reference2myself) wrote :

This problem seems to be related to xp running with no ACPI, I installed xp again but told virt-manager it was vista and the 2 cores worked fine, but of course it would freeze when shutting down and restarting to I switched from ACPI to Standard PC and it only used one core.

Revision history for this message
graylion (graylion) wrote :

same effect on Intrepid with guest intrepid server. guest hardy server works, geust intrepid starts overheating all 4 cores on my phenom when I boot the installation CD image and select "install server"

architecture host and guest AMD64

Changed in kvm:
importance: Undecided → High
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Marking this bug against virt-manager.

If you disable ACPI, you can't do SMP.

This has been fixed in upstream virt-manager. The fix should be relatively small, which would stop disabling ACPI on WinXP guests by default.

:-Dustin

Changed in kvm:
status: New → Invalid
Changed in virt-manager:
importance: Undecided → High
status: New → Triaged
Revision history for this message
hatsch (hatsch) wrote :

i have the same problem here. with 8.10 host and 8.10-server and 8.10-virtual guest . . .
with and without acpi enabled....

Revision history for this message
ubumike (info-mmgust) wrote :

Same Problem with jaunty host and suse 10.1 guest

Revision history for this message
ubumike (info-mmgust) wrote :

with and without acpi, with 1 or more cpu's

Revision history for this message
unggnu (unggnu) wrote :

I can confirm this problem with Jaunty but only for XP. 32 and 64 Bit Vista and Ubuntu 8.10 working fine without high cpu usage.

Linux uber 2.6.28-11-generic #36-Ubuntu SMP Fri Mar 20 19:51:24 UTC 2009 x86_64 GNU/Linux

Revision history for this message
elventear (elventear) wrote :

Is there a workaround for this issue?

I am experimenting this on a Quad-Core 64-Bit AMD running 32-bit Windows XP.

Revision history for this message
elventear (elventear) wrote :

On Jaunty, I must add ...

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 228442] Re: KVM eats 100% CPU, Host Hardy64, Guest XP with more than 1 VCPU

Anyone experiencing this issue on Jaunty:
 * Can you please try to install the kvm-source package on the host
and try to recreate the issue? This will build and install an updated
kvm module.

Anyone experiencing this on Intrepid/Hardy:
 * Can you please install the kvm-84 kvm and kvm-source packages from
the ~ubuntu-virt PPA, and try to recreate the issue?

:-Dustin

Revision history for this message
elventear (elventear) wrote : Re: [Bug 228442] Re: KVM eats 100% CPU, Host Hardy64, Guest XP with more than 1 VCPU

On May 5, 2009, at 9:33 AM, Dustin Kirkland wrote:

> Anyone experiencing this issue on Jaunty:
> * Can you please try to install the kvm-source package on the host
> and try to recreate the issue? This will build and install an updated
> kvm module.

I had this module already installed. Is it supposed to automatically
build and install? I tried to manually build:

root@utumno:/usr/src/kvm-84# make clean
make -C M=`pwd` clean
make: *** M=/usr/src/kvm-84: No such file or directory. Stop.
make: *** [clean] Error 2
root@utumno:/usr/src/kvm-84# make all
rm -f include/asm include-compat/asm
ln -sf asm-x86 include/asm
ln -sf asm-x86 include-compat/asm
make -C M=`pwd` \
  LINUXINCLUDE="-I`pwd`/include -Iinclude \
   \
  -Iarch/x86/include -I`pwd`/include-compat \
  -include include/linux/autoconf.h \
  -include `pwd`/x86/external-module-compat.h "
make: *** M=/usr/src/kvm-84: No such file or directory. Stop.
make: *** [all] Error 2
root@utumno:/usr/src/kvm-84#

Revision history for this message
elventear (elventear) wrote :

I found a solution to the problem in Jaunty.

To use SMP efficiently with Windows you need the ACPI Multiprocessor HAL profile. It seems you can only get it during the install if Windows detects that your HW fits that profile. The only solution I've found so far is to reinstall with ACPI enabled and make sure during install that the Multiprocessor HAL is selected.

The problem, in my case, is that virt-install did not enable ACPI even though I had asked it to do so.

Revision history for this message
DesktopMan (christian-auby) wrote :

Not sure if more information is needed at this point, but this bug also affects me. Setup:
Jaunty 64bit
kvm 1:84+dfsg-0ubuntu12.1~ppa6
no acpi or apic
1 or 2 cpus, doesn't matter

From what Dustin says ACPI + XP has been fixed? Am I understanding that correctly?

Revision history for this message
Jery Wang (jery-wang2002) wrote :

Yes, confirmed high CPU utilization:
Host OS:
Ubuntu Jaunty:
Linux ======= 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009 x86_64 GNU/Linux
Using:
AMD Phenom II X4 810 with 4 GB RAM, 2 x 500 GB, configured as RAID 1 using linux.

Guest OS:
XP Professional 32bit SP3
I allocated 2 CPU and 512 MB RAM, 40GB hardisk image.

2 out 4 CPU shows 100% CPU utilization.

Not good.

Revision history for this message
Jery Wang (jery-wang2002) wrote :

Additional info:

Although the Guest OS (XP Pro 32 bit)'s Task Manager shows idle CPU utilization.

Revision history for this message
Jery Wang (jery-wang2002) wrote :

Additional Info:

And it doesn't turn off automatically when I shut down the XP Guest OS

Revision history for this message
Soren Hansen (soren) wrote :

> Marking this bug against virt-manager.

Well, that's just silly:

> If you disable ACPI, you can't do SMP.

Then kvm should refuse to try, surely?

Soren Hansen (soren)
Changed in kvm (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Penguinhunter (jbovee-thehybridtech) wrote :

I believe this is a known issue for Windows XP VM's.
Do you have hardware virtualization?
Many older CPU's do not have support for virtualization and this is known to cause Windows XP x32 VM's to run the processing power all the way up. Vista and XP x64 have support for 'lazy IRQL' which allows them to bypass this need.

Revision history for this message
Soren Hansen (soren) wrote :

virt-manager (actually virtinst) correctly enables ACPI now for WinXP on kvm. Marking fix released for virt-manager.

Changed in virt-manager (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote :

Downgrading to confirmed/low based on that : this bug is fixed in virt-manager, but KVM could still refuse to try to do multiple VCPU when ACPI is disabled (rather than trying and failing at it).

Changed in kvm (Ubuntu):
importance: High → Low
status: Incomplete → Confirmed
Revision history for this message
Marcelo Boveto Shima (marceloshima) wrote :

Windows XP does not allow changing from non-acpi to acpi hal:
http://support.microsoft.com/kb/315278
and
http://support.microsoft.com/kb/309283

But as a workaround you can go to
Device Manager -> Computer -> MPS Multiprocessor
and update the driver to Standard PC.

This will give 1 idle processor to Windows instead of full workload cpus.

Revision history for this message
P (p92) wrote :

the comment #22 works perfectly with my xp VMs - I also set only one vcpu and acpi+apic enabled on these VMs

Revision history for this message
D.Schäfer (trash4you) wrote :

thanks to #22 it works and save my day :)

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.