Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a RAID array using the 2 local SSD drives on a EC2 c3.4xlarge instance.

# mdadm --create /dev/md127 --level=0 --raid-devices=2 /dev/xvdf /dev/xvdg
# mkfs.ext4 /dev/md127
# mkdir /data
# echo 'DEVICE /dev/xvdf /dev/xvdg' > /etc/mdadm.conf
# mdadm --detail --scan >> /etc/mdadm.conf
# echo "/dev/md127   /data       ext4    defaults 1 2" >> /etc/fstab 

The device works great. However, when I am trying to set the I/O scheduler for for the array (as root), the scheduler file doesn't change.

# echo noop >  /sys/block/md127/queue/scheduler
# cat /sys/block/md127/queue/scheduler 

What is the proper way of setting the scheduler, so that last commands output is 'noop'?

share|improve this question
Try setting it on the underlying devices rather than the multi-device. – Matthew Ife Mar 31 '14 at 19:25
Where do you usually set that on RedHat? Tried via /etc/rc.local but after reboot, setting wouldn't take effect on the underlying device. It does if I do it after boot manually, but not in rc.local – BraveHeart Mar 31 '14 at 19:47

Don't do this by hand. I mean, you can globally by appending the kernel boot parameter line. But instead, use the tuned-utils framework to handle this.

yum install tuned tuned-utils

Once installed...

tuned-adm profile virtual-guest 

or make your own profile based on virtual-guest.

In /etc/tune-profiles/virtual-guest, there's a stanza that says:

# This is the I/O scheduler ktune will use.  This will *not* override anything
# explicitly set on the kernel command line, nor will it change the scheduler
# for any block device that is using a non-default scheduler when ktune starts.
# You should probably leave this on "deadline", but "as", "cfq", and "noop" are
# also legal values.  Comment this out to prevent ktune from changing I/O
# scheduler settings.

Modify to taste and be done!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.