Skip to content

Instantly share code, notes, and snippets.

@petergloor
Last active May 30, 2017 12:33
Show Gist options
  • Save petergloor/0f474d43ac4bc6e8ac76b5eefdb3b4c2 to your computer and use it in GitHub Desktop.
Save petergloor/0f474d43ac4bc6e8ac76b5eefdb3b4c2 to your computer and use it in GitHub Desktop.
Temporarily decrease raid 1 activity to let other operations better perform

In order to avoid performance issues for other operations (e.g. upgrades or backups) slow down raid 1 synch by lowering its max speed to zero. This might especially be useful after a fresh install when the system performs slow for a few hours, but still some final work needs to be done (e.g. create user accounts and software installation/configuration).

First check the current value of /proc/sys/dev/raid/speed_limit_max:

# cat /proc/sys/dev/raid/speed_limit_max
200000

Next, set /proc/sys/dev/raid/speed_limit_max to 0:

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

Finally, reset the speed to its previous value to get back full speed synchronization.

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

Note: sudo-ers need to do something like this:

sudo bash -c 'echo 200000 > /proc/sys/dev/raid/speed_limit_max'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment