Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question

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. – 3dinfluence Oct 24 '11 at 18:05
This blog post goes more into how to use Cgroups with KVM.… – 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. and 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


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.