[GH-ISSUE #383] Feature: Add ability to speed up RAID Resyncs and Reshaping #137

Open
opened 2026-03-07 19:16:12 +03:00 by kerem · 0 comments
Owner

Originally created by @madereddy on GitHub (Nov 12, 2024).
Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/383

Originally assigned to: @007revad on GitHub.

Providing the ability to speed up RAID Resyncs and Reshaping would be very helpful. This gist has alot of details on it.

  1. Add ability to capture the defaults for the following commands
cat /sys/block/md2/md/stripe_cache_size
cat /proc/sys/dev/raid/speed_limit_min
cat /sys/block/md2/queue/read_ahead_kb
cat /sys/block/md2/md/sync_max
  1. Set new max values to help speed up the RAID operation
$ echo 32768 > /sys/block/md2/md/stripe_cache_size   # This is the max value, and it takes up 32Mib to synchronize read/write operations while the array is degraded
$ echo 50000 > /proc/sys/dev/raid/speed_limit_min    # This is a hint that you want more focus on the sync-expansion task
$ echo 32768 > /sys/block/md2/queue/read_ahead_kb    # This is how far ahead of a read request the drive array will preload
$ echo max > /sys/block/md2/md/sync_max
  1. After RAID operation completes have a command to set the values back to the default captured in step 1.

Details on how much faster the RAID operation was by setting the different values in this gist comment.

Originally created by @madereddy on GitHub (Nov 12, 2024). Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/383 Originally assigned to: @007revad on GitHub. Providing the ability to speed up RAID Resyncs and Reshaping would be very helpful. This [gist](https://gist.github.com/fbartho/2cb998dc1f10d13c124bf736286fd757) has alot of details on it. 1. Add ability to capture the defaults for the following commands ``` cat /sys/block/md2/md/stripe_cache_size cat /proc/sys/dev/raid/speed_limit_min cat /sys/block/md2/queue/read_ahead_kb cat /sys/block/md2/md/sync_max ``` 2. Set new max values to help speed up the RAID operation ``` $ echo 32768 > /sys/block/md2/md/stripe_cache_size # This is the max value, and it takes up 32Mib to synchronize read/write operations while the array is degraded $ echo 50000 > /proc/sys/dev/raid/speed_limit_min # This is a hint that you want more focus on the sync-expansion task $ echo 32768 > /sys/block/md2/queue/read_ahead_kb # This is how far ahead of a read request the drive array will preload $ echo max > /sys/block/md2/md/sync_max ``` 3. After RAID operation completes have a command to set the values back to the default captured in step 1. Details on how much faster the RAID operation was by setting the different values in this [gist comment](https://gist.github.com/fbartho/2cb998dc1f10d13c124bf736286fd757?permalink_comment_id=5279285#gistcomment-5279285).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Synology_HDD_db#137
No description provided.