How to make Linux not suck (on RAID)
Use the noop or deadline io schedulers
noop if using an external RAID box
deadline otherwise
- Partition alignment
- Align your partitions to your stripe-size
- Alternatively, if you only have one filesystem, don't use partitioning
- If you are using LVM, again, make sure you keep alignment in mind
- File system tuning
If Ext2/3/4, then use -E stripe=?,stripe-width=? when mkfs'ing.
Read the details at https://raid.wiki.kernel.org/index.php/RAID_setup#ext2.2C_ext3.2C_and_ext4
Low latency settings
Some programs will work a lot better with a low latency IO setup.
Enabling the deadline scheduler works via the following command:
echo deadline > /sys/block/device/queue/scheduler
You may then also set the following values, which may provide additional latency benefits:
- Disable front merges:
echo 0 > /sys/block/device/queue/iosched/front_merges
- Reduce read I/O deadline to 150 milliseconds (the default is 500ms):
echo 150 > /sys/block/device/queue/iosched/read_expire
- Reduce write I/O deadline to 1500 milliseconds (the default is 3000ms):
echo 1500 > /sys/block/device/queue/iosched/write_expire