Change IO Scheduler for SSD and HDD server with Software RAID

Hi Guys,

It has been a while...

I faced a problem with IO on one of the RAID 1 Linux servers and the IO schedulers were the default cfq in the server. It doesn't matter if the drive is in software RAID or not.

If you are using SSD drives, then there are no mechanical parts in the HDD, so you need to change the IO schedulers to noop.

If the SSD drive is mounted as /hda, then below command will do it.

----------------------------------------------------------
echo noop > /sys/block/hda/queue/scheduler
----------------------------------------------------------

For the HDD drive, the scheduler that is recommended is `deadline` in case of poor performance problems.

----------------------------------------------------------
echo deadline > /sys/block/hdb/queue/scheduler
----------------------------------------------------------

In case of Software RAID, just make sure that the drive you are changing the scheduler is inside the RAID.

You can see the drives inside the software RAID using the command

----------------------------
cat /proc/mdstat
----------------------------

Popular posts from this blog

Qmail cheat sheet

Open VZ cheat Sheet

Enable TUN/TAP and PPD in VM on open VZ