[mythtv-users] Problems in load-balancing commflagging

f-myth-users at media.mit.edu f-myth-users at media.mit.edu
Tue Dec 6 23:42:00 EST 2005

    Date: Tue, 6 Dec 2005 19:02:09 -0500 (EST)
    From: "Chris Pinkham" <cpinkham at bc2va.org>

    > (b) Possibly because of (a), if I do a test recording of 6 things
    >     simultaneously, commflagging only happens on 5 of them at once.
    >     The 6th waits until the others are done, and then runs.  They
    >     all run on the MBE, even though I don't have "run jobs only on
    >     original recording host" set, but OTOH, there's that cap of 5
    >     jobs total, so would I ever see that sixth job on the SBE?

    One of them should have run on the SBE as long as you have the SBE
    configured to allow running flagging jobs.  Turn on JobQueue debugging
    with "-v jobqueue" on the backend to see if it tells you why it isn't
    firing off the 6th job on the SBE.  With "-v jobqueue" enabled, it
    prints out information about every job everytime through the loop
    so you can see what's running, what's queued, what's finished, etc..

Things are now broken in a different way.  I have many questions.

I tried running "mythbackend -d -v jobqueue" (as the mythtv user) on
the MBE, and got -very- different results than I was getting before;
I suspect that this is because I hadn't restarted mythbackend since
trying to turn on transcoding.  (It's been booted -many- times since
setting up commflagging, but that was in previous weeks.)  Do changes
to transcoding and/or recording profiles only take effect on restart
of the backend?  I didn't -think- so (and it'd be pretty inconvenient
if it always took a backend restart to change this sort of thing) but
I haven't done anything else to the box

My test environment was to start recording on channels 2,3,4,5,6,7
simultaneously for 5 minutes via manual scheduling.

The -previous- behavior (before I restarted mythbackend this evening
with "-v jobqueue" was to do all commflagging on the MBE, with the
first 5 jobs running in parallel, and the sixth running (I think!) on
the MBE as well (coulda been the SBE; I might not have noticed if it
was), but definitely after the first five.  Transcoding errored out
and didn't run at all.

-Now- what happens is the following:
(a) The instant recording was due to commence, the backend logged a
    bunch of "Skipping "Flag Commercials" job for chanid 1002 @
    20051206213500, should be run on 'sbe' instead"; it logged one of
    these page channel I'd scheduled (with appropriate chanid's, of
    course).  I have no idea why the MBE (which has 5 of the 6 tuners)
    is suddenly claiming that the SBE should be running commflagging
    instead of the MBE.  No commflagging jobs ever ran on the MBE, as
    far as I could tell by running "ps -elf | grep comm" a lot.
(b) One commflagging job started up on the SBE.  When it finished,
    another started, and so forth---no parallelism.
(c) Five transcoding jobs started up on the MBE, in parallel, as soon
    as recording finished.  (Before, -no- transcoding job were starting.)
(d) The sixth transcoding job claimed an "errored" state instead of
    doing anything.  I can't -guarantee- that was the job that
    corresponded to the recording on the SBE's tuner, but I'm
    suspicious that it might have been, since it was channel 7 and
    they might have been allocated to tuners in the order in which I
    created the schedules.  ["select * from mythlog" isn't telling me
    what tuner recorded what; is there some better way to find out?]

So, my still-unanswered questions:
(a) How do I debug this better?  If a job claimed "errored", how do I
    grab ahold of its diagnostic output so I can see -why- it errored?
(b) What's going on w/the job queues here?
(c) Transcoding was supposed to start -after- commflagging, but it
    didn't.  Why not?
(d) Why did 1 out of 6 transcoding jobs get an error, and what exactly
    -was- the error?
(e) There are at least two places to turn on transcoding---one is in
    the various profiles for Default, LiveTV, High, and Low, and one
    is in the Transcoding->MPEG2 slot one menu page away.  Which of
    these -should- I turn on, and which -shouldn't- I?  (Right now,
    they're -both- on, because turning on the Default one didn't do
    anything when I tried it; see previous message about that.)
(f) Is MPEG2-PS the right thing in that menu, or should it be TS, or
    is it something else entirely?  Where are these choices
(g) Why is the diagnostic output from mythbackend mentioning that it's
    studiously ignoring a bunch of commflagging jobs from two days
    ago?  (That's the last time I tried to record anything.)  -Those-
    jobs ran okay, incidentally, and on the MBE.  It's also mentioning
    the two "Errored" transcoding jobs I tried to run that day when I
    was trying to debug transcoding.  Why are they still hanging
    around in the job queue?  What makes them go away?
(h) What other options does mythbackend take, and what do they do?
    (I note that it has no manpage.)


More information about the mythtv-users mailing list