[mythtv-users] Auto-expire two files while recording two files

Blues Guy bluesguy_1 at yahoo.com
Sat Jan 31 16:20:40 EST 2004


--- Isaac Richards <ijr at po.cwru.edu> wrote:
> On Saturday 31 January 2004 07:54 am, Jeff wrote:
> > At 12:41 AM 1/31/2004 -0500, you wrote:
> > > > I have my Myth box setup to record Letterman
> and Leno,
> > > > and also to only keep the 2 most recent shows
> of each.
> > > >  So when it starts recording the two shows, it
> detects
> > > > that it can expire the oldest two.  So now,
> it's
> > > > writing two MPEG-2 files from the PVR's, while
> > > > deleting two large MPEG-2 files from the drive
> and
> > > > this causes blocking every night, consistently
> and
> > > > repeatably.  (and somewhat understandably). 
> So my
> > > > question is, is there anyway to either run the
> expire
> > > > process at a later time, or at a lower
> priority to
> > > > solve this?
> > >
> > >Not much that can be done in Myth about this.  I
> believe Myth is
> > >effectively just using the unlink() system call
> which causes
> > >the kernel to delete the file.  Since the
> deletion is run
> > >inside the kernel you can't "nice" it or
> anything.
> > >
> > >I'd investigate different filesystems and maybe
> run some
> > >tests on your own machine.  There's been quite a
> few discussions
> > >on the mailing list about ext[23] vs reiser vs
> > >insert-your-favorite-filesystem-name-here.
> >
> > Myth could check to see whether a recording is
> > in progress and if so, the deletion is queued for
> later.
> 
> Not if it needs to do the deletion so the recording
> has enough space to 
> complete.
> 

I'm not really suggesting this, because I think having
a properly selected and tuned filesystem is the
correct answer, but since I started this thread, here
goes...

To solve Isaac's condition, couldn't it make a
guess-timate on the disk space required just before
the new recording starts (based on the recording
duration and compression format), and delete the
file(s) just a few seconds before?  That would meet
both the condition I talked about, where it knew it
could delete the file (because it was only set to keep
N showings, and it was now recording N + 1), and
Isaac's condition, where it suddenly needs more disk
space, so it has to auto-expire a showing.

Again, I think that a properly tuned filesystem is the
right solution, and would save all the extra work
required to implement this, but this method would make
Myth "smarter".


Greg

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/


More information about the mythtv-users mailing list