[mythtv-users] minimizing impact of RAID rebuild/resync on MythTV

Dan Ritter dsr-myth at tao.merseine.nu
Sun Feb 3 21:49:57 UTC 2008


On Sun, Feb 03, 2008 at 02:56:12PM -0500, Tom Metro wrote:
> I have a 4-drive software RAID 5 array (mdadm 2.5.6) running on an 
> Ubuntu Fiesty system. The first Sunday of every month a cron job in 
> /etc/cron.d/mdadm kicks off this command:
> 
> /usr/share/mdadm/checkarray --cron --all --quiet

Why don't you move this to, say, 11 PM Monday? Or whatever other
time has the least impact on your lifestyle? You say it takes 9
hours. Is there a 9 hour block in your week where you are not
likely to watch TV?

> echo -n 100 > /proc/sys/dev/raid/speed_limit_min
> 
> which will drop the minimum bandwidth used during a rebuild/resync (when 
>    the array is in use) to 100 from the default of 1000 on Ubuntu. 
> However, while this helps, this doesn't seem to do the trick.

You can do it faster (so that it takes less time, up to a point), or slower.

> I'm wondering if the problem is more of being CPU bound, rather than I/O 
> bound, during the rebuild. Though I'd expect the resync process to 
> substantially drop its CPU usage when it is being bandwidth throttled.
> 
> So should I try dropping the speed_limit_min even lower, or figure out a 
> way to drop the execution priority of the resync process?

If you want it to go slower, lower speed_limit_max, not min. min
is what the md_raid process will allocate to resyncing *even if
there are a dozen other processes waiting for IO*. max is the
fastest that md_raid allows resyncing to progress when there is
no other IO load.

> On a related note, another way to minimize the inconvenience of a 
> rebuild is to make it run faster. It currently seems to be taking about 
> 9 hours (4 320 GB drives). speed_limit_max is set to 200000, which is 
> already higher than the value recommended in the wiki:
> http://www.mythtv.org/wiki/index.php/RAID#Software_Raid_Online_Capacity_Expansion_.28OCE.29_.28for_raid_5_with_XFS.29
> 
> so I'm not sure boosting it will have any benefit.

Setting it higher than is physically possible has no extra
effect.

-dsr-


-- 
This message has been scanned for viruses and                                   
subversive content by DHS, and is                                               
believed to be treasonous Commie propaganda.  
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.


More information about the mythtv-users mailing list