0
From what I can piece together the /sys/block/md0/md/stripe_cache_size is for raid5 and 6 set at a very low default value to avoid starving machines for memory.
By increasing this value you can get a significant speed boost from your raid array. The default value is 256 and as far as I have understood this "translates" to 256 * 4096 * disks. So for a 8 disk raid 6 this would mean that 8 megabytes of memory is used.
I think this would translate to about one megabyte per disk. Now, today most disks have at least 32mb of cache and sometimes even more. To be able to use all the cache of the disks I would speculate that a value of 8192 or a little less would be good and give no higher worst case scenario for corruption than the default value. Also the raid array now consumes 268MB of memory, but that is a tradeoff I am willing to make unless corruption or data loss risk is significantly increased by alternating this value.
- What exactly is stripe_cache_size?
- How does it work?
- Does increasing the value increase the risk of corruption / data loss?
- Is the memory usage the only reason it is set low by default?
related: http://serverfault.com/questions/579489/linux-what-is-stripe-cache-size-and-what-does-it-do. The answer there unfortunately doesn't really answer these questions, but it's better than nothing.
– Peter Cordes – 2016-02-28T00:44:08.647