<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: HowTo: Speed Up Linux Software Raid Building And Re-syncing</title> <atom:link href="http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: M1TH</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-175896</link> <dc:creator>M1TH</dc:creator> <pubDate>Mon, 21 Nov 2011 17:02:42 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-175896</guid> <description>Also, thanks to Cr0t!! sped up my raid build from about 28-30K/sec to 40-45K/sec, topping out over 50K occasionally.  recognize what you are doing issuing those commands, which is tuning the hard drive parameters that deal with pretty low-level communication options of the device.  options tied to the drivers, firmware and kernel.  so, use them with care, and don&#039;t be surprised if extreme circumstances cause a lock-up or other failure case causing you to have to start your raid rebuild over.  point being, use with caution and in experimental environment as mentioned.  still, this did not cause any issues with my setup even doing it during the build, and in most cases on properly working hardware it should not.  but be warned!
anywho, the original problem for me turned out to be one bad hard drive causing the array to be built at &lt;1K/sec.  sad thing is that nothing about the system or even smartctl really indicated errors.  it was really diagnosed by noticing the smartctl &#039;remap&#039; value skyrocketing on one device where it was not on any of the others, and physically looking at the box showed 10x more LED activity on the problematic disk as it tried every read and write vs the other 19 in the array.  so, don&#039;t rely on your os to inform you of hard drive issues and you can&#039;t rely on SMART at face value either.  i think any experienced sys-admin would validate that statement.
happy tuning everyone =)  thanks for the info.</description> <content:encoded><![CDATA[<p>Also, thanks to Cr0t!! sped up my raid build from about 28-30K/sec to 40-45K/sec, topping out over 50K occasionally.  recognize what you are doing issuing those commands, which is tuning the hard drive parameters that deal with pretty low-level communication options of the device.  options tied to the drivers, firmware and kernel.  so, use them with care, and don&#8217;t be surprised if extreme circumstances cause a lock-up or other failure case causing you to have to start your raid rebuild over.  point being, use with caution and in experimental environment as mentioned.  still, this did not cause any issues with my setup even doing it during the build, and in most cases on properly working hardware it should not.  but be warned!</p><p>anywho, the original problem for me turned out to be one bad hard drive causing the array to be built at &lt;1K/sec.  sad thing is that nothing about the system or even smartctl really indicated errors.  it was really diagnosed by noticing the smartctl &#039;remap&#039; value skyrocketing on one device where it was not on any of the others, and physically looking at the box showed 10x more LED activity on the problematic disk as it tried every read and write vs the other 19 in the array.  so, don&#039;t rely on your os to inform you of hard drive issues and you can&#039;t rely on SMART at face value either.  i think any experienced sys-admin would validate that statement.</p><p>happy tuning everyone =)  thanks for the info.</p> ]]></content:encoded> </item> <item><title>By: rtcbad</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-175182</link> <dc:creator>rtcbad</dc:creator> <pubDate>Mon, 24 Oct 2011 22:37:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-175182</guid> <description>Thanks to this article and the comments on tweaking the drive parameters from Cr0t, rebuild performance on RAID1 went from 32K to over 110K during system idle.  The combination of increasing the dev.raid.speed_limit_min to 50000 and disabling NCQ on both drives gave a phenomenal increase in performance.  After seeing how much disabling NCQ helped, I further increased dev.raid.speed_limit_min to 110000 to further speed up the rebuild. The rebuild went from an initial estimate of 6 hours, to only taking about 1.5 hours after these tweaks.</description> <content:encoded><![CDATA[<p>Thanks to this article and the comments on tweaking the drive parameters from Cr0t, rebuild performance on RAID1 went from 32K to over 110K during system idle.  The combination of increasing the dev.raid.speed_limit_min to 50000 and disabling NCQ on both drives gave a phenomenal increase in performance.  After seeing how much disabling NCQ helped, I further increased dev.raid.speed_limit_min to 110000 to further speed up the rebuild. The rebuild went from an initial estimate of 6 hours, to only taking about 1.5 hours after these tweaks.</p> ]]></content:encoded> </item> <item><title>By: David Clymer</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-173193</link> <dc:creator>David Clymer</dc:creator> <pubDate>Wed, 10 Aug 2011 12:32:33 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-173193</guid> <description>You could split the disks into two partitions, a small 100M partition,  and a data partition which uses the rest of the disk. Set up two raid volumes. The small partitions would be raid1, and the rest raid5/6 whatever. install everything on the raid6 volume and mount the raid1 as /boot. Setup grub for each disk:
root (hd0,0)
setup (hd0)
root (hd1,0)
setup (hd1)
...etc.
In this way, any drive could be removed and you could still boot the machine.</description> <content:encoded><![CDATA[<p>You could split the disks into two partitions, a small 100M partition,  and a data partition which uses the rest of the disk. Set up two raid volumes. The small partitions would be raid1, and the rest raid5/6 whatever. install everything on the raid6 volume and mount the raid1 as /boot. Setup grub for each disk:</p><p>root (hd0,0)<br
/> setup (hd0)<br
/> root (hd1,0)<br
/> setup (hd1)<br
/> &#8230;etc.</p><p>In this way, any drive could be removed and you could still boot the machine.</p> ]]></content:encoded> </item> <item><title>By: cd</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-171805</link> <dc:creator>cd</dc:creator> <pubDate>Wed, 08 Jun 2011 17:20:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-171805</guid> <description>just for sharing : replacing a failed drive , 2TB caviar black - WD2002FAEX, 3 good drives + 1 new on a production server (still gets 100Mbs trafic out  )
[&gt;....................]  recovery =  2.8% (56272128/1942250240) finish=888.0min speed=35394K/sec
The drives ar having a 92% busy
DSK &#124;          sda &#124; busy     92%
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq&#124; read  writ&#124; recv  send&#124;  in   out &#124; int   csw
6   6  83   3   0   2&#124; 107M   51M&#124;   0     0 &#124; 5.6B   44B&#124;8900    14k
1  10  72  14   0   3&#124; 363M  150M&#124;8421k   23M&#124;   0     0 &#124;9330    11k
7  12  63  14   1   4&#124; 416M  150M&#124;8009k   25M&#124;   0     0 &#124;9804    12k
won&#039;t push the speed limit to keep the server responsive.
ps: careful running &quot;magic&quot; scripts with &quot;magic&quot; settings. got my server (colocated) frozen while changing some readhead values &quot;on the fly&quot;. Costed me 30$ extra intervention to the colo guys to reboot it (it was on weekend :)) .
Can be fun tweaking but really there&#039;s no silver bullet that comes without some risks. For oldies : there were times when computers came with a Turbo button. If you&#039;d press it the cpu frequency would get higher. Of course 50% of the time Duke Nukem would freeze if you press the turbo button while playing:)</description> <content:encoded><![CDATA[<p>just for sharing : replacing a failed drive , 2TB caviar black &#8211; WD2002FAEX, 3 good drives + 1 new on a production server (still gets 100Mbs trafic out  )</p><p> [&gt;....................]  recovery =  2.8% (56272128/1942250240) finish=888.0min speed=35394K/sec</p><p>The drives ar having a 92% busy<br
/> DSK |          sda | busy     92%</p><p>&#8212;-total-cpu-usage&#8212;- -dsk/total- -net/total- &#8212;paging&#8211; &#8212;system&#8211;<br
/> usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw<br
/> 6   6  83   3   0   2| 107M   51M|   0     0 | 5.6B   44B|8900    14k<br
/> 1  10  72  14   0   3| 363M  150M|8421k   23M|   0     0 |9330    11k<br
/> 7  12  63  14   1   4| 416M  150M|8009k   25M|   0     0 |9804    12k</p><p>won&#8217;t push the speed limit to keep the server responsive.</p><p>ps: careful running &#8220;magic&#8221; scripts with &#8220;magic&#8221; settings. got my server (colocated) frozen while changing some readhead values &#8220;on the fly&#8221;. Costed me 30$ extra intervention to the colo guys to reboot it (it was on weekend :)) .</p><p>Can be fun tweaking but really there&#8217;s no silver bullet that comes without some risks. For oldies : there were times when computers came with a Turbo button. If you&#8217;d press it the cpu frequency would get higher. Of course 50% of the time Duke Nukem would freeze if you press the turbo button while playing:)</p> ]]></content:encoded> </item> <item><title>By: indulis</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-171321</link> <dc:creator>indulis</dc:creator> <pubDate>Sun, 15 May 2011 06:35:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-171321</guid> <description>Sounds like the RAID setup can do 100 MB/sec, but you have changed the /proc/sys/dev/raid/speed_limit_max setting only, this is used if there is no other activity on the disks at all.  SO the rise to 100MB/sec is wen no other I/O activity happens. Try changing /proc/sys/dev/raid/speed_limit_min
&lt;blockquote&gt;echo &quot;50000&quot; &gt; /proc/sys/dev/raid/speed_limit_min&lt;/blockquote&gt;
then see what happens.</description> <content:encoded><![CDATA[<p>Sounds like the RAID setup can do 100 MB/sec, but you have changed the /proc/sys/dev/raid/speed_limit_max setting only, this is used if there is no other activity on the disks at all.  SO the rise to 100MB/sec is wen no other I/O activity happens. Try changing /proc/sys/dev/raid/speed_limit_min</p><blockquote><p>echo &#8220;50000&#8243; &gt; /proc/sys/dev/raid/speed_limit_min</p></blockquote><p>then see what happens.</p> ]]></content:encoded> </item> <item><title>By: jmuellers</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-170983</link> <dc:creator>jmuellers</dc:creator> <pubDate>Thu, 28 Apr 2011 09:33:40 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-170983</guid> <description>edit:
Sometimes the speed is rising from 20000k to 100000k for a few seconds or minutes and then falling back to 20. I have no explanation for that behaviour.
Except for the resync the system is idle.
md0_raid6 is using about 5% while speed ist 20000k, 25% while speed ist 100000k
md0_resync is using a few percent at 20000k, 20% at 100000k.
Just in this moment the speed went up to 100000k for only 10 seconds... no clue.</description> <content:encoded><![CDATA[<p>edit:<br
/> Sometimes the speed is rising from 20000k to 100000k for a few seconds or minutes and then falling back to 20. I have no explanation for that behaviour.<br
/> Except for the resync the system is idle.<br
/> md0_raid6 is using about 5% while speed ist 20000k, 25% while speed ist 100000k<br
/> md0_resync is using a few percent at 20000k, 20% at 100000k.<br
/> Just in this moment the speed went up to 100000k for only 10 seconds&#8230; no clue.</p> ]]></content:encoded> </item> <item><title>By: jmuellers</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-170982</link> <dc:creator>jmuellers</dc:creator> <pubDate>Thu, 28 Apr 2011 08:58:37 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-170982</guid> <description>Setting the speed limits didn&#039;t help in my case.
I have raid6 with 6xwd20ears, with 0xfb partitions (4kb physical 4kb logical, aligned).
Resync speed after setting up the array is around 20000kb/s, I assume it will get even slower towards the end of the process.
Maybe it would be faster with AAM set to 255 (now set to 128), unfortunatly I cannot set it through my raid controller (only works if the drive is plugged in on the mainboard sata controller).
I&#039;m also not able to set the bitmap, but i think it would not affect the initial resync after having just built the array, am I right?
I would also be interested in further information about setting read ahead etc.</description> <content:encoded><![CDATA[<p>Setting the speed limits didn&#8217;t help in my case.<br
/> I have raid6 with 6xwd20ears, with 0xfb partitions (4kb physical 4kb logical, aligned).<br
/> Resync speed after setting up the array is around 20000kb/s, I assume it will get even slower towards the end of the process.</p><p>Maybe it would be faster with AAM set to 255 (now set to 128), unfortunatly I cannot set it through my raid controller (only works if the drive is plugged in on the mainboard sata controller).</p><p>I&#8217;m also not able to set the bitmap, but i think it would not affect the initial resync after having just built the array, am I right?</p><p>I would also be interested in further information about setting read ahead etc.</p> ]]></content:encoded> </item> <item><title>By: upsite</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-169294</link> <dc:creator>upsite</dc:creator> <pubDate>Mon, 28 Feb 2011 01:04:21 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-169294</guid> <description>Hi Cr0t,
on which hardware specs reliy your setra and read_ahead_kb values?
i got WD20EARS with 64mb memory.
so is it save/usefull to increase your values?
Best practice values ? limits?
thanx ;)</description> <content:encoded><![CDATA[<p>Hi Cr0t,</p><p>on which hardware specs reliy your setra and read_ahead_kb values?<br
/> i got WD20EARS with 64mb memory.<br
/> so is it save/usefull to increase your values?</p><p>Best practice values ? limits?<br
/> thanx ;)</p> ]]></content:encoded> </item> <item><title>By: dalobo</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-168906</link> <dc:creator>dalobo</dc:creator> <pubDate>Mon, 21 Feb 2011 02:32:28 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-168906</guid> <description>When I run sudo mdadm --grow --bitmap=internal /dev/md1
I get:
mdadm: failed to set internal bitmap.
The RAID is rebuilding when I ran this.  Do I need to do this before I rebuild? If so, how??
md1 : active raid5 sde[4] sdf[2] sdg[3] sdd[1] sdb[0]
5860543488 blocks super 0.91 level 5, 4k chunk, algorithm 2 [5/5] [UUUUU]
[=&gt;...................]  reshape =  8.2% (161204840/1953514496) finish=1231.1min speed=24262K/sec
No change in speed.</description> <content:encoded><![CDATA[<p>When I run sudo mdadm &#8211;grow &#8211;bitmap=internal /dev/md1</p><p>I get:</p><p>mdadm: failed to set internal bitmap.</p><p>The RAID is rebuilding when I ran this.  Do I need to do this before I rebuild? If so, how??</p><p>md1 : active raid5 sde[4] sdf[2] sdg[3] sdd[1] sdb[0]<br
/> 5860543488 blocks super 0.91 level 5, 4k chunk, algorithm 2 [5/5] [UUUUU]<br
/> [=&gt;...................]  reshape =  8.2% (161204840/1953514496) finish=1231.1min speed=24262K/sec</p><p>No change in speed.</p> ]]></content:encoded> </item> <item><title>By: Rory</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-159038</link> <dc:creator>Rory</dc:creator> <pubDate>Fri, 20 Aug 2010 04:29:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-159038</guid> <description>So can you add the intent bitmap during a RAID 5 reshape?  That would really help me out...
Definitely should have looked at this before.  Great blog post, man.</description> <content:encoded><![CDATA[<p>So can you add the intent bitmap during a RAID 5 reshape?  That would really help me out&#8230;</p><p>Definitely should have looked at this before.  Great blog post, man.</p> ]]></content:encoded> </item> <item><title>By: Andy Lee Robinson</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-158760</link> <dc:creator>Andy Lee Robinson</dc:creator> <pubDate>Mon, 09 Aug 2010 06:00:58 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-158760</guid> <description>A suggestion, boot from a pendrive.
I just leave a pendrive in a usb port and boot from that as there isn&#039;t any space for more drives.
Had some problems installing Fedora 12 some months ago using the onboard fakeraid and locking up, so reinstalled as standalone drives and mdadm.
I wanted to make a kickass colocated web/mysql server and I&#039;m still soaking it, but I&#039;m worried that resyncing may cause performance issues at critical times, as I have seen while developing.
(it&#039;s now part of a 3-node multiple master mysql cluster+slave experiment, with one node at the ISP linked to here at home over 30mbps / ssh tunnels) :-)
My setup:
RAID10, persistent superblock (host i7/920 + 12Gb RAM)
&#124;=========md0========&#124;====md1====&#124;  /dev/sda 1Tb
&#124;=========md0========&#124;====md1====&#124;  /dev/sdb 1Tb
&#124;=========md0========&#124;====md1====&#124;  /dev/sdc 1Tb
&#124;=========md0========&#124;====md1====&#124;  /dev/sdd 1Tb
&#124;=========md0========&#124;                            /dev/sde 750Gb
&#124;=========md0========&#124;                            /dev/sdf  750Gb
&#124;======&#124; /dev/sdg 2x250Gb (HW raid1)
&#124;=&#124; /dev/sdh  1Gb pendrive /boot</description> <content:encoded><![CDATA[<p>A suggestion, boot from a pendrive.<br
/> I just leave a pendrive in a usb port and boot from that as there isn&#8217;t any space for more drives.<br
/> Had some problems installing Fedora 12 some months ago using the onboard fakeraid and locking up, so reinstalled as standalone drives and mdadm.<br
/> I wanted to make a kickass colocated web/mysql server and I&#8217;m still soaking it, but I&#8217;m worried that resyncing may cause performance issues at critical times, as I have seen while developing.<br
/> (it&#8217;s now part of a 3-node multiple master mysql cluster+slave experiment, with one node at the ISP linked to here at home over 30mbps / ssh tunnels) :-)</p><p>My setup:<br
/> RAID10, persistent superblock (host i7/920 + 12Gb RAM)<br
/> |=========md0========|====md1====|  /dev/sda 1Tb<br
/> |=========md0========|====md1====|  /dev/sdb 1Tb<br
/> |=========md0========|====md1====|  /dev/sdc 1Tb<br
/> |=========md0========|====md1====|  /dev/sdd 1Tb<br
/> |=========md0========|                            /dev/sde 750Gb<br
/> |=========md0========|                            /dev/sdf  750Gb<br
/> |======| /dev/sdg 2x250Gb (HW raid1)<br
/> |=| /dev/sdh  1Gb pendrive /boot</p> ]]></content:encoded> </item> <item><title>By: Jord</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-158537</link> <dc:creator>Jord</dc:creator> <pubDate>Thu, 29 Jul 2010 13:07:18 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-158537</guid> <description>The easiest solution I found was to combine raid 1 (for booting the system) &amp; raid 5 (for data) on the same six disks. Agreed, I now have a 6 disk raid 1, but it is only 2GB. The rest is raid 5. Hopes this helps someone facing the same problems sometimes.
Cheers, Jord</description> <content:encoded><![CDATA[<p>The easiest solution I found was to combine raid 1 (for booting the system) &amp; raid 5 (for data) on the same six disks. Agreed, I now have a 6 disk raid 1, but it is only 2GB. The rest is raid 5. Hopes this helps someone facing the same problems sometimes.</p><p>Cheers, Jord</p> ]]></content:encoded> </item> <item><title>By: Jord</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-158138</link> <dc:creator>Jord</dc:creator> <pubDate>Fri, 16 Jul 2010 11:20:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-158138</guid> <description>One more question on the software raid possibilities:
with a hardware raid, when one disk dies, you can still boot the machine. I had achieved the same for RAID-1 with info found on the net, but how does one goes to achieve the same for a 6 disk RAID-5 setup? I can&#039;t find that info.... Any suggestions or links?
One possible solution I came up with (but I&#039;m not too keen on using it) would be to install the system to an USB drive/stick (of which one can easily make backups, or even use 2 usb devices in RAID-1) and keep the 6 drives as pure data-disks (no OS) in RAID 5.
Thanks in advance</description> <content:encoded><![CDATA[<p>One more question on the software raid possibilities:<br
/> with a hardware raid, when one disk dies, you can still boot the machine. I had achieved the same for RAID-1 with info found on the net, but how does one goes to achieve the same for a 6 disk RAID-5 setup? I can&#8217;t find that info&#8230;. Any suggestions or links?</p><p>One possible solution I came up with (but I&#8217;m not too keen on using it) would be to install the system to an USB drive/stick (of which one can easily make backups, or even use 2 usb devices in RAID-1) and keep the 6 drives as pure data-disks (no OS) in RAID 5.</p><p>Thanks in advance</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-156711</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Fri, 18 Jun 2010 20:23:53 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-156711</guid> <description>Thanks for sharing your script.</description> <content:encoded><![CDATA[<p>Thanks for sharing your script.</p> ]]></content:encoded> </item> <item><title>By: Cr0t</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-156710</link> <dc:creator>Cr0t</dc:creator> <pubDate>Fri, 18 Jun 2010 20:11:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-156710</guid> <description>One of my machines has 5x 2TB in a RAID5. I got even more speed out of my volume after tweaking the drives and the md0 volume itself.
---BEGIN---
&lt;pre&gt;#!/bin/bash
blockdev --setra 16384 /dev/sd[abcdefg]
echo 1024 &gt; /sys/block/sda/queue/read_ahead_kb
echo 1024 &gt; /sys/block/sdb/queue/read_ahead_kb
echo 1024 &gt; /sys/block/sdc/queue/read_ahead_kb
echo 1024 &gt; /sys/block/sdd/queue/read_ahead_kb
echo 1024 &gt; /sys/block/sde/queue/read_ahead_kb
echo 256 &gt; /sys/block/sda/queue/nr_requests
echo 256 &gt; /sys/block/sdb/queue/nr_requests
echo 256 &gt; /sys/block/sdc/queue/nr_requests
echo 256 &gt; /sys/block/sdd/queue/nr_requests
echo 256 &gt; /sys/block/sde/queue/nr_requests
# Set read-ahead.
echo &quot;Setting read-ahead to 64 MiB for /dev/md0&quot;
blockdev --setra 65536 /dev/md0
# Set stripe-cache_size for RAID5.
echo &quot;Setting stripe_cache_size to 16 MiB for /dev/md0&quot;
echo 16384 &gt; /sys/block/md0/md/stripe_cache_size
echo 8192 &gt; /sys/block/md0/md/stripe_cache_active
# Disable NCQ on all disks.
echo &quot;Disabling NCQ on all disks...&quot;
echo 1 &gt; /sys/block/sda/device/queue_depth
echo 1 &gt; /sys/block/sdb/device/queue_depth
echo 1 &gt; /sys/block/sdc/device/queue_depth
echo 1 &gt; /sys/block/sdd/device/queue_depth
echo 1 &gt; /sys/block/sde/device/queue_depth
&lt;/pre&gt;
---END---</description> <content:encoded><![CDATA[<p>One of my machines has 5x 2TB in a RAID5. I got even more speed out of my volume after tweaking the drives and the md0 volume itself.</p><p>&#8212;BEGIN&#8212;</p><pre>#!/bin/bash
blockdev --setra 16384 /dev/sd[abcdefg]
echo 1024 &gt; /sys/block/sda/queue/read_ahead_kb
echo 1024 &gt; /sys/block/sdb/queue/read_ahead_kb
echo 1024 &gt; /sys/block/sdc/queue/read_ahead_kb
echo 1024 &gt; /sys/block/sdd/queue/read_ahead_kb
echo 1024 &gt; /sys/block/sde/queue/read_ahead_kb
echo 256 &gt; /sys/block/sda/queue/nr_requests
echo 256 &gt; /sys/block/sdb/queue/nr_requests
echo 256 &gt; /sys/block/sdc/queue/nr_requests
echo 256 &gt; /sys/block/sdd/queue/nr_requests
echo 256 &gt; /sys/block/sde/queue/nr_requests
# Set read-ahead.
echo "Setting read-ahead to 64 MiB for /dev/md0"
blockdev --setra 65536 /dev/md0
# Set stripe-cache_size for RAID5.
echo "Setting stripe_cache_size to 16 MiB for /dev/md0"
echo 16384 &gt; /sys/block/md0/md/stripe_cache_size
echo 8192 &gt; /sys/block/md0/md/stripe_cache_active
# Disable NCQ on all disks.
echo "Disabling NCQ on all disks..."
echo 1 &gt; /sys/block/sda/device/queue_depth
echo 1 &gt; /sys/block/sdb/device/queue_depth
echo 1 &gt; /sys/block/sdc/device/queue_depth
echo 1 &gt; /sys/block/sdd/device/queue_depth
echo 1 &gt; /sys/block/sde/device/queue_depth
</pre><p>&#8212;END&#8212;</p> ]]></content:encoded> </item> <item><title>By: Thank You</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-156703</link> <dc:creator>Thank You</dc:creator> <pubDate>Fri, 18 Jun 2010 14:57:45 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-156703</guid> <description>I always faced this speed problem and I thought this is due to software issue. With this tip I reduced my build time from 9.2 hours to less than 1 hour.</description> <content:encoded><![CDATA[<p>I always faced this speed problem and I thought this is due to software issue. With this tip I reduced my build time from 9.2 hours to less than 1 hour.</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-156684</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Thu, 17 Jun 2010 18:04:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-156684</guid> <description>Yes, drbd also suffer from the same issue and can be fixed by editing /etc/drbd.conf. Look out for  rate directive:
&lt;pre&gt; rate 40M;&lt;/pre&gt;
Another note LVM really slows down performance with drbd; so make sure you avoid it. See &lt;a href=&quot;http://www.drbd.org/users-guide/s-configure-syncer-rate.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;this help&lt;/a&gt; page [drbd.org].</description> <content:encoded><![CDATA[<p>Yes, drbd also suffer from the same issue and can be fixed by editing /etc/drbd.conf. Look out for  rate directive:</p><pre> rate 40M;</pre><p>Another note LVM really slows down performance with drbd; so make sure you avoid it. See <a
href="http://www.drbd.org/users-guide/s-configure-syncer-rate.html" target="_blank" rel="nofollow">this help</a> page [drbd.org].</p> ]]></content:encoded> </item> <item><title>By: Jord</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-156682</link> <dc:creator>Jord</dc:creator> <pubDate>Thu, 17 Jun 2010 17:53:08 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-156682</guid> <description>Hi there,
this for sure will help a lot when I&#039;ll install our budget backup SAN :-). Do you by any chance also now whether such limits exists for drbd-syncing?
Cheers!</description> <content:encoded><![CDATA[<p>Hi there,</p><p>this for sure will help a lot when I&#8217;ll install our budget backup SAN :-). Do you by any chance also now whether such limits exists for drbd-syncing?</p><p>Cheers!</p> ]]></content:encoded> </item> <item><title>By: ManvsTech</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-156642</link> <dc:creator>ManvsTech</dc:creator> <pubDate>Wed, 16 Jun 2010 15:56:36 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-156642</guid> <description>That&#039;s an awesome tip. From my rough calculations I assume it finished in about 1hr 45min. May not be a good thing if you bill your clients per hour :)</description> <content:encoded><![CDATA[<p>That&#8217;s an awesome tip. From my rough calculations I assume it finished in about 1hr 45min. May not be a good thing if you bill your clients per hour :)</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html#comment-156634</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Wed, 16 Jun 2010 10:33:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/?p=7084#comment-156634</guid> <description>Heh.. no problem. I&#039;ve updated the post with bitmap option which will increase speed further.</description> <content:encoded><![CDATA[<p>Heh.. no problem. I&#8217;ve updated the post with bitmap option which will increase speed further.</p> ]]></content:encoded> </item> </channel> </rss>
