[mythtv-users] CPU Usage 100% on XP2100 capturing MPEG4 at 6000

Chris Pinkham cpinkham at bc2va.org
Wed Feb 4 13:07:09 EST 2004


> On Wednesday 04 February 2004 11:04, Chris Pinkham wrote:
> > > On Tue, 3 Feb 2004, Bruce wrote:
> > > > Is this normal? I thought CPU usage for recording would be lower?
> > >
> > > It could be that it's recently finished recording something and is
> > > doing the commercial flagging - that will soak up any spare CPU. 
> > > However, my
> >
> > Actually it doesn't.  The commercial flagging runs as a nice-d
> > process and it sleeps a little for every frame it processes.  These
> > are done to try to make sure that commercial flagging doesn't
> > interrupt any other processes running on the system.
> 
> Right, but I think the point was that this still shows up in top as 100% 
> usage, which can be misleading if you don't look at some of the other 
> fields (like nice level).
> 
> -JAC

Mine doesn't show up as 100% cpu usage since it sleeps every frame it
processes.  I usually have to look down the list to find the niced process
to determine if commercial flagging is running because it isn't using 100%
cpu.  I added the sleep in the code originally because even running niced,
the process would cause hickups recording on slower systems if a commercial
flagging thread was running and a recording fired off.  This might not be
the case on kernels with scheduling patches applied.

I'm running on an Athlon 700 and a commercial flagging process is
only showing 7% cpu usage.  If I run mythcommflag with the --sleep option
it does the same (nice-ed 19, sleeps every frame).  If I leave off the --sleep
option it still runs niced but doesn't sleep and uses ~100% cpu.  If I
run without --sleep and with --hogcpu, it runs at 100% not-niced.
The normal post-record commercial flagging thread should not be using 100%
cpu unless you're on a severely underpowered box..

-- 

Chris



More information about the mythtv-users mailing list