XP smp using a lot of CPU
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything.
Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)?
If it's real, is there anything I can do about it?
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32 bit version of XP pro installed, now fully patched (including the Windows Genuine Advantage stuff, though I cancelled it when it wanted to run).
Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
Thanks for any assistance.
Signature · 5 lines
Ross Boylan wk: (415) 514-8146 185 Berry St #5700 [email protected] Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San Francisco San Francisco, CA 94107-1739 hm: (415) 550-1062
Hi,
I'm facing the same problem here.
A Windows XP (SP3 + all current Updates) which uses constantly ~95% CPU on each core.
I've already tried:
- Using only 1 core
- Replacing the HAL in Windows
- Using another KVM version
- Using different timer options for KVM
I'm currently on KVM-85 where the problem still exists.
Regards, Elias P.
Quoted 19 lines · On Wednesday 13 May 2009 02:41:38 Ross Boylan wrote:
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything.
Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)?
If it's real, is there anything I can do about it?
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32 bit version of XP pro installed, now fully patched (including the Windows Genuine Advantage stuff, though I cancelled it when it wanted to run).
Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
Thanks for any assistance.
Quoted 9 lines · Ross Boylan
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything.
Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)?
If it's real, is there anything I can do about it?
Quoted 10 lines
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32 bit version of XP pro installed, now fully patched (including the Windows Genuine Advantage stuff, though I cancelled it when it wanted to run).
Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
I'm guessing Windows uses a pio port to sleep, which kvm doesn't support. Can you provide kvm_stat output?
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
Quoted 15 lines · Avi Kivity
Quoted 14 lines · Ross Boylan
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything.
Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)?
If it's real, is there anything I can do about it?
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32 bit version of XP pro installed, now fully patched (including the Windows Genuine Advantage stuff, though I cancelled it when it wanted to run).
Quoted 8 lines
Quoted 5 lines
Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
I'm guessing Windows uses a pio port to sleep, which kvm doesn't support. Can you provide
kvm_statoutput?
Could this be what has happened to Windows 2000 as well? (kvm-Bugs-2314737)
Task manager in the guest shows both CPUs idle, but on the host it shows 200% CPU almost constantly.
ucwb-0119:/home/kmshanah/kvm/kvm-85# ./kvm_stat -1 efer_reload 0 0 exits 5454894602 4839 fpu_reload 5311150 5 halt_exits 200719 1 halt_wakeup 200218 1 host_state_reload 1951410204 1869 hypercalls 0 0 insn_emulation 1391377570 1393 insn_emulation_fail 52 0 invlpg 92034019 1 io_exits 1042421930 694 irq_exits 1545221935 1874 irq_injections 450100320 448 irq_window 225291775 245 kvm_request_irq 0 0 largepages 0 0 mmio_exits 484805 0 mmu_cache_miss 26346459 4 mmu_flooded 21532314 4 mmu_pde_zapped 886970 0 mmu_pte_updated 52882039 4 mmu_pte_write 70044961 6 mmu_recycled 1102 0 mmu_shadow_zapped 26384127 4 mmu_unsync 7671 0 mmu_unsync_global 0 0 nmi_injections 0 0 nmi_window 0 0 pf_fixed 421444565 167 pf_guest 34545643 1 remote_tlb_flush 125039581 9 request_nmi 0 0 signal_exits 1 0 tlb_flush 749126829 284
Regards,
Kevin.
Quoted 15 lines · Avi Kivity
Quoted 14 lines · Ross Boylan
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything.
Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)?
If it's real, is there anything I can do about it?
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32 bit version of XP pro installed, now fully patched (including the Windows Genuine Advantage stuff, though I cancelled it when it wanted to run).
Quoted 8 lines
Quoted 5 lines
Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
I'm guessing Windows uses a pio port to sleep, which kvm doesn't support. Can you provide
kvm_statoutput?
markov:~# kvm_stat -1 efer_reload 0 0 exits 9921384 566 fpu_reload 267970 0 halt_exits 1 0 halt_wakeup 3 0 host_state_reload 4026050 17 hypercalls 0 0 insn_emulation 1329455 0 insn_emulation_fail 154 0 invlpg 176773 0 io_exits 3818270 0 irq_exits 1434046 566 irq_injections 326730 0 irq_window 164827 0 largepages 0 0 mmio_exits 35892 0 mmu_cache_miss 29760 0 mmu_flooded 19908 0 mmu_pde_zapped 15557 0 mmu_pte_updated 82088 0 mmu_pte_write 97990 0 mmu_recycled 0 0 mmu_shadow_zapped 43276 0 mmu_unsync 891 0 mmu_unsync_global 0 0 nmi_injections 0 0 nmi_window 0 0 pf_fixed 1231164 0 pf_guest 276083 0 remote_tlb_flush 115606 0 request_irq 0 0 request_nmi 0 0 signal_exits 5 0 tlb_flush 960198 0
This is with the VM displaying the XP "It is now safe to turn off your computer". CPU remains about 200% from kvm. Invoked with
sudo vdeq kvm -net nic,vlan=1,macaddr=52:54:a0:12:01:00 \
-net vde,vlan=1,sock=/var/run/vde2/tap0.ctl \
-std-vga -hda XP.raw \
-boot c \
-soundhw es1370 -localtime -no-acpi -m 1G -smp 2Next I'll trying fiddling with acpi.
Signature · 5 lines
Ross Boylan wk: (415) 514-8146 185 Berry St #5700 [email protected] Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San Francisco San Francisco, CA 94107-1739 hm: (415) 550-1062
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Marcelo Tosatti
Ross,
Can you confirm the qemu process CPU consumption is down to acceptable levels if you dont specify -no-acpi?
Thanks
Simply starting without -no-acpi did not help. I tried to do a Windows XP repair, but seemed to end up nasically doing a reinstall. The system now seems to be hung up.
I'm probably going to end up trying a fresh install; I'll report more results when I have them.
Quoted 84 lines · Ross Boylan
Quoted 81 lines · Avi Kivity
Quoted 15 lines
Quoted 14 lines · Ross Boylan
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything.
Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)?
If it's real, is there anything I can do about it?
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32 bit version of XP pro installed, now fully patched (including the Windows Genuine Advantage stuff, though I cancelled it when it wanted to run).
Quoted 8 lines
Quoted 5 lines
Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
I'm guessing Windows uses a pio port to sleep, which kvm doesn't support. Can you provide
kvm_statoutput?markov:~# kvm_stat -1 efer_reload 0 0 exits 9921384 566 fpu_reload 267970 0 halt_exits 1 0 halt_wakeup 3 0 host_state_reload 4026050 17 hypercalls 0 0 insn_emulation 1329455 0 insn_emulation_fail 154 0 invlpg 176773 0 io_exits 3818270 0 irq_exits 1434046 566 irq_injections 326730 0 irq_window 164827 0 largepages 0 0 mmio_exits 35892 0 mmu_cache_miss 29760 0 mmu_flooded 19908 0 mmu_pde_zapped 15557 0 mmu_pte_updated 82088 0 mmu_pte_write 97990 0 mmu_recycled 0 0 mmu_shadow_zapped 43276 0 mmu_unsync 891 0 mmu_unsync_global 0 0 nmi_injections 0 0 nmi_window 0 0 pf_fixed 1231164 0 pf_guest 276083 0 remote_tlb_flush 115606 0 request_irq 0 0 request_nmi 0 0 signal_exits 5 0 tlb_flush 960198 0This is with the VM displaying the XP "It is now safe to turn off your computer". CPU remains about 200% from kvm. Invoked with
sudo vdeq kvm -net nic,vlan=1,macaddr=52:54:a0:12:01:00 \ -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl \ -std-vga -hda XP.raw \ -boot c \ -soundhw es1370 -localtime -no-acpi -m 1G -smp 2Next I'll trying fiddling with acpi.
Signature · 10 lines
Ross Boylan wk: (415) 514-8146 185 Berry St #5700 [email protected] Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San Francisco San Francisco, CA 94107-1739 hm: (415) 550-1062 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: XP smp using a lot of CPU [SOLVED]
Using ACPI fixes the problem; CPU useage is now quite low. Start line was
sudo vdeq kvm -net nic,vlan=1,macaddr=52:54:a0:12:01:00 \
-net vde,vlan=1,sock=/var/run/vde2/tap0.ctl \
-boot d -cdrom /usr/local/backup/XPProSP3.iso \
-std-vga -hda /dev/turtle/XP00 \
-soundhw es1370 -localtime -m 1G -smp 2I switched to -boot c later.
I ended up doing a fresh install; my repair got mucked up and I got the message "The requested lookup key was not found in any active activation context" when I entered a location into MSIE, including when I tried to run Windows Update. Googling showed this might indicate some permission or file corruption issues. They may have happened during my earlier (virtual) system hang.
My experience suggests a theory: if you use SMP with XP (i.e., more than 1 virtual processor) you should enable acpi, i.e., not say -no-acpi. It this is true, the advice to run windows with -no-acpi should probably be updated. It's possible single CPU systems are affected as well.
Ross
Re: XP smp using a lot of CPU [SOLVED]
Quoted 16 lines · Ross Boylan
Using ACPI fixes the problem; CPU useage is now quite low. Start line was
sudo vdeq kvm -net nic,vlan=1,macaddr=52:54:a0:12:01:00 \ -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl \ -boot d -cdrom /usr/local/backup/XPProSP3.iso \ -std-vga -hda /dev/turtle/XP00 \ -soundhw es1370 -localtime -m 1G -smp 2I switched to -boot c later.
I ended up doing a fresh install; my repair got mucked up and I got the message "The requested lookup key was not found in any active activation context" when I entered a location into MSIE, including when I tried to run Windows Update. Googling showed this might indicate some permission or file corruption issues. They may have happened during my earlier (virtual) system hang.
Quoted 4 lines
My experience suggests a theory: if you use SMP with XP (i.e., more than 1 virtual processor) you should enable acpi, i.e., not say -no-acpi. It this is true, the advice to run windows with -no-acpi should probably be updated. It's possible single CPU systems are affected as well.
I removed the note about -no-acpi from the howto on the wiki. I don't think that's been true for a long time.
--Iggy
Quoted 4 lines
Ross
Hi all,
very very interesting.
I have a similar problem but the other way round.
If my XP runs up tp 100% CPU usage "top" on the linux host reports "only" 33% cpu usage. I would expect around 50% because I only provide one core for the guest. I already increased the process priority of qemu and the io priority, nothing helped. The rest of the CPU is nearly idle, no excessive disk access this time :-)
Any Idea what this could be?
Best regards,
Erik
Quoted 19 lines · Ross Boylan
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything.
Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)?
If it's real, is there anything I can do about it?
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32 bit version of XP pro installed, now fully patched (including the Windows Genuine Advantage stuff, though I cancelled it when it wanted to run).
Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
Thanks for any assistance.
Quoted 8 lines · Erik Rull
Hi all,
very very interesting.
I have a similar problem but the other way round.
If my XP runs up tp 100% CPU usage "top" on the linux host reports "only" 33% cpu usage. I would expect around 50% because I only provide one core for the guest. I already increased the process priority of qemu and the io priority, nothing helped. The rest of the CPU is nearly idle, no excessive disk access this time :-)Any Idea what this could be?
What workload is the guest running?
What is your host cpu type (/proc/cpuinfo)?
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
Hi Avi,
here is the cpuinfo - what do you mean with "workload"? The CPU isage is around 33%.
processor : 0vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz
stepping : 2
cpu MHz : 1833.554
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2fdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3667.98
clflush size : 64
processor : 1vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz
stepping : 2
cpu MHz : 1833.554
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2fdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3666.43
clflush size : 64
Best regards,
Erik
Quoted 16 lines · Avi Kivity
Quoted 8 lines · Erik Rull
Hi all,
very very interesting.
I have a similar problem but the other way round.
If my XP runs up tp 100% CPU usage "top" on the linux host reports "only" 33% cpu usage. I would expect around 50% because I only provide one core for the guest. I already increased the process priority of qemu and the io priority, nothing helped. The rest of the CPU is nearly idle, no excessive disk access this time :-)Any Idea what this could be?
What workload is the guest running?
What is your host cpu type (
/proc/cpuinfo)?
Quoted 3 lines · Erik Rull
Hi Avi,
here is the cpuinfo - what do you mean with "workload"? The CPU isage is around 33%.
What programs is the guest running?
Signature · 1 line
error compiling committee.c: too many arguments to function
Hi Avi,
there are some .NET apps running, doing some calculations and graphic 2D display, HDD access w/ database and some TCP/IP transfer.
Best regards,
Erik
Quoted 7 lines · Avi Kivity
Quoted 3 lines · Erik Rull
Hi Avi,
here is the cpuinfo - what do you mean with "workload"? The CPU isage is around 33%.
What programs is the guest running?
Quoted 4 lines · Erik Rull
Hi Avi,
there are some .NET apps running, doing some calculations and graphic 2D display, HDD access w/ database and some TCP/IP transfer.
Are you using qcow2? What is your qemu command line?
Signature · 1 line
error compiling committee.c: too many arguments to function
Hi Avi,
no I'm using a partition as a drive, here's my command-line:
taskset 0x00000002 /usr/X11R6/bin/qemu-system-x86_64 -usb -drive file=/dev/hda2,cache=off -m 1536 -net nic,macaddr=$MACADDR -net tap,script=/etc/qemu-ifup -no-acpi -monitor stdio -L /usr/X11R6/share/qemu -usbdevice tablet -boot c -localtime
(I give only one CPU core of the core2duo to the virtualization) $MACADDR was computed before.
Best regards,
Erik
Quoted 9 lines · Avi Kivity
Quoted 4 lines · Erik Rull
Hi Avi,
there are some .NET apps running, doing some calculations and graphic 2D display, HDD access w/ database and some TCP/IP transfer.
Are you using qcow2? What is your qemu command line?
Quoted 8 lines · Erik Rull
Hi Avi,
no I'm using a partition as a drive, here's my command-line:
taskset0x00000002/usr/X11R6/bin/qemu-system-x86_64-usb -drive file=/dev/hda2,cache=off -m 1536 -net nic,macaddr=$MACADDR -net tap,script=/etc/qemu-ifup -no-acpi -monitor stdio -L/usr/X11R6/share/qemu-usbdevice tablet -boot c -localtime(I give only one CPU core of the core2duo to the virtualization) $MACADDR was computed before.
-usbdevice tablet can consume a lot of cpu. I suggest you try without it (and without -usb as well).
Signature · 1 line
error compiling committee.c: too many arguments to function
A message that is not in the archive (sent off-list or not yet received): [email protected]
I had a similar problem some weeks ago. Finally I found out that my VM running WinXP was working on a non-acpi system (maybe I started kvm with -no-acpi option during the installation). In the Device Manager there has to be the entry Computer->"ACPI Multiprocessor PC". Otherwise the VM produced 100% real cpu load on my machines (the fans were running on highest speed level).
I just started the WinXP installation in repair mode and this did fix the problem.
I hope this helps!
regards
Johannes
Quoted 32 lines · Ross Boylan
I just installed XP into a new VM, specifying -smp 2 for the machine. According to top, it's using nearly 200% of a cpu even when I'm not doing anything.
Is this real CPU useage, or just a reporting problem (just as my disk image is big according to ls, but isn't really)?
If it's real, is there anything I can do about it?
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32 bit version of XP pro installed, now fully patched (including the Windows Genuine Advantage stuff, though I cancelled it when it wanted to run).
Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
Thanks for any assistance.
--
Ross Boylan wk: (415) 514-8146 185 Berry St #5700 [email protected] Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San Francisco
San Francisco, CA 94107-1739 hm: (415) 550-1062--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Johannes Schlatow
I had a similar problem some weeks ago. Finally I found out that my VM running WinXP was working on a non-acpi system (maybe I started kvm with -no-acpi option during the installation). In the Device Manager there has to be the entry Computer->"ACPI Multiprocessor PC". Otherwise the VM produced 100% real cpu load on my machines (the fans were running on highest speed level).
I just started the WinXP installation in repair mode and this did fix the problem.
Quoted 4 lines
I hope this helps!
regards
Johannes
That may be it: I was running with -no-acpi. Various docs recommended this for Windows performance, but your comment reminded me that acpi is (I think) required for multiprocessors.
I'll be in where I can check on this later today.
Thanks.
Ross
Quoted 47 lines
On Wed, May 13, 2009 at 2:41 AM, Ross Boylan <[email protected]> wrote:
I just installed XP into a new VM, specifying -smp 2 for the machine.
According to top, it's using nearly 200% of a cpu even when I'm not
doing anything.Is this real CPU useage, or just a reporting problem (just as my disk
image is big according to ls, but isn't really)?If it's real, is there anything I can do about it?
kvm 0.7.2 on Debian Lenny (but 2.6.29 kernel), amd64. Xeon chips; 32
bit version of XP pro installed, now fully patched (including the
Windows Genuine Advantage stuff, though I cancelled it when it wanted to
run).Task manager in XP shows virtually no CPU useage.
Please cc me on responses.
Thanks for any assistance.
--
Ross Boylan wk: (415)
514-8146
185 Berry St #5700
[email protected]
Dept of Epidemiology and Biostatistics fax: (415)
514-8150
University of California, San Francisco
San Francisco, CA 94107-1739 hm: (415)
550-1062--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html