How to use the Noop or None IO Schedulers

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 4, 5, 6, 7, 8,9

Issue

  • How to turn on the noop scheduler for a device?
  • How to turn on the none scheduler for a device?
  • What are the tunables for noop or none schedulers and what do they do?
  • How does the logic within the scheduler work in choosing which I/O to dispatch next?
  • How do you turn on the noop scheduler in RHEL 8,9?

Resolution

 

The noop scheduler is called none starting in RHEL 8.

Enable noop or none I/O scheduler

  • Per device: (at runtime, lost once rebooted)
    • RHEL 8,9:[1] none scheduler option
      $ echo 'none' > /sys/block/sda/queue/scheduler
      $ cat           /sys/block/sda/queue/scheduler
      [none] mq-deadline kyber bfq 
    • RHEL 4,5,6,7:[1] noop scheduler option
      $ echo 'noop' > /sys/block/sda/queue/scheduler
      $ cat           /sys/block/sda/queue/scheduler
      [noop] anticipatory deadline cfq 
  • All devices (at boot):
    • RHEL 7, 8: you can set none (RHEL 8) or noop (RHEL7) for all devices via editing /etc/default/grub as show below and then rebuilding the grub2 configuration file: (add option to existing GRUB_CMDLINE_LINUX line)

      Note: The elevator kernel parameter was marked for deprecation in RHEL8 and no longer has any effect from RHEL9 onwards.

      [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=none"     <<= RHEL8 or later
      GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap elevator=noop"     <<= RHEL7
      GRUB_DISABLE_RECOVERY="true"
      • Verify the /etc/default/grub file contains only one copy GRUB_CMDLINE_LINUX=
        # grep "GRUB_CMDLINE_LINUX" etc/default/grub | egrep -v "^#|GRUB_CMDLINE_LINUX_DEFAULT"1
      • Rebuild the /boot/grub2/grub.cfg file 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 elevator=noop to the end of the kernel line in /etc/grub.conf file:
      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

 
tunables for none or noop IO schedulers
Individual IO scheduler personality tunables are located in /sys/block/sdN/queue./iosched. As seen below, the directory of tunables is empty - there are no tunables for the none (RHEL8,9) or noop (RHEL 4-7) IO schedulers.

  • RHEL8,9:
    $ ls            /sys/block/sda/queue/iosched
    $
  • RHEL 4,5,6,7:
    $ ls            /sys/block/sda/queue/iosched
    $

See Understanding the Noop IO Scheduler for further information.

noop vs none

The noop scheduler option within previous versions of RHEL is now called none with RHEL 8 and later versions. Although it has a new name, it still is same functions the same as RHEL 4-7's noop io scheduler.

  • From RHEL 8's "Available disk schedulers", the none scheduler is describes as follows:
    none
    Implements a first-in first-out (FIFO) scheduling algorithm. It merges requests at the generic block layer through a simple last-hit cache.
  • From RHEL 7's "I/O schedulers", the noop scheduler is described as follows:
    noop
    The noop I/O scheduler implements a simple FIFO (first-in first-out) scheduling algorithm. Requests are merged at the generic block layer through a simple last-hit cache. 

The two I/O schedulers perform the same function.

 

References

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.

Comments