[libvirt-users] Hard limit for the cpu usage of a VM
sethuraman subbiah
sethusubbiah at gmail.com
Mon Oct 24 20:24:13 UTC 2011
Hi,
-
Regards,
Sethuraman Subbiah
Graduate Student - NC state University
M.S in Computer Science
On Oct 24, 2011, at 4:20 PM, Eric Blake wrote:
> On 10/24/2011 01:50 PM, sethuraman subbiah wrote:
>> Hi ,
>>
>> I was previously using xen and currently moved to KVM. I am using libvirt to manage these VMs. In den's credit scheduler , I had the ability to set a cap on the cpu usage for a VM. But I was not able to find a similar substitute in KVM. I find that we can use cgroups to provide shares for VM but that will be more like weight based and it doesn't set a hard cap for that VM. I tried using cpulimit but I find it inaccurate and we can give values only between 0-100. Thus, I think it cannot support multi core environments. Can any one suggest a method to set a hard limit on a VM's cpu usage? Thank you.
>
> Libvirt 0.9.4 added CPU bandwidth limitation support, via <cputune>: http://libvirt.org/formatdomain.html#elementsCPUTuning. <period> and <quota> map to hard-coded caps via cgroups, nicer than the weighted numbers via <shares>.
Great, I have one more question. Is it possible to set the quota during run time from the host os ? Using virsh ? Thank you.
>
> --
> Eric Blake eblake at redhat.com +1-801-349-2682
> Libvirt virtualization library http://libvirt.org
More information about the libvirt-users
mailing list