I have been using xen hypervisor. I use the credit scheduler and make use of capping in credit scheduler. Now I am migrating to KVM . Is there any good equivalent of that VM capping in kvm ? Any help or pointers will be great. Thank you.

-Sethu

link|improve this question

64% accept rate
feedback

1 Answer

Have a look at cgroups. They can be used to limit resources to VMs.

This Red Hat document on resource management is a pretty good introduction to cgroups.

link|improve this answer
It provides weight and not cap right ? – sethu Oct 24 '11 at 17:58
I believe it can also provide a hard limit to the amount of resources a cgroup can use. But it can also be used to give priorities to the VMs. en.wikipedia.org/wiki/Cgroups – 3dinfluence Oct 24 '11 at 18:05
This blog post goes more into how to use Cgroups with KVM. berrange.com/posts/2009/12/03/… – 3dinfluence Oct 24 '11 at 18:17
Yeah it provides cpu shares. The shares dont provide a hard limit such that It cannot cross that limit, if there is only 1 vm and if i set the shares to be 50% or 512, i want the usage to be restricted to 50% max but it will let the vm let it use more unless there is another VM using the rest 50% of the share and fighting with the vm we set a limit on. – sethu Oct 24 '11 at 18:20
Yeah looking into this more looks like the only hard limit cgroups allows currently is memory use. But I did run across this. lkml.org/lkml/2009/6/4/24 and lwn.net/Articles/428175 which seems to indicate that it's coming in a future kernel release. Googling for cpu.cfs_quota_us provides a bunch of additional information. – 3dinfluence Oct 24 '11 at 18:35
show 3 more comments
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.