[CentOS] Right way to set IO scheduler on CentOS

Fri Nov 6 05:26:25 UTC 2009
Ross Walker <rswwalker at gmail.com>

On Nov 5, 2009, at 8:59 PM, Amos Shapira <amos.shapira at gmail.com> wrote:

> Hello,
>
> I'd like to set the io scheduler on some of the disks on our Dom0
> (CentOS 5) to "deadline".
>
> The way I found to do this is with "echo deadline >
> /sys/block/sdb/queue/scheduler".
>
> What is the Right Way(TM) to set this automatically during boot?

There is no definite right way. I use /etc/rc.local for this with a  
little for loop like:

for dev in sdb sdc sdd; do
   echo deadline >/sys/block/${dev}/queue/scheduler
done

-Ross