XP guest suddenly runs very slowly on KVM
Hi!
I'm running Fedora 14 on the host and hosting an XP guest using KVM. Just recently, the guest has been crashing and windows running VERY slowly. It seems to be the OS that is slow, rather than applications, as once it's running the apps work until the guest crashes. I'm running... kernel.x86_64 2.6.35.14-95.fc14 libvirt.x86_64 0.8.3-10.fc14 qemu-common.x86_64 2:0.13.0-1.fc14 qemu-img.x86_64 2:0.13.0-1.fc14 qemu-kvm.x86_64 2:0.13.0-1.fc14 qemu-system-x86.x86_64 2:0.13.0-1.fc14 It seems that the latest update to the Kernel or QEmu may have started the problem. My Centos and Fedora guest seem to be fine. Any suggestions would be great. Thanks! K. |
can you post the VM command line?
`ps -ef| grep qemu` |
If you can run the Windows Task Manager => Processors and examine the CPU usage. What process is consuming the most?
|
I'd suspect the VM client OS but it could be hardware related to host.
|
Hi,
The command is: /usr/bin/qemu-kvm -S -M pc-0.13 -cpu core2duo,+xtpr,+tm2,+est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,+ds -enable-kvm -m 512 -smp 2,sockets=2,cores=1,threads=1 -name xp1 -uuid 786f357f-c0d0-ebd9-80b6-a2fac40b7468 -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/xp1.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=localtime -boot c -drive file=/var/lib/libvirt/images/xp1.img,if=none,id=drive-ide0-0-0,boot=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/mnt/tmp/virtio-win-0.1-mm34.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:dd:00:ae,bus=pci.0,addr=0x6 -net tap,fd=44,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc 0.0.0.0:7,password -vga std -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 I can't see any processes in the task manager I'm not expecting, but the system idle process takes quite a lot of cpu. Once the system finishes booting and loading, it's usually ok for a while, but try and interact, and it takes minutes to respond to a click sometimes. Grrr! |
If you use this command: ps -ef | grep qemu | sed '/ -/([^ ]/)/\n\t-\1/g' the output is somewhat easier to follow. For your qemu, it looks like this:
Code:
/usr/bin/qemu-kvm |
I've upped the memory to 2gb, all of which appears to be used by "top".
There is a massive discrepancy between the cpu usage on the guest and the host. Top reports the host hardly doing anything, while task manager reports the cpu being flat out. |
Give it more cores.
|
I've upped it from 1 to 2 cores (out of 4 on the host) and it doesn't make any difference.
|
I doubt qemu really can use more than one core yet. It used to only use a single core no matter what you told it to do.
|
jefro qemu-kvm can use up to 64 cores (and my numbers might be wrong for the newer builds).
where are the cd image and xp1.img located? how is that location mounted? |
They're both on a lvm logical volume, where the physical volume is a software Raid 1 partition, made of two PATA disks.
|
Then either they have an older version or some other setup problem. The client is not really using the hosts cores correctly. The only other issue would be some limit on that process that the host is imposing by some program. I forget the common way to limit processes.
I an rather confused as to how kvm (which uses qemu) to support real use of the host's cores since qemu can not. |
Quote:
|
Quote:
Quote:
Quote:
every cpu a VM has is a thread running on the hosts' cpu, again, not-so-strictly speaking |
Quote:
Again, IIRC - and it's been several years ago now, XP could slow down to a snail's pace while it waited for an I/O request to be serviced. Since you're running as a virtual system, you might find the virsh command helpful for getting additional information from your XP system. By the way, Fedora 14 is fairly close to it's "end of support" time, which should be about a month after Fedora 16 is released. (Currently scheduled for 1 Nov 2011.) |
"Top reports the host hardly doing anything, while task manager reports the cpu being flat out."
Top is reporting the host cpus. Is one of them at or near 100%? |
Fixed by paravirtualisation
Just to update this thread - the I ended up fixing the problem by downloading the windows virtio paravirtualisation drivers, and then changing the network and disk to use the virtio components.
Went from performing like a dog to pretty much perfect operation in an instant! |
All times are GMT -5. The time now is 11:36 AM. |