Can the Linux disk scheduler be changed on the fly by writing to /sys/block/sda/queue/scheduler? Should applications (e.g. Mysql) be stopped / started when changing?
|
|
|||
|
|
migrated from stackoverflow.com Jan 24 '12 at 0:18
|
You can change the IO scheduler on the fly without fear. It is protected by appropriate locking to make sure no transactions are lost. |
|||
|
|
|
Yes you can, and no, applications do not need to be stopped/started. This is by design, so that you can (relatively) safely try out different ones on a production system without downtime. It does cause a "hiccup"; IOs in progress are allowed to complete, and new IO requests are blocked until the new scheduler is instated. You can also have a different IO scheduler per block device (as seen by the kernel e.g. /dev/sda). |
|||
|
|
|
||||
|
|