[mythtv-users] remaining disk space / delete slowly

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Jul 13 17:01:50 UTC 2016


On Wed, 13 Jul 2016 08:20:56 +0100, you wrote:

> I think the bit about running out of memory (really it means the write cache has used all currently free memory) and corrupting things is bogus - the system will effectively pause at the that point with processes blocked in "wait for I/O" (wio) state until the disk subsystem catches up with the writes.

The problem is not bogus.  It is very real, and creates unwatchably
damaged recordings.  The way it happens is that if the output to disk
is blocked, while the input from the tuners continues (as it will),
then the memory queue of data waiting to be written to the recording
file will overflow.  The normal result is that data being written to
the memory queue from the tuner gets lost - causing errors in the
recording.

As well as with deleting large files on ext3, I have seen this happen
during the database maintenance done from cron, when the recordedseek
table is being defragged.  This is a very I/O intensive process, and
on my system where the recordedseek table is massive (3.5 GiB data,
3.2 GiB index), any recordings happening at the time are at risk of
losing data.  So I have had to disable that part of the database
maintenance and run it manually between recordings when it is safe to
do so.  Fortunately, the defragging really does not need to be done
every day.  Note that it was still a problem when I turned it on again
after migrating my system partition to a very fast PCIe NVME SSD
drive.


More information about the mythtv-users mailing list