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

Michael T. Dean mtdean at thirdcontact.com
Wed Sep 5 17:45:20 UTC 2007

On 09/05/2007 10:45 AM, John Goerzen wrote:
> Existance of a project does not imply need ;-)
> There are a several points to make here.
> First, modern *nix filesystems are very good at avoiding performance problems 
> caused by fragmentation in general.  This is distinct from avoiding 
> fragmentation itself.  After all, what is the point of defragging a 10GB 
> file that is split into three contiguous extents?
> Secondly, as a filesystem starts to get full -- say, 80-90% or more, no 
> filesystem is going to be able to avoid fragmentation of large (relative to 
> the size of the FS) files.  That's because at this capacity, large holes are 
> unlikely to exist.  That doesn't necessarily imply poor performance, 
> however.

Completely agree.

> Third, I think that fragmentation is a complete non-issue for MythTV users.  
> Even a fragmented disk will perform faster than the video stream.

I disagree with this one, though (with empirical proof to back up my
opinion).  See
http://www.gossamer-threads.com/lists/mythtv/users/278818#278818 , for
what is (if I do say so myself) a pretty in-depth discussion on file
system fragmentation with Myth which also explains why we get
fragmentation (no file system will prevent it with Myth usage) and
explains how Storage Groups in 0.21 will allow users to prevent it.

Basically, I had 200GB of data on the disk that was severely
fragmented.  It took me 10 hours to read that data from the disk and
write it to another local disk (on another bus).  That means the average
read performance was at least 5.5MB/sec--far more than enough for the
max 19.39Mbps (2.4MB/sec) of my OTA ATSC recordings.  However, while
/most/ parts of most shows played perfectly well, there were sections
where the fragmentation caused read performance to drop to the point
that it would play 1 second, then pause for 5-10 seconds, then play 1
second.  Once I copied the data to another drive and moved it back, the
shows played perfectly, and without issue.

> ...
> So I think the bottom line is true in almost all cases: fragmentation is 
> irrelevant on Linux.

Generally true, but it can be made to be a problem, depending on file
system usage (and Myth--without Storage Groups--is definitely not kind
to the file system on that one).


More information about the mythtv-users mailing list