Enable noop IO scheduler

Noop Scheduler, for those of you who don’t know, is the simplest I/O scheduler for Linux. NOOP scheduler inserts all incoming I/O requests into a simple FIFO queue and implements request merging. In other words, the scheduler assumes that the host is unaware of how to productively re-order requests. There for, noop handles all IO scheduling.

Lets enable enable noop.

First, well need to see if noop is currently being used. Well redirect it to a file and then cat it.

$ echo 'noop' > sys/block/sda/queue/scheduler
$ cat /sys/block/sda/queue/scheduler

You should get something like this:

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

As you can see my server is already configured to use noop.

You can setup noop by editing the following /etc/default/grub.

[root@node1 ~]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl_node1/root rd.lvm.lv=cl_node1/swap elevator=noop"
GRUB_DISABLE_RECOVERY="true"
[root@node1 ~]# 

Next you will need to rebuild the grub2 config file. (boot.grub2/grub.cfg)

enter the following

[root@node1 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-693.5.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-693.5.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-693.2.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-693.2.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-edf3cb748ba24f44b2453ec41af756ef
Found initrd image: /boot/initramfs-0-rescue-edf3cb748ba24f44b2453ec41af756ef.img
done
[root@node1 ~]#

Reboot the system to verify that it works. There should be nothing in the directory since noop doesn’t use tunables.

[root@node1 ~]# ls /sys/block/sda/queue/iosched/
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s