Wilmott-IT Services - Central Coast based Business IT Systems Management.
AusWebHost - Australia Based Web Hosting Provider. Offering Web Hosting, Dedicated Servers and other Hosted Services including Hosted Email
myTravelBlog - Create your own travel blog for free today! Link to Facebook to automatically update your status and photos everytime you submit a story!

Friday, October 2, 2009

Ubuntu RAID Tweak

This was posted on http://forums.overclockers.com.au/showthread.php?t=740692 by FalconGT in reference to Ubuntu RAID default values. I thought I might share it here too, if only for my own personal reference in the future.

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!


Bart van Bragt said...

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.

go now said...

Great article very knowledgeful information is shared types of computer

positive thoughts in hindi

keyboard क्या है ?

antivirus and firewall मे क्या अंतर है ?

mzinframe computer क्या है ?

Moniter kya hai ?

how to achieve success in life


Hack a Day


IntoMobile » Android


Koen's blog

Interesting Blogs