Christophe CasalegnoAutoimmune warrior, Entrepreneur & Bio/Hacker

brain@127.0.0.1:~$ cat post.html

Linux: speed up RAID builds / rebuilds

Hello world. You have probably had to wait long, far too long hours (or even a few days) for your RAID array to finish initialising or rebuilding, especially with a whole stack of hard drives totalling tens of TB.

You cannot cut that time to zero, but did you know you can reduce it, sometimes dramatically?

The speed of building / rebuilding a RAID array under Gnu / Linux is capped in software. To see the limit, just run:

cat  /proc/sys/dev/raid/speed_limit_max

In most cases, you will get a value of 200000.

To modify this value, you just need to use the echo command, for example:

echo 500000 > /proc/sys/dev/raid/speed_limit_max 

In a typical RAID 10 or RAID 5 setup with 4 x 4TB / 6 TB disks, this doubles the build speed, which can make quite a difference! Depending on the technology (SSD, NVME, etc.), the number and type of disks, it can go much faster still.

NB: be careful. While this causes no problems during the initial build, for a RAID rebuild on a production system you must make sure you have the necessary disk resources (IOPS / Read / Write), or you could run into trouble ;) If, on the other hand, the system is being initialised, or you are rebuilding with production stopped: no risk, let loose!

Enjoy !

Christophe Casalegno
​You can follow me on: Twitter | Facebook | Linkedin | Telegram | Youtube

Leave a comment

Add a comment
Christophe Casalegno Brain 0verride

Keep it simple
and direct!