Mailing List Archive

High CPU utilziation
ANyone else noticing high cpu utilizations from mythbackend from recent
cvs? I usually update to the latest CVS version every few days or so, so
I dont know when this started, but it seems that mythbackend is using 99%
cpu even when its just sitting there not recording. ANy idea what I
should be looking for to fix this?
Re: High CPU utilziation [ In reply to ]
On Monday 19 May 2003 11:33 am, jeff@burstable.net wrote:
> ANyone else noticing high cpu utilizations from mythbackend from recent
> cvs? I usually update to the latest CVS version every few days or so, so
> I dont know when this started, but it seems that mythbackend is using 99%
> cpu even when its just sitting there not recording. ANy idea what I
> should be looking for to fix this?

Most likely the commercial detection thread -- turn it off if you don't want
it using CPU, but it's niced down to low priority so it shouldn't be hurting
anything.

Isaac
RE: High CPU utilziation [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> ANyone else noticing high cpu utilizations from mythbackend
> from recent
> cvs? I usually update to the latest CVS version every few
> days or so, so
> I dont know when this started, but it seems that mythbackend
> is using 99%
> cpu even when its just sitting there not recording. ANy idea what
> I should be looking for to fix this?

Is it 99% user CPU, or niced? What's the pri and NI values in top
for the process?

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPskBx/c1NpCTlP0JEQLEXgCg8Jtd5D4J8Fzo8Zu6JSykXB3680wAoOeJ
cAk4IWQccjjqkbbCK1rQnjNo
=Hfjs
-----END PGP SIGNATURE-----
Re: High CPU utilziation [ In reply to ]
AutoCommercialSkip is set to 0, is that waht you mean by commercial
detection thread?

I restarted the backend process, once it is back upto 99% I'll post all
the info from top.

--Jeff


On Mon, 19 May 2003, Isaac Richards wrote:

> On Monday 19 May 2003 11:33 am, jeff@burstable.net wrote:
> > ANyone else noticing high cpu utilizations from mythbackend from recent
> > cvs? I usually update to the latest CVS version every few days or so, so
> > I dont know when this started, but it seems that mythbackend is using 99%
> > cpu even when its just sitting there not recording. ANy idea what I
> > should be looking for to fix this?
>
> Most likely the commercial detection thread -- turn it off if you don't want
> it using CPU, but it's niced down to low priority so it shouldn't be hurting
> anything.
>
> Isaac
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
Re: High CPU utilziation [ In reply to ]
On Monday 19 May 2003 01:42 pm, jeff@burstable.net wrote:
> AutoCommercialSkip is set to 0, is that waht you mean by commercial
> detection thread?

Nope. Automatically Flag Commercials, rather.

> I restarted the backend process, once it is back upto 99% I'll post all
> the info from top.

That really won't do anything.

Isaac
Re: High CPU utilziation [ In reply to ]
I do have it set to automatically flag commercials. Would this process
cause cpu utilization even after it has finished running? I did a test
record but the cpu went back down to normal after it finished. I'll have
to play around when I get home from work to see if I can cause it to spike
again.

Jeff

On Mon, 19 May 2003, Isaac Richards wrote:

> On Monday 19 May 2003 01:42 pm, jeff@burstable.net wrote:
> > AutoCommercialSkip is set to 0, is that waht you mean by commercial
> > detection thread?
>
> Nope. Automatically Flag Commercials, rather.
>
> > I restarted the backend process, once it is back upto 99% I'll post all
> > the info from top.
>
> That really won't do anything.
>
> Isaac
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
Re: High CPU utilziation [ In reply to ]
On Monday 19 May 2003 02:39 pm, jeff@burstable.net wrote:
> I do have it set to automatically flag commercials. Would this process
> cause cpu utilization even after it has finished running? I did a test
> record but the cpu went back down to normal after it finished. I'll have
> to play around when I get home from work to see if I can cause it to spike
> again.

Yes, it would. As I said, it's niced down to really low priority, so it
shouldn't cause any problems whatsoever.

Isaac
Re: High CPU utilziation [ In reply to ]
The commercial detection thread also performs a sleep after processing
each frame, so if you see a niced mythbackend and it's using 100% cpu
it must be stuck in a loop somewhere. I fixed a couple places where
this could happen just a few days ago.

Are you running current CVS or is it a few days old?

> On Monday 19 May 2003 11:33 am, jeff@burstable.net wrote:
> > ANyone else noticing high cpu utilizations from mythbackend from recent
> > cvs? I usually update to the latest CVS version every few days or so, so
> > I dont know when this started, but it seems that mythbackend is using 99%
> > cpu even when its just sitting there not recording. ANy idea what I
> > should be looking for to fix this?
>
> Most likely the commercial detection thread -- turn it off if you don't want
> it using CPU, but it's niced down to low priority so it shouldn't be hurting
> anything.

Chris
Re: High CPU utilziation [ In reply to ]
Sounds like what could be causing the problem, Im running from cvs I
downloaded the 17th around 10 pm.

--Jeff

On Mon, 19 May 2003, Chris Pinkham wrote:

> The commercial detection thread also performs a sleep after processing
> each frame, so if you see a niced mythbackend and it's using 100% cpu
> it must be stuck in a loop somewhere. I fixed a couple places where
> this could happen just a few days ago.
>
> Are you running current CVS or is it a few days old?
>
> > On Monday 19 May 2003 11:33 am, jeff@burstable.net wrote:
> > > ANyone else noticing high cpu utilizations from mythbackend from recent
> > > cvs? I usually update to the latest CVS version every few days or so, so
> > > I dont know when this started, but it seems that mythbackend is using 99%
> > > cpu even when its just sitting there not recording. ANy idea what I
> > > should be looking for to fix this?
> >
> > Most likely the commercial detection thread -- turn it off if you don't want
> > it using CPU, but it's niced down to low priority so it shouldn't be hurting
> > anything.
>
> Chris
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
Re: High CPU utilziation [ In reply to ]
I think my mods went in on the 16th at about 11:58pm if I got my timezone
conversion correct in my head. If your runaway thread is indeed
niced and is using 99% cpu then you can try reproducing the problem
by compiling in debug mode as indicated in the docs and then run
mythcommflag inside gdb on the show last show you recorded. If you
killed the process there should be one show without commercials
flagged.

To see if ther are any un-flagged recordings, you can run mythcommflag
in test mode (see --help for options) or just do the following sql
query:

select chanid, starttime, type, count(*) from recordedmarkup
group by chanid, starttime, type order by starttime, chanid, type;

That should list a bunch of type 3, 4, and 5 records for each
recording. If there aren't any 4 or 5 records for a particular
chanid and starttime then that show wasn't flagged. You can
flag that show by running mythcommflag with the --chanid and
--starttime options. If you run it inside gdb and it hangs
then use CTRL-C to stop it and then do a backtrace as documented in
the Myth docs. When running mythcommflag from the command-line,
it WILL use all available cpu and WILL NOT nice itself. To get it
to not consume all available cpu, run with the --sleep option.
Run "mythcommflag --help" for more options.

> Sounds like what could be causing the problem, Im running from cvs I
> downloaded the 17th around 10 pm.
>
> --Jeff
>
> On Mon, 19 May 2003, Chris Pinkham wrote:
>
> > The commercial detection thread also performs a sleep after processing
> > each frame, so if you see a niced mythbackend and it's using 100% cpu
> > it must be stuck in a loop somewhere. I fixed a couple places where
> > this could happen just a few days ago.
> >
> > Are you running current CVS or is it a few days old?
> >
> > > On Monday 19 May 2003 11:33 am, jeff@burstable.net wrote:
> > > > ANyone else noticing high cpu utilizations from mythbackend from recent
> > > > cvs? I usually update to the latest CVS version every few days or so, so
> > > > I dont know when this started, but it seems that mythbackend is using 99%
> > > > cpu even when its just sitting there not recording. ANy idea what I
> > > > should be looking for to fix this?
> > >
> > > Most likely the commercial detection thread -- turn it off if you don't want
> > > it using CPU, but it's niced down to low priority so it shouldn't be hurting
> > > anything.
> >
> > Chris
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users@snowman.net
> > http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
> >
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>


--

Chris
Re: High CPU utilziation [ In reply to ]
At 02:44 PM 5/19/03 -0400, Isaac Richards wrote:
>On Monday 19 May 2003 02:39 pm, jeff@burstable.net wrote:
> > I do have it set to automatically flag commercials. Would this process
> > cause cpu utilization even after it has finished running? I did a test
> > record but the cpu went back down to normal after it finished. I'll have
> > to play around when I get home from work to see if I can cause it to spike
> > again.
>
>Yes, it would. As I said, it's niced down to really low priority, so it
>shouldn't cause any problems whatsoever.

Just to be clear for anyone who doesn't grok "nice", basically if a process
is niced down, anything else that needs to run will get priority first, but
if nothing else needs to run, the niced process will take all the CPU it
needs to do the job. So you can see 99% utilization if it wants that much
and nothing else is going on, and that's not a problem. Once you start
something more important, the niced process will give up whatever CPU that
something else needs.