How to use the Noop IO Scheduler
Environment
- Red Hat Enterprise Linux (RHEL) 4
- Red Hat Enterprise Linux (RHEL) 5
- Red Hat Enterprise Linux (RHEL) 6
- Red Hat Enterprise Linux (RHEL) 7
Issue
- How to turn on the noop scheduler for a device?
- What are the tunables for noop scheduler and what do they do?
- How does the logic within the scheduler work in choosing which IO to dispatch next?
Resolution
Enable noop io scheduler
- Per device:
$ echo 'noop' > /sys/block/sda/queue/scheduler $ cat /sys/block/sda/queue/scheduler [noop] anticipatory deadline cfq - All devices (at boot):
- RHEL 4, 5, 6: you can set noop for all devices via adding
elevator=noopto the end of the kernel line in/etc/grub.conffile:title Red Hat Enterprise Linux Server (2.6.9-67.EL) root (hd0,0) kernel /vmlinuz-2.6.9-67.EL ro root=/dev/vg0/lv0 elevator=noop initrd /initrd-2.6.9-67.EL.img - RHEL 7: you can set noop for all devices via editting
/etc/default/grubas show below and then rebuilding the grub2 configuration file:
[root@host ~]# 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=rhel00/root rd.lvm.lv=rhel00/swap elevator=noop" GRUB_DISABLE_RECOVERY="true" - Rebuild the
/boot/grub2/grub.cfgfile by running the grub2-mkconfig command as follows: - On BIOS-based machines:
[root@host ~]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-537dacc8159a4d4caaa419342da0b820 Found initrd image: /boot/initramfs-0-rescue-537dacc8159a4d4caaa419342da0b820.img done - On UEFI-based machines:
[root@host ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-537dacc8159a4d4caaa419342da0b820 Found initrd image: /boot/initramfs-0-rescue-537dacc8159a4d4caaa419342da0b820.img done
- RHEL 4, 5, 6: you can set noop for all devices via adding
noop tunables
$ ls /sys/block/sda/queue/iosched $
That's right, the directory of tunables is empty - there are no tunables for noop.
See Understanding the Noop IO Scheduler for further information.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
