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 recently moved to KVM. Previously I was using xen and its capping feature in credit scheduler. Where we can set a cpu cap for a VM. I was searching for a similar feature to set hard limits on a VM in KVM. I recently found that cgroups has a concept called quota which lets us set a hardlimit for VM (process) in kvm. I am currently using centos 6. I checked cgroups but I can see only the ability to provide cpu shares and not quotas.Even libvirt has the support for this feature from version 0.9.4(As per the site), I am currently using libvirt 0.9.4 but when I use the command to set cpu quota , I get invalid option error. Can someone please tell me what am I missing and what should I do to enable that feature in cgroups to set hardlimits. Thanks !

  • Sethu
share|improve this question

1 Answer 1

Currently cpu.shares only define the lower bound of cpu allocation, defining the upper bound(aka capping) is called CPU bandwidth control in the Linux kernel community CPU bandwidth control for CFS. But I'm afraid this feature hasn't made its way to the mainline kernel yet, nevertheless the patch is available , for example the 7.2 version

share|improve this answer

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.