Litteraly, all the tweaks suggested in the post, from the first one to the last one: I followed it line by line (I already had cryptodev installed, so no changes there).
One caveat though: the numbers mentioned in the post are local, i.e. measured with
$this->bbcode_second_pass_code('', '
dd if=/dev/zero of=./bigfile bs=1M count=1024
dd of=/dev/null if=./bigfile bs=1M count=1024
')
This because I access samba via a wi-fi network, so the bottleneck is there. Tonight I'll try to connect with a cable and do some more testing.
I use this enclosure
http://www.mediasonic.ca/product.php?id=1357292050 with 4 WD Red 2Tb disks connected using a Stat/eSata cable to the top port, configured as RAID5 (no spare).
As you might see from the comments to the post, I have set-up direct access to the individual disks of the RAID, but doing it to md0 didn't bring any benefit.
Edit: I have connected mia PC (WIn7) to my gigabit router via cable and I get 38-40 MB/s when reading a 1Gb file from my RAID5 connected with Samba and just above 10 MB/s when writing it back.