LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 09-01-2011, 02:55 AM   #1
kheldar
Member
 
Registered: Jul 2004
Location: Nottingham, England
Distribution: Fedora 17, Centos 6.3 x86_64
Posts: 35

Rep: Reputation: 2
Question 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.
 
Old 09-01-2011, 04:36 AM   #2
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
can you post the VM command line?
`ps -ef| grep qemu`
 
Old 09-01-2011, 05:25 AM   #3
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
If you can run the Windows Task Manager => Processors and examine the CPU usage. What process is consuming the most?
 
Old 09-01-2011, 03:58 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,991

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
I'd suspect the VM client OS but it could be hardware related to host.
 
Old 09-02-2011, 11:58 AM   #5
kheldar
Member
 
Registered: Jul 2004
Location: Nottingham, England
Distribution: Fedora 17, Centos 6.3 x86_64
Posts: 35

Original Poster
Rep: Reputation: 2
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!
 
Old 09-02-2011, 12:59 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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
        -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
Have you tried increasing your virtual memory? 512 seems somewhat small for a XP system.
 
Old 09-02-2011, 03:54 PM   #7
kheldar
Member
 
Registered: Jul 2004
Location: Nottingham, England
Distribution: Fedora 17, Centos 6.3 x86_64
Posts: 35

Original Poster
Rep: Reputation: 2
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.
 
Old 09-02-2011, 08:06 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,991

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Give it more cores.
 
Old 09-03-2011, 05:05 AM   #9
kheldar
Member
 
Registered: Jul 2004
Location: Nottingham, England
Distribution: Fedora 17, Centos 6.3 x86_64
Posts: 35

Original Poster
Rep: Reputation: 2
I've upped it from 1 to 2 cores (out of 4 on the host) and it doesn't make any difference.
 
Old 09-03-2011, 02:03 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,991

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
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.
 
Old 09-03-2011, 03:30 PM   #11
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
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?
 
Old 09-04-2011, 11:21 AM   #12
kheldar
Member
 
Registered: Jul 2004
Location: Nottingham, England
Distribution: Fedora 17, Centos 6.3 x86_64
Posts: 35

Original Poster
Rep: Reputation: 2
They're both on a lvm logical volume, where the physical volume is a software Raid 1 partition, made of two PATA disks.
 
Old 09-04-2011, 12:22 PM   #13
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,991

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
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.

Last edited by jefro; 09-04-2011 at 12:27 PM.
 
Old 09-04-2011, 01:15 PM   #14
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by kheldar View Post
They're both on a lvm logical volume, where the physical volume is a software Raid 1 partition, made of two PATA disks.
I meant the mount options for those disks. If you haven't yet, try using noatime and nodiratime and see what happens
 
Old 09-04-2011, 01:17 PM   #15
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by jefro View Post
The client is not really using the hosts cores correctly.
how can you tell?

Quote:
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.
cgroups?

Quote:
I an rather confused as to how kvm (which uses qemu) to support real use of the host's cores since qemu can not.
this is what kvm is for actually, not-so-strictly speaking.
every cpu a VM has is a thread running on the hosts' cpu, again, not-so-strictly speaking
 
  


Reply

Tags
fedora 14, kvm, xp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Set up Spicevmc Channel on Ubuntu 11.04 as KVM Server and spice-vdagent as a KVM guest LXer Syndicated Linux News 0 06-15-2011 07:10 PM
KVM with Ubuntu guest - guest crashes when some apps are 'full screened' TonyRogers Linux - Virtualization and Cloud 0 05-15-2011 12:18 PM
KVM: Mouse under Windows Guest performs way better than under Centos Guest martdj Linux - Virtualization and Cloud 3 03-29-2010 04:20 AM
Computer suddenly running really slowly rockergrl Linux - Hardware 1 12-08-2004 02:51 PM
Computer suddenly running really slowly, please help rockergrl Linux - Hardware 5 12-08-2004 01:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration