[mythtv-users] Optimizing performance: xfs fragmentation

Stephen Worthington stephen_agent at jsw.gen.nz
Sun May 3 03:22:20 UTC 2020


On Sat, 2 May 2020 14:38:50 -0400, you wrote:

>A little MythTV math problem.
>
>I have a 9 year old 3 TB recording drive with an xfs file system that's
>never been defragmented and currently has a fragmentation factor of 95.88%.
>
>If I run xfs_fsr on it for two hours everyday at 5am, how long would you
>expect it to take to get to a better place? Days, weeks, months?

For MythTV recording drives, fragmentation is not usually a problem.
MythTV expires recordings when the free space gets too low (somewhere
below 20 Gibytes), so there is always enough free space for the next
recording.  That usually means that the fragmentation does not get
bad.  I use JFS myself, which is also somewhat resistant to
fragmentation problems.  I do not know enough about XFS to say how
well it handles fragmentation.

You did not mention how full your recording drive is.  If it has lots
of free space, then fragmentation is not going to be an issue.  But if
you are running it as full as MythTV allows, then depending on how
good XFS is, it could be getting to be a problem, gradually.  But 9
years is a long time - if you have been running it that full for
years, and have not noticed any performance issues, then it is
unlikely to be getting worse and will likely have stabilised at the
current fragmentation level.

Also, 9 years is a pretty old drive.  I have older, but I am
progressively replacing my older drives - I really do not want one to
fail and lose all the data.  A new drive would be much faster and
could be a lot bigger.


More information about the mythtv-users mailing list