[CentOS-virt] what scheduling algorithm does KVM use?

Kenni Lund kenni at kelu.dk
Thu Nov 18 19:11:26 EST 2010

2010/11/19 Nick <oinksocket at letterboxes.org>:
> Thanks for the quick reply.
> On 18/11/10 23:45, Kenni Lund wrote:
>> The good thing about KVM compared to other virtualization solutions,
>> is that KVM doesn't try to reinvent the wheel. It leaves scheduling to
>> the Linux kernel, so whatever your Linux system is setup to use, KVM
>> will use that. You can choose to run CFS (Completely Fair Scheduler),
>> deadline, BFS, or whatever scheduler you prefer. As long as Linux uses
>> it, KVM will use it.
> Is this process scheduling we're talking about here?

Yep, a virtual CPU is just a process on the host Linux system.

> So, this sounds feasible... except if virtual CPUs must have time shared equally
> as the VMWare co-scheduling explanations imply. A scheduler for threads /
> processes presumably wouldn't guarantee such a thing?

I think cgroups is the solution, if you want to guarantee resources to
some guests. I haven't tested it with KVM, but perhaps "nice" and
"ionice" can be useful as well...the guests are just Linux processes
after all.

> Maybe I'll go and investigate the KVM list....


Best regards

More information about the CentOS-virt mailing list