April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Changing default IO scheduler linux

Change default Linux IO scheduler to optimize IOs (very important if server is VM)

Check existing (active) io scheduler (elevator):

[root@server ~]# cat /sys/block/sda/queue/scheduler
noop anticipatory deadline [cfq] # cfq active

[root@server ~]# cat /sys/block/sda/queue/scheduler
noop anticipatory deadline [cfq] # cfq active

Change it on the fly

[root@server ~]# echo noop > /sys/block/sda/queue/scheduler

[root@server ~]# echo noop > /sys/block/sda/queue/scheduler

[root@server ~]# echo deadline > /sys/block/sda/queue/scheduler
[root@server ~]# echo deadline > /sys/block/sda/queue/scheduler

Change it permanently

Append elevator=deadline to the end of the grub.cfg kernel line and reboot
title CentOS
root (hd0,0)
kernel /vmlinuz-2.6.32-279.19.1.el6.x86_64 ro root=/dev/mapper/vg-lv_root … elevator=deadline
title CentOS
root (hd0,0)
kernel /vmlinuz-2.6.32-279.19.1.el6.x86_64 ro root=/dev/mapper/vg-lv_root … elevator=deadline

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>