VMware Communities
em2slyn
Enthusiast
Enthusiast
Jump to solution

Workstation 11 CentOS 7 Cannot change scheduler to noop

Hi Folks:

I am using VMware Workstation 11 and created a CentOS 7 minimum install virtual machine using the UEFI boot option. The OS appeared to install fine; however, trying to change the disk scheduling algorithm to "noop" did not work and remains set to the default of "deadline". The problem does not occur when installing the OS with the BIOS boot option.

Here is how to replicate the problem:

1) Create a new virtual machine using a CentOS minimum install and select the check box Boot with EFI instead of BIOS under Settings | Options | Advanced

2) Install the OS and log on using root or an administrator enabled account.

3) Open the file /etc/default/grub and add the following line

     GRUB_CMDLINE_LINUX_DEFAULT="elevator=noop"

4) Reconfigure grub using the command

     $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

5) Reboot the virtual machine

6) Log on and check the elevator algorithm setting using the command

     $ cat /sys/block/sda/queue/scheduler

The output is "noop [deadline] cfq" where it should be "[noop] deadline cfq". I manually checked /boot/grub2/grub.cfg and the "elevator=noop" is appended to the command line as expected. Following the same procedure except with the BIOS boot option changes the disk scheduling algorithm to "noop" as expected.

It would be appreciated if someone would verify that this is indeed a problem. Thanks!

Shaun

0 Kudos
1 Solution

Accepted Solutions
em2slyn
Enthusiast
Enthusiast
Jump to solution

I solved my own problem and posting the result below for those changing the IO scheduling algorithm in CentOS 7 when using the EFI boot option. There are two ways to make the change:

Modify grub defaults then run grub2-mkconfig

1) Open the file /etc/default/grub and add/modify the following line

     GRUB_CMDLINE_LINUX_DEFAULT="elevator=noop"

2) Reconfigure grub using the command

     # grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Or, use the Linux command grubby

1) Enter the command

     # grubby --update-kernel=ALL --args="elevator=noop"

Reboot the virtual machine then check the IO scheduling algorithm setting using the command

     $ cat /sys/block/sda/queue/scheduler

Note: The default IO scheduling algorithm was changed in RHEL 7 to 'deadline' for all block devices except for SATA drives where 'cfq' remains the default. The 'noop' option employs FIFO thus leaving the IO scheduling to the hypervisor.  See RHEL 7 documentation at Chapter 5. Storage and File Systems.

View solution in original post

0 Kudos
1 Reply
em2slyn
Enthusiast
Enthusiast
Jump to solution

I solved my own problem and posting the result below for those changing the IO scheduling algorithm in CentOS 7 when using the EFI boot option. There are two ways to make the change:

Modify grub defaults then run grub2-mkconfig

1) Open the file /etc/default/grub and add/modify the following line

     GRUB_CMDLINE_LINUX_DEFAULT="elevator=noop"

2) Reconfigure grub using the command

     # grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Or, use the Linux command grubby

1) Enter the command

     # grubby --update-kernel=ALL --args="elevator=noop"

Reboot the virtual machine then check the IO scheduling algorithm setting using the command

     $ cat /sys/block/sda/queue/scheduler

Note: The default IO scheduling algorithm was changed in RHEL 7 to 'deadline' for all block devices except for SATA drives where 'cfq' remains the default. The 'noop' option employs FIFO thus leaving the IO scheduling to the hypervisor.  See RHEL 7 documentation at Chapter 5. Storage and File Systems.

0 Kudos