How to limit excessive CPU usage from guest OS in KVM

central-processing-unitkvm-virtualizationscheduled-taskvirtualizationxen

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?

[1] http://wiki.xensource.com/xenwiki/CreditScheduler

Best 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.