I recently made a few adjustments to speed up my file transfers with my HP N36L (using Ubuntu 12.04 and software RAID 5 over 4x 2TB HDD, with 8GB of RAM), which was fairly slow in terms of write speed, and also to external NTFS drives.
The first issue that I stumbled upon was that the CPU was maxed out, yet it was only running at like 800MHz-1.1GHz instead of 1.3GHz.
You can get the CPU speed of the 2 cores by running: cat /proc/cpuinfo | grep MHz
I then set the minimum speed of the 2 cores to 1300MHz by running: for i in 0 1; do cpufreq-set -c $i -d 1300MHz; done
^^ This increased my write speed sto external HDD's that uses NTFS partitions...
Then after I performed a distro upgrade yesterday, I saw that my CPU usage was still very high and then I noticed that my RAID 5 was doing a resync.
Running `cat /proc/mdstat` revealed that it was doing ~50MB/s.
Changing the NCQ queue depth from 31 to 1 (disabled) on all 4 HDD's (/dev/sd[abcd]) immediately took the resync speed to ~70MB/s.
I then used the optimization script posted in the Ubuntu Forum (
http://ubuntuforums.org/showthread.php?t=1494846&p=11622143#post11622143 ) to suggest better read-ahead values for the disks and RAID volume, as well as the RAID volume's stripe cache size.
By simply changing the read-ahead values and the stripe cache size, my resync speed increased to 100MB/s !
If you have more time to run benchmarks, then you can use the following script (
http://ubuntuforums.org/showthread.php?t=1916607 ) to iterate over a bunch of values so that you can find what suits you the best
Oh - and my write speed to software RAID 5 was so slow for MySQL that I actually moved my whole DB to a RAM drive. When I have time (over the next weekend) I'm keen on testing whether performance is still as bad with the new HDD/RAID parameters.