Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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