Skip to content

Instantly share code, notes, and snippets.

@stevenharman
Created March 31, 2015 00:03
Show Gist options
  • Save stevenharman/353a8b6858b12c10aa7d to your computer and use it in GitHub Desktop.
Save stevenharman/353a8b6858b12c10aa7d to your computer and use it in GitHub Desktop.
Improving RAID Expansion speed (and wall clock time) on my Synology DS1515+.
# log the default values:
echo "speed_limit_max: `cat /proc/sys/dev/raid/speed_limit_max`" #=> 200000
echo "speed_limit_min: `cat /proc/sys/dev/raid/speed_limit_min`" #=> 10000
echo "stripe_cache_size: `/sys/block/md2/md/stripe_cache_size`" #=> 256
# update to use more RAM (Stripe Cache Size) and higher lower bound (speed_limit_min)
echo 100000 > /proc/sys/dev/raid/speed_limit_min
# This will result in more memory usage. bumping to 32768 resulted in ~512MB RAM increase.
echo 32768 > /sys/block/md2/md/stripe_cache_size
# revert the settings after expansion has finished
echo 10000 > /proc/sys/dev/raid/speed_limit_min
echo 256 > /sys/block/md2/md/stripe_cache_size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment