If your running Ubuntu. Want some more speed out of the raid 5 ? Ubuntu's default values are crap.
View the default cache size ( probably set to 256 )
cat /sys/block/md0/md/stripe_cache_size
Change the value on the fly
echo 16384 > /sys/block/md0/md/stripe_cache_size
Change read ahead on the fly
Values to try include
8192, 16384, 32768. Each time test with dd for write speed.
Now lets test read speed by adjusting the read ahead value. ( Note: 1536 is default value )
blockdev --setra 16384 /dev/md0
Rerun your tests and see how they go.
Edit /etc/rc.local
Add the entries ( so it's fixed on reboots )
echo 16384 > /sys/block/md0/md/stripe_cache_size
blockdev --setra 16384 /dev/md0
Values to try include
1536, 2048, 8192, 32768,65536,131072,262144,524288. Each time test with dd for read speed.
I haven't tested these personally but I will do as soon as I get a chance and let you all know how I go!
1 comment:
Keep in mind that the stripe cache can take up a sizable amount of memory.
stripe_cache_size * 4kb * number of disks
In a 4 disk RAID5 a stripe_cache_size of 32768 will cost you 512MB of RAM.
Post a Comment