How to change I/O scheduler in Linux

为什么可能会去修改Linux I/O Scheduler (elevator)?以及什么是I/O Scheduler,应该如何为数据库系统选择合适的I/O Scheduler?可以参看以下文章。

Linux, i/o scheduler and ASM? 在极大I/O压力的情况下,采用Deadline scheduler可能会提高5%-10%的I/O性能。

Choosing an I/O Scheduler for Red Hat?0?3 Enterprise Linux?0?3 4 and the 2.6 Kernel? 在大多数情况下,默认的CFQ scheduler已经足够好,无需修改。

Linux I/O Scheduler

那么如果我们确认要修改I/O scheduler,该如何进行? 参考 ?How to change default I/O scheduler?

大体上来说就是,比如像修改I/O scheduler为dealine:在RHEL4/OEL4中,修改/boot/grub/grub.conf文件,添加elevator=deadline,重启生效,比如:

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 elevator=deadline initrd /

initrd-2.6.18-8.el5.img在RHEL5/OEL5中,可以针对每块磁盘制定I/O Scheduler,修改完毕立刻生效,比如:

–当前是是noop

# cat /sys/block/sda1/queue/scheduler

[noop] anticipatory deadline cfq

–修改为deadline

# echo ‘deadline’>/sys/block/sda1/queue/scheduler

–立刻生效

# cat /sys/block/sda1/queue/scheduler

noop anticipatory [deadline] cfq 天才就是这样,终身努力,便是天才。

How to change I/O scheduler in Linux

相关文章:

你感兴趣的文章:

标签云: