Linux – Does changing /sys/block/sda/queue settings take effect immediately

filesystemsiolinux

How long does it take for changes to the following settings to take effect:

  • /sys/block/sda/queue/scheduler
  • /sys/block/sda/queue/rotational
  • /sys/block/sda/queue/read_ahead_kb

Is it immediately/with a few seconds, or does it require the process to be restarted, or the system to be restarted? Is the answer any different if the disks are part of a RAID?

Please point me to some documentation of the answer if you can. Similarly is there any easy way either through benchmarking or looking at a log, to tell that the settings are in effect?

Best Answer

These changes take place immediately.

Can you give some indication of what you're trying to do and which OS/distribution you're using for this? There are better ways to set these parameters, but the exact method varies by distro.

In addition, the hardware specifics will have an impact on these settings. What server/controller/disk/etc. specifics in use here?

Edit:

It's Red Hat. Since it's RHEL, use the Tuned Framework to customize your I/O and system profile.

Please see: Changing the I/O scheduler for a specific disk