Improving IO performance on Linux

I purchased a new server and have been struggling with IO performance on a RAID 1 setup. I first tried RAID 5 but it was horrible. Through all my struggles, I found a few kernel and filesystem tunables that helped me out.

The virtual machines improved also. They were barely usable.

Filesystem Tweaks: /etc/fstab

Change your mount options to:

Linux Kernel tunables:
sysctl -w vm.swappiness=0
sysctl -w vm.dirty_background_ratio=5
sysctl -w vm.dirty_ratio=5
sysctl -w vm.vfs_cache_pressure=200
The dirty tunables controls the portion of memory that the kernel will store pages in. I decreased the value to 5 so that I will have more memory free.  The cache_pressure tunable tells the kernel how to quickly free up the cache.