Linux Tuning

Suggested I/O scheduler for a Video on Demand (VOD) server using Red Hat Enterprise Linux

On a VOD server, using the cfg scheduler can increase disk I/O latency when many connections arrive, causing uneven video playback. Use the “deadline” I/O scheduler to optimize I/O for maximum throughput.

You can configure this at boot with the “elevator” kernel parameter. Edit grub.conf as shown below.

title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/vg0/lv0 <span style="color: #ff0000;">elevator=deadline</span>
initrd /initrd-2.6.18-8.el5.img

In Red Hat Enterprise Linux 5, you can change the I/O scheduler on the fly as shown below.

# cat /sys/block/sdb/queue/scheduler
noop anticipatory deadline [cfq]
# echo 'deadline' > /sys/block/sdb/queue/scheduler
# cat /sys/block/sdb/queue/scheduler
noop anticipatory [deadline] cfq

You can also tune the deadline scheduler further. The files involved are listed below.

/sys/block/DEVNAME/queue/iosched/read_expire
/sys/block/DEVNAME/queue/iosched/write_expire
/sys/block/DEVNAME/queue/iosched/fifo_batch
/sys/block/DEVNAME/queue/iosched/write_starved
/sys/block/DEVNAME/queue/iosched/front_merges

DEVNAME is the block device name, such as sda, sdb, or hda.

For more information on the deadline I/O scheduler, see: /usr/share/doc/kernel-[version]/Documentation/block/deadline-iosched.txt.

EOF.← Back to articles