Installation guide
I/O Scheduler
Starting with the 2.6 kernel (Red Hat Enterprise Linux 4 and later) the I/O scheduler can be modified at boot
time to control the manner in which the kernel commits reads and writes to disk. Red Hat Enterprise Linux 5 al-
lows users to change I/O schedulers dynamically for each block device (e.g. echo sched_name > /sys/block/
<sdx>/queue/scheduler).
Red Hat Enterprise Linux 5 kernel supports four I/O schedulers:
● cfq (Completely Fair Queuing)
● deadline
● noop
● anticipatory
The CFQ scheduler waill attempt to distribute I/O bandwidth fairly over all processes. It is a default algorithm
in Red Hat Enterprise Linux 5 which is suitable for a wide variety of applications and provides a good compro-
mise between throughput and latency. The CFQ scheduler is recommended for most workloads and systems
with shared storage.
The deadline scheduler reorders I/O to optimized disk heads movement and caps maximum latency per request
to prevent resource starvation for I/O intensive processes. The deadline scheduler is recommended for single in-
stance databases with dedicated storage.
The noop scheduler maintains a simple FIFO queue of I/O requests. It performs basic sorting and merging us-
ing minimal CPU resources. The scheduler is recommended for CPU-limited environments and systems with
smart shared storage.
The anticipatory scheduler is not intended for servers and as such not recommended.
In virtualized environments, it is often detrimental to schedule I/O at both the host and guest layers. If multiple
guests access storage on a file system or block devices managed by the host operating system, the host may be
able to schedule I/O more efficiently because it alone is aware of requests from all guests and knows the physi-
cal layout of storage, which may not map linearly to the guests' virtual storage. Red Hat Enterprise Linux 4 and
Red Hat Enterprise Linux 5 guests can use the noop I/O scheduler to allow the host to optimize I/O requests.
Guests using storage accessed either by iSCSI or by physical device pass-through should not use the noop
scheduler since these methods do not allow the host to optimize I/O requests to the underlying physical device.
To configure a non-default scheduler, the elevator parameter must be passed to the kernelbeing used. For exam-
ple, to switch to the deadline scheduler edit the /etc/grub.conf file and add the following parameter to the
kernel line:
title Red Hat Enterprise Linux Server (2.6.18-92.1.13.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=/dev/sda2 elevator=deadline
initrd /initrd-2.6.18-92.1.13.el5.img
This entry tells the kernel to use the deadline scheduler as a new system-wide default after reboot.
In Red Hat Enterprise Linux 5, the scheduler can be set at run time and for each block device. For example, set
8 | www.redhat.com