[HOWTO] How to increase raid rebuild speed

Discussion on setting up QNAP NAS products.

Re: [HOWTO] How to increase raid rebuild speed

Postby trueimage » Thu Feb 09, 2012 9:12 am

cat /proc/sys/dev/raid/speed_limit_max
200000
cat /proc/sys/dev/raid/speed_limit_min
5000

cat /proc/mdstat shows:

md0 : active raid5 sda3[4] sdd3[3] sdc3[2] sdb3[1]
5855836800 blocks level 5, 64k chunk, algorithm 2 [4/3] [_UUU]
[>....................] recovery = 2.4% (48365644/1951945600) finish=68209.6min speed=465K/sec


why so slow? 68,210 minutes is ~48 days????
trueimage
Starting out
 
Posts: 42
Joined: Sun May 16, 2010 5:11 am
NAS Model: TS-439 Pro II

Re: [HOWTO] How to increase raid rebuild speed

Postby Don » Thu Feb 09, 2012 11:23 am

Applies to all models.
Search (upper right hand corner) before posting.

Unofficial QNAP How-To Guide: http://forum.qnap.com/viewtopic.php?f=11&t=10622
How-To increase raid rebuild speed: http://forum.qnap.com/viewtopic.php?f=11&t=10268
How-To install dnsmasq: http://forum.qnap.com/viewtopic.php?f=90&t=26395

NAS: TS-509 F/W 3.6.1.0302 | TS-419P+ F/W 3.8.2.0301 | TS-639 F/W 3.6.1.0302 | TS-669 F/W 3.8.2.0301
QPKG: ipkg, LMS 7.7.1, PhpGedView, phpMyAdmin, WordPress, Xdove 1.3
IPKG: atop, busybox, dnsmasq, flac, htop, lame, less, libid3tag, lsof, man, man-pages, unzip, wakelan
OTHER: crontab, phpXmail, SpeedTest
N/W: Asus RT-N16 router w/dd-wrt | SMC gigagit switch
User avatar
Don
Moderator
 
Posts: 5587
Joined: Thu Jan 03, 2008 4:56 am
Location: Long Island, New York
NAS Model: TS-509 Pro

Re: [HOWTO] How to increase raid rebuild speed

Postby P3R » Thu Feb 09, 2012 3:23 pm

trueimage wrote:why so slow? 68,210 minutes is ~48 days????
Because you have an error on the remaining disks. I doubt that you can solve that by tweaking.
No, RAID has never ever been a replacement for backups. Without backups you will eventually lose data!
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TS-559 Pro II 3*HUA723030ALA640 RAID 5 | TS-459 Pro II 4*HDS722020ALA330 RAID 6 | TS-419P II 2*WD30EFRX RAID 1 | TS-119 ST3750640AS | TS-219P HDS722020ALA330 | All with APC Back-UPS ES BE700G-GR
P3R
Ask me anything
 
Posts: 5374
Joined: Sat Dec 29, 2007 1:39 am
Location: Sweden
NAS Model: TS-559 Pro II

Re: [HOWTO] How to increase raid rebuild speed

Postby jello_moto » Thu Feb 16, 2012 7:17 am

The rebuilds have always taken so ridiculously long that I've found its just faster to create a new array and copy all the data back over the network. And now that the newer boxes have 10 gigabit, its really an order of magnitude slower to rebuild than copy over the network.
jello_moto
Know my way around
 
Posts: 105
Joined: Mon Mar 09, 2009 11:14 pm
NAS Model: TS-419P

Re: [HOWTO] How to increase raid rebuild speed

Postby schumaku » Mon Apr 02, 2012 3:36 pm

jello_moto wrote:The rebuilds have always taken so ridiculously long that I've found its just faster to create a new array and copy all the data back over the network. And now that the newer boxes have 10 gigabit, its really an order of magnitude slower to rebuild than copy over the network.
The key advantage of a RAID rebuild ie. following a disk replacement is the ongoing availability of the storage without interrupting the service.
User avatar
schumaku
Guru
 
Posts: 22583
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: [HOWTO] How to increase raid rebuild speed

Postby Briain » Tue Apr 03, 2012 12:51 am

taylortap wrote:I've noticed that not only will this increase the RAID rebuild speed but has also increased my network thoroughput. I set my min at 100000 and everything is hauling ** now!!

Thanks OP for the information.


Hi

The above is rather interesting. Has anyone else verified that by testing to see whether it changes performance under normal usage conditions? I often back one NAS (TS-659 with RAID 6) to another NAS (TS-219P+ with RAID 1). It usually takes only about 15 hours to transfer 1 TB of >30 MB FLAC files (and about 200 GB of smaller files), so I'll maybe try that trick on the TS-219P+ just to see if I can detect any difference.

Bri :)
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: [HOWTO] How to increase raid rebuild speed

Postby Metzlmane » Sun Jul 01, 2012 6:01 pm

Thanks for the information. Now it's running a little faster.

2x Hitachi Ultrastar 7K4000 3000GB, SATA 6Gb/s (HUS724030ALE640/0F14684)
Raid 1
Code: Select all
Min 100000
Max 200000

md0 : active raid1 sdb3[1] sda3[0]
      2928697556 blocks super 1.0 [2/2] [UU]
      [=====>...............]  resync = 29.0% (851113152/2928697556) finish=273.3min speed=126652K/sec

on TS1079
The CPU is bored, but the harddisks can't go faster.
Metzlmane
New here
 
Posts: 2
Joined: Tue Apr 24, 2012 7:32 pm
NAS Model: TS-659 Pro II

Re: [HOWTO] How to increase raid rebuild speed

Postby DarkLogix » Fri Oct 19, 2012 2:50 am

taylortap wrote:I've noticed that not only will this increase the RAID rebuild speed but has also increased my network thoroughput. I set my min at 100000 and everything is hauling ** now!!

Thanks OP for the information.

Have you done some benchmarks on this?
and do you think it'd apply to a TS-469-Pro?
DarkLogix
Getting the hang of things
 
Posts: 60
Joined: Thu Oct 11, 2012 5:02 am
NAS Model: TS-x69 Pro

Re: [HOWTO] How to increase raid rebuild speed

Postby raffe » Fri Oct 26, 2012 2:38 am

Thanks for a good tip Don!
Don wrote:...
...
Code: Select all
watch cat /proc/mdstat

There is no watch program on the NAS so that part won't work...
...

To get something similar to "watch", it's possible to use a command line like this (just write (or copy/paste) the whole line and press [Enter]):
Code: Select all
while true; do cat /proc/mdstat; sleep 1; done

End it with Ctrl + C. The number "1" in "sleep 1" makes it wait one second before again running the command "cat /proc/mdstat" in a loop. Change 1 to higher value if you want longer time between updates. Not the same as watch, but anyhow...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ If you are too open-minded, your brain may fall out ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
User avatar
raffe
Know my way around
 
Posts: 138
Joined: Thu Nov 08, 2007 8:03 pm

Re: [HOWTO] How to increase raid rebuild speed

Postby chrispage » Sat Dec 01, 2012 2:04 pm

Hi guys.

I'm going through the painful task of upgrading 6 x 2TB disks with 3TB WD Red disks in my 659 Pro II .. The first disk took approximately 100 hrs and the second one is going almost as slow!

finish=4673.1min speed=5154K/sec

Any ideas?


Thanks

UPDATE

Okay, i used the echo command to set the minimum and its now running at 48000K/sec! AWESOME :)
QNAP TS-659 Pro II
FW 3.8.0 Build 20121114
Raid 5 - 6x2TB Baracuta Green (Migrating to 6x3TB WD Red)
QPKGs
-SABnzbd 0.7.0
-Sickbeard 120925
-CouchPotato2 120501
-AirVideoServer Alpha.6-r8
-CrashPlan 3.2.1_24
-PlexMediaServer 0.9.7.3.31
User avatar
chrispage
Starting out
 
Posts: 29
Joined: Sun May 01, 2011 1:53 am
NAS Model: TS-559 Pro II

Re: [HOWTO] How to increase raid rebuild speed

Postby mannebk » Tue Dec 25, 2012 12:18 am

thx, pushed my 410 to 50 as well, nice tip,

my systemload was already constant over 50% but jumping around and now its a solid 100% for a raid 5 expansion from 3 to 4 500gb hdds.

Manne
Running a TS410 and a TS659pro. Right now (2012/12/15) I would gladly exchange them to any other similar system not produced by QNAP. Most of the QNAP frontends are just so CRAPPY as if a trainee did the development.
mannebk
Starting out
 
Posts: 44
Joined: Fri Apr 02, 2010 5:54 pm
Location: Stuttgart
NAS Model: TS-459 Pro

Re: [HOWTO] How to increase raid rebuild speed

Postby fantomas » Wed Feb 20, 2013 12:56 am

There's one more option for rebuilding RAID5/RAID6 devices:

# cat /sys/block/md0/md/stripe_cache_size
4096

increasing this could help, last time I have tried 16384 (4x more).
having 19 years of experience with administration of internet servers, OS (mostly linux) and applications.
fantomas
Been there, done that
 
Posts: 582
Joined: Mon Feb 07, 2011 5:40 am
Location: Bratislava, Slovakia
NAS Model: TS-419P+

Re: [HOWTO] How to increase raid rebuild speed

Postby gPaq » Sun Mar 03, 2013 11:33 pm

Although this tip is very much appreciated, and all the commands work on my newly purchased TS-469 Pro, making the changes on "speed_limit_min" makes not a lick of difference, unfortunately. I increased this speed gradually from the default 5000 to 50000, up to 150000, and basically nothing happens. The processor utilization does not go up (hovers around 16% before and after changes), and after 11 hours of re-striping I'm at 17%, which puts my ETA at about 4 more days to completion. That's not reasonable anymore... Is there anything that puts a damper on this configuration in newer models? As some other users indicated, the changes seem to have no effect whatsoever. Below are my settings for reference (apparently indicating current throughput at 22868K/sec or almost 23 MB/sec, right?). This is a TS-469 Pro with latest firmware 3.8.1 and 3 GB memory (default 1 GB with 2 GB added), expanding RAID5 from 3 disks to 4 disks, each being a Western Digital 3 GB Red WD30EFRX.

[~] # cat /proc/sys/dev/raid/speed_limit_max
200000
[~] # cat /proc/sys/dev/raid/speed_limit_min
150000
[~] #

[~] # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md0 : active raid5 sdd3[3] sda3[0] sdc3[2] sdb3[1]
5857395072 blocks super 1.0 level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
[======>..............] reshape = 34.2% (1003124924/2928697536) finish=1403.3min speed=22868K/sec

md4 : active raid1 sdd2[2](S) sdc2[3](S) sdb2[1] sda2[0]
530048 blocks [2/2] [UU]

md13 : active raid1 sda4[0] sdd4[3] sdc4[2] sdb4[1]
458880 blocks [4/4] [UUUU]
bitmap: 0/57 pages [0KB], 4KB chunk

md9 : active raid1 sda1[0] sdd1[3] sdc1[2] sdb1[1]
530048 blocks [4/4] [UUUU]
bitmap: 0/65 pages [0KB], 4KB chunk

unused devices: <none>
[~] #
gPaq
New here
 
Posts: 3
Joined: Mon Feb 11, 2013 8:28 am
NAS Model: TS-x69 Pro

Re: [HOWTO] How to increase raid rebuild speed

Postby schumaku » Mon Mar 04, 2013 12:01 am

A reshape (change RAID layout) is much more intensive than resync.
User avatar
schumaku
Guru
 
Posts: 22583
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: [HOWTO] How to increase raid rebuild speed

Postby gPaq » Mon Mar 04, 2013 1:08 am

schumaku wrote:A reshape (change RAID layout) is much more intensive than resync.


Dear schumaku, I believe I understand what you are saying and that may indeed be so, however, from the web GUI I simply selected to Add Hard Drive, going from RAID 5 with 3 disks to RAID 5 with 4 disks, and this is the process that the QNAP is executing. I wish I could change it, or at least make it go faster, especially because there is no data on this volume (other than the default shares): this is a brand new installation and I will copy my data to the NAS at a later time when the RAID configuration is stable. Any further input is appreciated.
gPaq
New here
 
Posts: 3
Joined: Mon Feb 11, 2013 8:28 am
NAS Model: TS-x69 Pro

PreviousNext

Return to Turbo Station Installation & Setup

Who is online

Users browsing this forum: No registered users and 3 guests

cron