[mythtv-users] Fast delete watched recordings

Michael T. Dean mtdean at thirdcontact.com
Fri Apr 15 16:08:59 UTC 2016


On 04/15/2016 11:31 AM, John Pilkington wrote:
> On 15/04/16 14:48, Mike Perkins wrote:
>> On 15/04/16 03:55, Gerald Brandt wrote:
>>>
>>> I'd rather have watched recordings auto delete after a period of time
>>> (not based on disk usage),
>>> much like manually deleted recordings. Filling my hard drive with junk
>>> is a waste.
>>>
>> It isn't "filling your hard drive with junk". The files are already on
>> there, they weren't junk before you watched them, were they?
>>
>> So long as mythtv can find space to store new recordings, it doesn't
>> matter whether the space it uses is already marked empty or it has to
>> delete stuff to make room. You aren't using that space for anything
>> else, are you? If you are, your storage space is misconfigured.
>>
>
> I had an ingrained feeling that persistently writing to almost-full 
> disks, with just-in-time deletion, was a quick route to file 
> fragmentation. Was that true?  Is it OK now?

It is, but so is writing more than one multi-gigabyte file slowly over a 
period of half an hour (or an hour, or more) at the same time.  So, 
unless you've configured MythTV with a lot of different file systems 
such that it never, ever, writes to the same file system, you'll be 
getting lots of fragmentation, anyway.

And, on the bright side, file systems with primarily large files are 
likely to have lots of large (or at least 
large-enough-for-pretty-good-performance) contiguous blocks of storage 
released with each deletion.  And pretty good performance is really much 
better performance than MythTV requires.  So, I would argue that with 
our use case--writing a small number of large files occasionally--you 
probably don't have to worry too much about fragmentation (or, 
especially, about adverse affect of fragmentation).

That said, fragmentation is something that can be cleaned up if it does 
become an issue.  However, I've never had an issue with fragmentation.  
The only time I thought I did, it turned out it was actually a hard 
drive in pre-failure mode--and a few days later, I found out why the 
reads were slow when the disk stopped reading.  A few days after that, 
the file system in question had zero fragmentation when I replaced the 
drive with a new one.  :)  I don't think I got to in that case, but even 
in a normal failure when I can read some of the disk and copy over those 
salvageable files, the new file system ends up with virtually (exactly?) 
no fragmentation because of the one-by-one file copy process.

Mike


More information about the mythtv-users mailing list