I am currently building a software RAID under Linux using mdadm utility and I've read a few articles that describe how to increase the stripe_cache_size value for that RAID and how to calculate an appropriate value for stripe_cache_size.

I have increased mine to 16384 and my current sync rate on a new RAID5 in /proc/mdstat has jumped from from 71065K/sec to 143690K/sec (doubled!) which is good news. I also see the matching and expected increase in RAM usage however I can't find any documentation on what this setting does and how it works.

It seems to be a cache of some sort for the RAID that exists in RAM. That is all I can tell from its name and the effects seen by changing it. Is there any official "Linux" documentation for this setting and description of it?

1 Answer 1


from my understanding the stipe_cache_size is the number of stripe entries in the stripe cache. The stripe entries varies from systems to system but it is mostly controlled by the page size(default of 4096 bytes on linux systems)(https://github.com/torvalds/linux/blob/master/drivers/md/raid5.c#L73 , this file have all the logic of the stripe cache if you'd like to dig deeper) so in a 4 disk RAID5, a stripe_cache_size of 32768 will cost you 512MB of RAM. as far as I know it affect only raid5.

here are 2 documentation references: - https://github.com/torvalds/linux/blob/master/Documentation/md.txt#L603 - https://raid.wiki.kernel.org/index.php/Performance#Some_problem_solving_for_benchmarking

  • 1
    Number of entries of what, your answer is a little ambiguous? :)
    – jwbensley
    May 19, 2014 at 21:52
  • I assume it also apply for RAID6, right
    – MrCalvin
    May 28, 2019 at 21:01
  • Do you mean 32768 will cost 512kB of RAM?
    – jrwren
    Sep 9, 2019 at 20:39
  • 32768 * 4(disks) * 4096(page) is 512MB Oct 6 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.