Linux – How to change the scheduler of a RAID 5 device

centos6linuxperformanceraidscheduler

I've created a RAID 5 device block by combining 4 HDDs.

The name of my device is md1.

But the /sys/block/md1/queue/scheduler file outputs "none" on doing cat.

And also after editing it using vim its throwing

/sys/devices/virtual/block/md1/queue/scheduler" E667: Fsync failed

I also tried using sysctl.conf and by adding

block.md1.queue.scheduler = deadline

But again it throws

error: "block.md1.queue.scheduler" is an unknown key

I'm really out of options. Please help me out.

Best Answer

You can apply the I/O scheduler to the real block devices; e.g. your /dev/sdX devices or default a global append to the kernel boot command line in /etc/grub... (add elevator=deadline)

But since you're using EL6 (Red Hat, CentOS, etc.), the most effective approach would be to use the tuned framework.

In your situation,

yum install tuned tuned-utils

Then choose a profile which will provide the right setting for your application. For instance:

tuned-adm profile throughput-performance

or

tuned-adm profile enterprise-storage

Tuned chart