1. report raid rebuild status
cat /proc/mdstat
watch -n1 cat /proc/mdstat
2. raid speed limits. Increases CPU and RAM utilisation
#report current speed limits
sysctl dev.raid.speed_limit_min
sysctl dev.raid.speed_limit_max
#set speed limits (runtime only default values)
sysctl -w dev.raid.speed_limit_min=1000
sysctl -w dev.raid.speed_limit_max=100000
#set speed limits at boot by editing /etc/sysctl.conf
dev.raid.speed_limit_min=50000
# for 3 disk array
dev.raid.speed_limit_max=500000
# for 4-5 disk array
dev.raid.speed_limit_max=2000000
#uncomment for 6-12 disk array
#dev.raid.speed_limit_max=5000000
3. disable NCQ on raid members
#read current NCQ depth (default 32)
cat /sys/block/sda/device/queue_depth
#disable NCQ (runtime only)
echo 1 > /sys/block/device/queue_depth
#disable NCQ at boot, requires sysfs package to be installed
# edit /etc/sysfs.conf
#disable NCQ on raid members sda, sdb, sdd, sde
block/sda/device/queue_depth=1
block/sdb/device/queue_depth=1
block/sdd/device/queue_depth=1
block/sde/device/queue_depth=1
4. set raid5 stripe cache size
#ram_used = system_page_size * nr_disks * stripe_cache_size
# read current stripe_cache_size on array md0
cat /sys/block/md0/md/stripe_cache_size
#set to 16MiB (runtime only)
echo 16384 > /sys/block/md0/md/stripe_cache_size
#set to 32MiB at boot
#create udev rule /etc/udev/rules.d/60-md-stripe-cache-size
SUBSYSTEM=="block", KERNEL=="md*", ACTION=="add|change", TEST=="md/stripe_cache_size", ATTR{md/stripe_cache_size}="32768"
#for Open Media Vault (OVM default 8MiB) edit /etc/udev/rules.d/99-openmediavault-md-raid-rules
SUBSYSTEM=="block", KERNEL=="md*", ACTION=="add|change", TEST=="md/stripe_cache_size", ATTR{md/stripe_cache_size}="8192"
5. Set read ahead, in 512 byte sectors
blockdev --getra /dev/md0
#set 32MB read ahead (runtime only)
blockdev --setra 65536 /dev/md0
« Go back
Powered by Help Desk Software HESK, in partnership with SysAid Technologies