
For a virtualization environment, it often makes sense to use a kernel I/O scheduler that does not take into account whether and/or which hardware seek time penalty may or may not be applicable for the disks used. Hence, where in my case I use a storage device over iSCSI, I want to set the noop scheduler for the hypervisors (which use iSCSI), and all guests on it (which use logical volumes). Neither the hypervisors nor the guests will experience a seek time penalty, so I thought, and so scheduling their I/O does not need to be optimized for such. The noop scheduler does exactly that.
On a side-note: Luckily, all guests run Linux ;-)
Using Puppet and Augeas, it's particularly easy to just manage the kernel cmdline options. In the Puppet manifest:
# If the system is virtualized, just use the noop I/O scheduler
# for all block devices
if ( $is_virtual ) {
augeas { "kernel_elevator_noop":
context => "/files/etc/grub.conf",
changes => "setm title kernel/elevator noop",
onlyif => "get title/kernel/elevator != noop"
}
}
To change the I/O scheduler during runtime, just use:
# echo noop > /sys/block/<device>/queue/scheduler
For a full, more verbose description of what to do (including loading the necessary kernel module, etc.), check out this awesome, short walk-through.
Comments
so question... what about
so question... what about unseting a value across all of the entries in grub.conf?