[mythtv-users] Fragmentation On Recording Disk?

Michael T. Dean mtdean at thirdcontact.com
Thu Apr 5 14:27:16 UTC 2007


On 04/05/2007 08:33 AM, Donald Webster wrote:
>> Surely in this case the filesystem doesn't know when `dd` starts
>> writing its file how much it is going to want to write out, so surely
>> the big file of zeros will likewise end up fragmented into several
>> parts?
>>     

I didn't say the dd would prevent fragmentation.  From my post, "Well, 
short of preallocating the space before a recording, there's not much 
more Myth can do."  So, preallocating would be more than we're currently 
doing to prevent fragmentation, but still not enough to totally 
eliminate it.  I also said, "Short of running a perpetual defrag utility 
(which would cause more performance loss than fragmentation) or having 
orders of magnitude more storage than is required (and a filesystem 
that's willing to waste it), there's no way to completely prevent 
fragmentation."

Of course, the above is basically the opposite order in which they were 
presented in my post.  Perhaps this order is easier to follow.

> The reason the 'dd' would sort of work is that it would *very quickly*
> (as fast as the system will let it) allocate all those 0's to the
> disk.

Exactly.

>   So yes, it could still be fragmented.  But the (relatively)
> short time period vs. the duration of a 30,60 or 90 minute show means
> it would be less fragmented.  But dd would work for the simple reason
> that it totally rapes the system while its running, and if you re-nice
> it to not rape it... it'll just take longer and longer, resulting in
> the same sort of fragmentation.
>
> Its better to just defrag if you need it... or not worry about it if
> it isn't causing problems.
>   

Right on!

Mike



More information about the mythtv-users mailing list