[libvirt] cpulimit and kvm process

Manao ahoana, Hello, Bonjour, I would like to launch several KVM guests on a multicore CPU. The number of the KVM process is over the number of physical cores. I would like to limit each KVM process to say... 10% of CPU I first use "cpulimit " Would you know some better way to limit them? it's in order to avoid 4 VM to hog all the 4 hardware cores. I also use all the livbirt tools, if there si any sol Misaotra, Thanks, Merci. -- Architecte Informatique chez Blueline/Gulfsat: Administration Systeme, Recherche & Developpement +261 34 56 000 19

On Fri, 1 Oct 2010 10:03:28 +0300 Mihamina Rakotomandimby <mihamina@gulfsat.mg> wrote:
Manao ahoana, Hello, Bonjour,
I would like to launch several KVM guests on a multicore CPU. The number of the KVM process is over the number of physical cores.
I would like to limit each KVM process to say... 10% of CPU
I first use "cpulimit "
Would you know some better way to limit them? it's in order to avoid 4 VM to hog all the 4 hardware cores.
I also use all the livbirt tools, if there si any sol
Misaotra, Thanks, Merci.
You should be able to limit cpu utilization using cgroups

On Fri, Oct 01, 2010 at 10:03:28AM +0300, Mihamina Rakotomandimby wrote:
Manao ahoana, Hello, Bonjour,
I would like to launch several KVM guests on a multicore CPU. The number of the KVM process is over the number of physical cores.
I would like to limit each KVM process to say... 10% of CPU
I first use "cpulimit "
Would you know some better way to limit them? it's in order to avoid 4 VM to hog all the 4 hardware cores.
KVM processes are just like Linux processes, so you can pin them and renice them. There is support for pinning virtual CPUs to physical CPUs in libvirt, eg: virsh vcpupin GuestName 0 0 but you can also use Linux tools. "tuna" is one such program which I think is in Fedora, or upstream here: http://git.kernel.org/?p=linux/kernel/git/acme/tuna.git;a=summary Another tool is "renice". Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/

Hello, is there any way how to set some initial nice? In XML maybe...? Thank you. Dne 1.10.2010 14:15, Richard W.M. Jones napsal(a):
On Fri, Oct 01, 2010 at 10:03:28AM +0300, Mihamina Rakotomandimby wrote:
Manao ahoana, Hello, Bonjour,
I would like to launch several KVM guests on a multicore CPU. The number of the KVM process is over the number of physical cores.
I would like to limit each KVM process to say... 10% of CPU
I first use "cpulimit "
Would you know some better way to limit them? it's in order to avoid 4 VM to hog all the 4 hardware cores. KVM processes are just like Linux processes, so you can pin them and renice them.
There is support for pinning virtual CPUs to physical CPUs in libvirt, eg:
virsh vcpupin GuestName 0 0
but you can also use Linux tools. "tuna" is one such program which I think is in Fedora, or upstream here:
http://git.kernel.org/?p=linux/kernel/git/acme/tuna.git;a=summary
Another tool is "renice".
Rich.
participants (4)
-
Jaromír Červenka
-
Mihamina Rakotomandimby
-
pradeep
-
Richard W.M. Jones