[mythtv-users] XFS: options when running mkfs.xfs

Michael T. Dean mtdean at thirdcontact.com
Thu Sep 6 15:23:23 UTC 2007


On 09/06/2007 10:24 AM, Andrew Burgess wrote:
>> Though they did not test on XFS, they explicitly mentioned plans to do
>> so in "the future."  Though their conclusion was that fragmentation is
>> not an issue with any modern filesystem as long as at least 5% of the
>>     
> I would think a more accurate number would be a multiple of the file
> size, like keep 5x or 10x times your typical 4GB file free. Percentage
> seems wrong to me (IMHO etc), since the filesystem total size is less
> relavant that how the free space compares to the file your're trying to
> create

Sounds sensible to me.  I, too, had some issues with the
assumptions/results of the study.

>> space is kept free (so they're unlikely to find that XFS changes that
>> conclusion).
>>     
> How do you figure that?
>   

XFS probably won't change the conclusion that fragmentation is not an
issue...

>> I still don't think fragmentation issues are a widespread problem (i.e.
>> causing performance/usability problems).  I'm just saying that MythTV's
>> file system usage is not the type of usage that file systems were
>> designed around.  I.e. when <name your filesystem> was created, it was
>> most likely not designed to prevent fragmentation of files 10's of
>> gigabytes in size that are written out slowly over a period of
>> hours--sometimes with multiple such files being written concurrently to
>> the same file system.
>>     
> AFAICS the allocsize= XFS mount parameter is designed to prevent 
> exactly that.
allocsize can be set to a value up to 1GiB (in power-of-two increments),
so--in theory--this could limit the maximum number of fragments to 8 for
that 8.5GB file (= 7.9GiB) (though in reality, the number is likely to
be greater due to other data on the disk).  It definitely helps, but
writing a single file to a file system at a time (as is possible with
Storage Groups, even with multiple capture cards) helps more.

Let me put it this way, when Myth starts writing a file at 8:00pm that
will grow to an 8.5GB file by 9:00pm, the file system doesn't set aside
8.5GB of contiguous space on the disk.  If Myth starts writing a second
recording file at 8:00pm or 8:30pm or whatever, it is likely to be
interleaved with the other file that's being written concurrently.

Mike


More information about the mythtv-users mailing list