3

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?

stephenbez
  • 133
  • 4
  • The documentation for those is here: [Queue sysfs files](https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt) –  Aug 28 '14 at 18:44

1 Answers1

3

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

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • This answer says there could be some latency when changing the scheduler, as the previous requests are all flushed (though seconds of latency doesn't make a difference to me): http://stackoverflow.com/a/1010562/804713 I'm running RHEL 6.5 using an SSD. A team member has previously done performance testing on the same hardware and wants me to change the settings and confirm I'm seeing similar performance numbers. The settings are currently set wrong. The work load is not very sequential and involves reading small amounts of data, so thats why I'm looking at read_ahead_kb. – stephenbez Aug 28 '14 at 18:55
  • @stephenbez If this is Red Hat, you should be using the [Tuned Framework](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Power_Management_Guide/tuned-adm.html) to be making these changes. See my edit above. If used in this manner, your changes are applied on the fly without the need for a system or application restart. – ewwhite Aug 28 '14 at 19:11