<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 2, 2020, 11:23 PM Stephen Worthington, <<a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, 2 May 2020 14:38:50 -0400, you wrote:<br>
<br>
>A little MythTV math problem.<br>
><br>
>I have a 9 year old 3 TB recording drive with an xfs file system that's<br>
>never been defragmented and currently has a fragmentation factor of 95.88%.<br>
><br>
>If I run xfs_fsr on it for two hours everyday at 5am, how long would you<br>
>expect it to take to get to a better place? Days, weeks, months?<br>
<br>
For MythTV recording drives, fragmentation is not usually a problem.<br>
MythTV expires recordings when the free space gets too low (somewhere<br>
below 20 Gibytes), so there is always enough free space for the next<br>
recording.  That usually means that the fragmentation does not get<br>
bad.  I use JFS myself, which is also somewhat resistant to<br>
fragmentation problems.  I do not know enough about XFS to say how<br>
well it handles fragmentation.<br>
<br>
You did not mention how full your recording drive is.  If it has lots<br>
of free space, then fragmentation is not going to be an issue.  But if<br>
you are running it as full as MythTV allows, then depending on how<br>
good XFS is, it could be getting to be a problem, gradually.  But 9<br>
years is a long time - if you have been running it that full for<br>
years, and have not noticed any performance issues, then it is<br>
unlikely to be getting worse and will likely have stabilised at the<br>
current fragmentation level.<br>
<br>
Also, 9 years is a pretty old drive.  I have older, but I am<br>
progressively replacing my older drives - I really do not want one to<br>
fail and lose all the data.  A new drive would be much faster and<br>
could be a lot bigger.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The drive has about 200 gigabytes free out of 3 terabytes. </div><div dir="auto"><br></div><div dir="auto">I was actually basing the idea of defragmenting off of the wiki (<a href="https://www.mythtv.org/wiki/Optimizing_Performance#XFS-Specific_Tips">https://www.mythtv.org/wiki/Optimizing_Performance#XFS-Specific_Tips</a>) where one suggestion was to run xfs_fsr for 8 hours overnight via cron. So I'm that's an outdated recommendation? </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
</blockquote></div></div></div>