Choosing the right scheduler on a virtual maschine (kvm)

Posted on Tue 20 August 2013 in Linux • 1 min read

The default i/o scheduler is the Completely Fair Queuing (cfq) in the 2.6 kernel. This is not the first choice for a virtual machine/hypervisor. The combination of the noop and the deadline scheduler is much better for a virtualization host.

virtual machine: noop
hypervisor: deadline

Set the scheduler temporarily (vm)

$ echo noop > /sys/block/sda/queue/scheduler

Set the scheduler permanently (vm)

kernel /vmlinuz-3.8.11 root=/dev/vgsystem/lvroot elevator=noop

(For the hypervisor replace noop with deadline!)

And don't forget to use virtio & raw devices for guest and noatime & nodiratime in fstab wherever it's possible.

Hint: VMware also recommends the noop scheduler for the guests.