How to limit excessive CPU usage from guest OS in KVM

Howard asked:

On Xen it is easy as we have CreditScheduler [1], so on a machine with each guest OS sharing only portion of CPU, e.g. 6 guests running on top of a dual core CPU, excessive CPU usage is prohibited.

How to do the same thing on KVM?


My answer:

KVM doesn’t include any such mechanism. However, since each virtual machine is simply a process on the host, they can be managed with standard process utilities such as nice or better yet, cgroups.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.