[mythtv-users] rebalance deleted recordings

Brian J. Murrell brian at interlinx.bc.ca
Thu Mar 20 15:35:18 UTC 2014


On Thu, 2014-03-20 at 14:58 +0000, Simon Hobson wrote:
> 
> Just out of interest, is your garage stacked high with old newspapers going back years "just in case" ?

I don't read newspapers.

> Because it causes this sort of problem ?

But it doesn't, as I explained previously.  To MythTV, "available" space
== "free" space.

> What I find is that under *my* normal usage, Myth tends to fairly well balance use so I don't have a problem.

And so it does here, usually/typically.  But MythTV can't predict what I
am going to watch (and delete/expire) and what I am recording but not
currently watching.  To clarify, we record "everything" (for some value
of "everything" that covers our possible interests).  That means
whenever a new show starts airing, we record it.  So yes, in the Fall
when forty-eleven new shows come on, we record them all until we have
decided definitively that a show is of no interest to us.

Doing this gives us the flexibility to start watching a show from it's
beginning even if we only decide to start watching mid-season, or even
start watching a show from the beginning a number of seasons into the
show.

This does mean however that we could wind up with a disk that has a lot
of these shows which we are recording but not (yet) watching.  So my
disk usage is not as predictable as people who only record what they
watch and delete.

> It is a known problem (in that it's come up here before) that Myth doesn't always "get it right" when disks are full/nearly full.

Right.  I understand this.  That's why I started this thread in the
first place.

> I suppose the *correct* fix for that is to expand on Myths drive usage logic so that it will correctly only expire deleted recordings until there are none of those left, and then only expire non-deleted recordings in strict priority order

I believe that is already the case.  Further I believe that if Myth has
the choice of recording on a disk that is "full" vs. one with
available/free space, it will choose the latter, expiring a deleted
recording if needed.  This is why I assert that to MythTV, available
space == free space.

Where this starts to have trouble is when Myth needs to use additional
spindles to spread I/O load and it has to use a "full" disk to achieve
that load spread.

> I suspect that catering for all corner cases might be "quite complicated" and cause a conflict between the need to balance I/O load vs the need to obey the discard priorities.

Right.  I suspect that balancing I/O load ends up winning in the end.

> At present, which disk to put a recording on is determined before any space is freed up,

Really?  I'm not sure that that's the case.  It would be interesting to
have a dev that knows for sure comment on that.

> and then space made for it - that is probably the root cause.

And maybe that is the case.  But again, that's why I started this thread
about a rebalancing script.

> I find it useful in that it allows Myth to work properly.

I guess I disagree with the assertion that space needs to be "free" (vs.
"available") for Myth to work "properly".  Certainly if that's the case
then it's a bug since it means that the concept of delaying expiry until
space is needed is not working as designed.

> To me, having a "as long as possible" wastebasket for recordings I've watched (almost all of my viewing is nothing more than time-shifting) isn't "useful".

And that's your subjective opinion that you are allowed to have.  Mine
is different.  I opt to give myself the most flexibility and don't need
to see "free" space to make me comfortable.

> My mileage varies a lot from yours. If Myth doesn't have to expire stuff *at recording time* then it does correctly balance recordings across drives - tending towards using the emptiest one first.

I wonder though if you record as much stuff, in parallel as I do and
therefore need the I/O balancing?  I can have as many as 4-6 programs
all recording at the same time.

> Thus, as I watch and delete stuff, space gets created across all drives*.

Indeed.  See above.  I do not.

> TL;DR summary.
> IMO, if you set Myth to delete deleted recordings after a certain period, and possibly do a one-off move of some recordings to rebalance free space, then you'll find it will "just work".

I think you will change your opinion on that after understanding how
things work here.

The reality here is that I only need to rebalance "once in a while" as
statistics do prove out that "most of the time" I do record and watch
(and delete and expire) across the disks more or less evenly.

b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140320/60757688/attachment.sig>


More information about the mythtv-users mailing list