Speeding Up Linux Software Raid Building And Re-syncing

The /proc/sys/dev/raid/speed_limit_min is config file that reflects the current "goal" rebuild speed for times when non-rebuild activity is current on an array. The speed is in Kibibytes per second, and is a per-device rate, not a per-array rate . The default is 1000.

The /proc/sys/dev/raid/speed_limit_max is config file that reflects the current "goal" rebuild speed for times when no non-rebuild activity is current on an array. The default is 100,000.

To see current limits, enter:

# sysctl dev.raid.speed_limit_min
# sysctl dev.raid.speed_limit_max

To increase speed, enter:


echo value > /proc/sys/dev/raid/speed_limit_min

OR


sysctl -w dev.raid.speed_limit_min=value

In this example, set it to 50000 K/Sec, enter:


# echo 50000 > /proc/sys/dev/raid/speed_limit_min

OR


# sysctl -w dev.raid.speed_limit_min=50000

If you want to override the defaults you could add these two lines to /etc/sysctl.conf:

dev.raid.speed_limit_min = 50000
dev.raid.speed_limit_max = 200000

Bitmap Option

Bitmaps optimize rebuild time after a crash, or after removing and re-adding a device. Turn it on by typing the following command:


# mdadm --grow --bitmap=internal /dev/md0

Once array rebuild or fully synced, disable bitmaps:


# mdadm --grow --bitmap=none /dev/md0

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.