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

Michael T. Dean mtdean at thirdcontact.com
Wed Sep 5 22:13:51 UTC 2007

On 09/05/2007 04:44 PM, John Goerzen wrote:
> On Wed September 5 2007 12:45:20 pm Michael T. Dean wrote:
>>> 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.
> I'm curious: what filesystem (ext2, etc) were you running for this test?

The (real-life) recordings partition (used by my production MythTV
system) that experienced read-performance issues due to fragmentation
was using an ext3 filesystem, but also had a special usage-scenario that
was caused by my conversion from SDTV to HDTV.

The test I mentioned in the linked post was using several filesystems
(including FAT, NTFS, ext3, and a
Phillips-Research-created-specifically-for-DVR's filesystem, the
Large-file metadata-In-Memory Extent-based File System (LIMEFS)).  And,
that paper is a /really/ good read, especially if you're into DVR's (as
I would assume most MythTV users are).  It would be better with the
supporting diagrams/slides, but is still quite comprehensible.

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
space is kept free (so they're unlikely to find that XFS changes that
conclusion).  However, I do have specific issues with some of the
assumptions in their tests/test procedures (as I mentioned in the linked

> I would be very surprised if you were seeing that sort of behavior with XFS, 
> especially given the usage data you're showing.

If you're talking about the fragmentation behavior, that will occur on
all file systems with multiple recordings being written concurrently to
the same file system.  If you're talking about the read-performance
issues, that may be due to my choice of file system, though
significantly reducing fragmentation is still a good idea (and is quite
easy with Storage Groups).

> I run XFS on my backend, which records both HD and SD stuff.  It is almost 
> always running almost completely full.  I've never defragged since I put it 
> in, and never had the problems you described, either.

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.  Even LIMEFS--which was specifically designed for
DVR's--was designed around SDTV-sized (1-2GB) files.


More information about the mythtv-users mailing list