修改 Linux 默认的 IO Scheduler

RHEL 系我不知道怎么弄,我也没有机器是这个

在 /etc/default/grub 中,找到 GRUB_CMDLINE_LINUX_DEFAULT="" 这行,可能原来后面双引号中间有参数,这个各个机器不同,如果要修改默认的 CFQ Scheduler,那么在这里加上 elevator=noop 这样的内容,且和之前的旧内容有一空格。之后 update-grub2 重启即可。

之后 cat /sys/block/sda/queue/scheduler 就可以看到当前使用的调度器

IO Scheduler 有三个选择 cfq noop 和 deadline

参考资料:

https://www.ibm.com/developerworks/cn/linux/l-lo-io-scheduler-optimize-performance/index.html
https://askubuntu.com/questions/78682/how-do-i-change-to-the-noop-scheduler
Red_Hat_Enterprise_Linux-6-Performance_Tuning_Guide-en-US
Red_Hat_Enterprise_Linux-7-Performance_Tuning_Guide-en-US

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注