Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Mythfrontend idle cpu consumption help

 

 

First page Previous page 1 2 3 4 5 6 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded


jansenj+myth at gmail

Oct 29, 2009, 1:04 PM

Post #1 of 136 (3560 views)
Permalink
Mythfrontend idle cpu consumption help

I just noticed that when I do a "top" that mythfrontend.real is consuming
almost 15% CPU when it is running at 1Ghz. I'm using mythbuntu theme with
Qt on mythbuntu's 0.22-fixes packages. Any ideas what could have changed?
Or is it something I could have changed?


danielk at cuymedia

Oct 30, 2009, 6:47 AM

Post #2 of 136 (3437 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Thu, 2009-10-29 at 16:04 -0400, jansenj wrote:
> I just noticed that when I do a "top" that mythfrontend.real is
> consuming almost 15% CPU when it is running at 1Ghz. I'm using
> mythbuntu theme with Qt on mythbuntu's 0.22-fixes packages. Any ideas
> what could have changed? Or is it something I could have changed?

The MythBuntu theme is one of the more heavyweight themes. Try a few
of the other ones, MythCenter-wide and MythCenter work well for me
(for my HD and non-HD frontends, resp.) I do use the MythBuntu OSD
theme, it does use an intermediate alpha value which does consume
more resources than some of the other OSD themes, but I feel it's
pretty enough to justify the extra resource usage and my computers
happen to have the needed grunt.

-- Daniel

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jansenj+myth at gmail

Oct 30, 2009, 9:22 AM

Post #3 of 136 (3427 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

>
>
> The MythBuntu theme is one of the more heavyweight themes. Try a few
> of the other ones, MythCenter-wide and MythCenter work well for me
> (for my HD and non-HD frontends, resp.) I do use the MythBuntu OSD
> theme, it does use an intermediate alpha value which does consume
> more resources than some of the other OSD themes, but I feel it's
> pretty enough to justify the extra resource usage and my computers
> happen to have the needed grunt.
>
> I did try MythCenter-wide (in fact thats what I originally saw the problem
with), although, it is no longer being packaged for Ubuntu 9.10. That being
said, no matter the theme, it shouldn't be taking 15% of the CPU to sit
unused on the first menu screen.


brad+myth at templetons

Nov 2, 2009, 2:07 PM

Post #4 of 136 (3391 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Fri, Oct 30, 2009 at 12:22:22PM -0400, jansenj wrote:
> >
> >
> > The MythBuntu theme is one of the more heavyweight themes. Try a few
> > of the other ones, MythCenter-wide and MythCenter work well for me
> > (for my HD and non-HD frontends, resp.) I do use the MythBuntu OSD
> > theme, it does use an intermediate alpha value which does consume
> > more resources than some of the other OSD themes, but I feel it's
> > pretty enough to justify the extra resource usage and my computers
> > happen to have the needed grunt.
> >
> > I did try MythCenter-wide (in fact thats what I originally saw the problem
> with), although, it is no longer being packaged for Ubuntu 9.10. That being
> said, no matter the theme, it shouldn't be taking 15% of the CPU to sit
> unused on the first menu screen.

I have also been noticing this for a while. I do use mythcenter but
I can't imagine why the theme would affect this CPU usage. I mean
what is the theme *doing* when it is sitting on a menu? Nothing is
being drawn or anything.

I have found much greater use of CPU by the more recent mythfrontends
over the last year in general. For example, while my system would
get decent idle times playing HD content and run quietly, now the
computer is routinely heating up (and running the fan loud) with
nothing else on the machine sucking CPU except xorg and mythfrontend.
(ie. no mythcommflag, which was the only reason the fan would get
loud before, or perhaps a runaway firefox page.)

It may be that the bob 2x deinterlacer is now running when before it
would not run because it thought the frame rate of the HDTV was .01%
too slow to do 2x deinterlacers, but I am also seeing it on 720p that
used to run 60% idle.

Any thoughts?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


danielk at cuymedia

Nov 3, 2009, 7:09 AM

Post #5 of 136 (3368 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Mon, 2009-11-02 at 14:07 -0800, Brad Templeton wrote:
> On Fri, Oct 30, 2009 at 12:22:22PM -0400, jansenj wrote:
> I have found much greater use of CPU by the more recent mythfrontends
> over the last year in general. For example, while my system would
> get decent idle times playing HD content and run quietly, now the
> computer is routinely heating up (and running the fan loud) with
> nothing else on the machine sucking CPU except xorg and mythfrontend.
> (ie. no mythcommflag, which was the only reason the fan would get
> loud before, or perhaps a runaway firefox page.)

I can't speak for your particular machine. However I had
noticed this too on one frontend but after some investigation
found out that the 0.21 MythTV never allowed the CPU to enter
a low power state, so it only appeared to be using less CPU.
When I forced the CPU out of powersaving mode the CPU usage
looked the similar when using the same theme.

Some themes do consume more resources because they use alpha
blends, animations and clocks. This is especially true if you
use the Qt renderer, which does these things using the CPU
instead of the GPU.

During my investigation I also noticed the plasma rendering
engine in KDE 4.x consumes more resources than any other
application on the machine. For a dedicated MythTV machine
it is a good idea to use something lightweight instead.

-- Daniel

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


derliebegott at gmail

Nov 3, 2009, 7:54 AM

Post #6 of 136 (3360 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

2009/10/29 jansenj <jansenj+myth [at] gmail>:
> I just noticed that when I do a "top" that mythfrontend.real is consuming
> almost 15% CPU when it is running at 1Ghz.  I'm using mythbuntu theme with
> Qt on mythbuntu's 0.22-fixes packages.  Any ideas what could have changed?
> Or is it something I could have changed?
>

I had a same problem when I tried Mythbuntu-9.04 with Mythbuntu theme
a few weeks ago. I fought with this problem 2-3 days long and after
that I went back to Slackware.

I doe not have this problem at all any more (I am again on Slackware)
and I am still using Mythbuntu theme. That was my 2nd and last try
with Mythbuntu :).
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


stichnot at gmail

Nov 3, 2009, 1:34 PM

Post #7 of 136 (3348 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Tue, Nov 3, 2009 at 7:09 AM, Daniel Kristjansson
<danielk [at] cuymedia> wrote:
> On Mon, 2009-11-02 at 14:07 -0800, Brad Templeton wrote:
>> On Fri, Oct 30, 2009 at 12:22:22PM -0400, jansenj wrote:
>> I have found much greater use of CPU by the more recent mythfrontends
>> over the last year in general.   For example, while my system would
>> get decent idle times playing HD content and run quietly, now the
>> computer is routinely heating up (and running the fan loud) with
>> nothing else on the machine sucking CPU except xorg and mythfrontend.
>> (ie. no mythcommflag, which was the only reason the fan would get
>> loud before, or perhaps a runaway firefox page.)
>
> I can't speak for your particular machine. However I had
> noticed this too on one frontend but after some investigation
> found out that the 0.21 MythTV never allowed the CPU to enter
> a low power state, so it only appeared to be using less CPU.
> When I forced the CPU out of powersaving mode the CPU usage
> looked the similar when using the same theme.
>
> Some themes do consume more resources because they use alpha
> blends, animations and clocks. This is especially true if you
> use the Qt renderer, which does these things using the CPU
> instead of the GPU.
>
> During my investigation I also noticed the plasma rendering
> engine in KDE 4.x consumes more resources than any other
> application on the machine. For a dedicated MythTV machine
> it is a good idea to use something lightweight instead.

I have been noticing the same kind of behavior since moving to 0.22,
which I am running on 3 IONITX frontends (one of which is also a slave
backend). After booting up, the frontend consumes about 2% CPU
displaying the main menu, which is fine. Over the next few days, this
CPU usage gradually increases, until it's at around 10%. When it gets
to 10%, the response time gets much worse. For example, from the main
menu, selecting Watch Recordings may pause for 4-5 seconds while still
displaying the main menu, then it displays a blank Recordings page for
another 5+ seconds, and finally displays the recordings. The same
sluggish performance happens for MythVideo as well.

When it reaches this funk, restarting the frontend doesn't help. It
comes back up consuming 10% CPU like before. I haven't found anything
other than rebooting to get the zippy performance back. (Makes me
feel like it's a Windows machine!)

Any ideas for explaining this behavior?

Jim
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


brad+myth at templetons

Nov 4, 2009, 12:28 AM

Post #8 of 136 (3337 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Tue, Nov 03, 2009 at 01:34:10PM -0800, Jim Stichnoth wrote:
> On Tue, Nov 3, 2009 at 7:09 AM, Daniel Kristjansson
> <danielk [at] cuymedia> wrote:
> > On Mon, 2009-11-02 at 14:07 -0800, Brad Templeton wrote:
> >> On Fri, Oct 30, 2009 at 12:22:22PM -0400, jansenj wrote:
> >> I have found much greater use of CPU by the more recent mythfrontends
> >> over the last year in general.   For example, while my system would
> >> get decent idle times playing HD content and run quietly, now the
> >> computer is routinely heating up (and running the fan loud) with
> >> nothing else on the machine sucking CPU except xorg and mythfrontend.
> >> (ie. no mythcommflag, which was the only reason the fan would get
> >> loud before, or perhaps a runaway firefox page.)
> >
> > I can't speak for your particular machine. However I had
> > noticed this too on one frontend but after some investigation
> > found out that the 0.21 MythTV never allowed the CPU to enter
> > a low power state, so it only appeared to be using less CPU.
> > When I forced the CPU out of powersaving mode the CPU usage
> > looked the similar when using the same theme.
> >
> > Some themes do consume more resources because they use alpha
> > blends, animations and clocks. This is especially true if you
> > use the Qt renderer, which does these things using the CPU
> > instead of the GPU.
> >
> > During my investigation I also noticed the plasma rendering
> > engine in KDE 4.x consumes more resources than any other
> > application on the machine. For a dedicated MythTV machine
> > it is a good idea to use something lightweight instead.
>
> I have been noticing the same kind of behavior since moving to 0.22,
> which I am running on 3 IONITX frontends (one of which is also a slave
> backend). After booting up, the frontend consumes about 2% CPU
> displaying the main menu, which is fine. Over the next few days, this
> CPU usage gradually increases, until it's at around 10%. When it gets
> to 10%, the response time gets much worse. For example, from the main
> menu, selecting Watch Recordings may pause for 4-5 seconds while still
> displaying the main menu, then it displays a blank Recordings page for
> another 5+ seconds, and finally displays the recordings. The same
> sluggish performance happens for MythVideo as well.
>
> When it reaches this funk, restarting the frontend doesn't help. It
> comes back up consuming 10% CPU like before. I haven't found anything
> other than rebooting to get the zippy performance back. (Makes me
> feel like it's a Windows machine!)
>
> Any ideas for explaining this behavior?
>
> Jim
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

I have also seen this a lot on earlier versions of 0.22 though it is not as bad
now, always on kubuntu. However, the long pauses would be after sitting idle
for a long time, and seemed likely to be caused by swapping though there was
not the obvious disk noise of that. The delays were indeed quite annoying, but
I don't get them nearly as much as before but still some.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jansenj+myth at gmail

Nov 4, 2009, 6:39 AM

Post #9 of 136 (3316 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

I noticed that if I go into a settings menu, the usage drops back to where I
have seen it before. I have been using the 9.10 mythbuntu as far back as
alpha 5, and I seem to remember this problem starting around the timeframe
of the release candidate of myth.


jansenj+myth at gmail

Nov 4, 2009, 6:41 AM

Post #10 of 136 (3313 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Wed, Nov 4, 2009 at 9:39 AM, jansenj
<jansenj+myth [at] gmail<jansenj%2Bmyth [at] gmail>
> wrote:

> I noticed that if I go into a settings menu, the usage drops back to where
> I have seen it before. I have been using the 9.10 mythbuntu as far back as
> alpha 5, and I seem to remember this problem starting around the timeframe
> of the release candidate of myth.
>

Also, using OpenGL makes no difference than Qt for CPU usage. Its sitting at
14% while the CPU runs at 1.8Ghz. There is obviously something wrong, I
just don't know if it with my machine, setup, or myth code itself.


jansenj+myth at gmail

Nov 6, 2009, 7:15 AM

Post #11 of 136 (3289 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

> I noticed that if I go into a settings menu, the usage drops back to where
>> I have seen it before. I have been using the 9.10 mythbuntu as far back as
>> alpha 5, and I seem to remember this problem starting around the timeframe
>> of the release candidate of myth.
>>
>
> Also, using OpenGL makes no difference than Qt for CPU usage. Its sitting
> at 14% while the CPU runs at 1.8Ghz. There is obviously something wrong, I
> just don't know if it with my machine, setup, or myth code itself.
>
>

I'm still hoping for some help. Or confirmation that someone else is seeing
the same behavior with the 0.22-fixes branch.

I noticed that after a fresh reboot, mythfrontend only consumes 0.5-1.0% CPU
just sitting on the first menu screen. Once I go into watch recordings the
first time, it starts consuming 14% cpu. But even exiting back out to the
same menu screen as previous continues to consume 14% CPU.

Anyone have any other ideas what this might be or how to track it down? Is
there a verbose setting for the frontend log I should use? rRght now, it
doesn't indicate anything out of the ordinary.


nico at youplala

Nov 6, 2009, 7:31 AM

Post #12 of 136 (3280 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Fri, 2009-11-06 at 10:15 -0500, jansenj wrote:
> > I noticed that if I go into a settings menu, the usage drops back to
> where
> >> I have seen it before. I have been using the 9.10 mythbuntu as far
> back as
> >> alpha 5, and I seem to remember this problem starting around the
> timeframe
> >> of the release candidate of myth.
> >>
> >
> > Also, using OpenGL makes no difference than Qt for CPU usage. Its
> sitting
> > at 14% while the CPU runs at 1.8Ghz. There is obviously something
> wrong, I
> > just don't know if it with my machine, setup, or myth code itself.


I'm with you. "me too"...

Nico
http://www.youplala.net/linux/home-theater-pc/

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jarpublic at gmail

Nov 6, 2009, 7:52 AM

Post #13 of 136 (3288 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

> I'm still hoping for some help. Or confirmation that someone else is seeing
> the same behavior with the 0.22-fixes branch.

I am having the same issue, mythbuntu 9.04 with mythtv .22-fixes build
22742. This is with a AMD 7750 2.7 GHz CPU. The CPU hangs around 14%
when just sitting idle on the main menu.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


derliebegott at gmail

Nov 6, 2009, 7:56 AM

Post #14 of 136 (3288 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

2009/11/6 Johnny <jarpublic [at] gmail>:
>> I'm still hoping for some help. Or confirmation that someone else is seeing
>> the same behavior with the 0.22-fixes branch.
>
> I am having the same issue, mythbuntu 9.04 with mythtv .22-fixes build
> 22742. This is with a AMD 7750 2.7 GHz CPU. The CPU hangs around 14%
> when just sitting idle on the main menu.
> _______________________________________________

Are you all mythbuntu user? It looks so.

As I said, I had this problem too on mythbuntu, but not on Slackware
with self compiled svn.

Motherboard with GPU: Asus M3N78-EM (GF 8300 on board)
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jarpublic at gmail

Nov 6, 2009, 8:01 AM

Post #15 of 136 (3278 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

> Motherboard with GPU: Asus M3N78-EM (GF 8300 on board)

That is the same board I am using. If it is a mythbuntu issue, it
would still be helpful to track down the source of the CPU usage.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


nico at youplala

Nov 6, 2009, 8:10 AM

Post #16 of 136 (3282 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Fri, 2009-11-06 at 15:31 +0000, Nicolas Will wrote:
> On Fri, 2009-11-06 at 10:15 -0500, jansenj wrote:
> > > I noticed that if I go into a settings menu, the usage drops back
> to
> > where
> > >> I have seen it before. I have been using the 9.10 mythbuntu as
> far
> > back as
> > >> alpha 5, and I seem to remember this problem starting around the
> > timeframe
> > >> of the release candidate of myth.
> > >>
> > >
> > > Also, using OpenGL makes no difference than Qt for CPU usage. Its
> > sitting
> > > at 14% while the CPU runs at 1.8Ghz. There is obviously something
> > wrong, I
> > > just don't know if it with my machine, setup, or myth code itself.
>
>
> I'm with you. "me too"...

Ubuntu 9.10 64 bit
MythTV .22-fixes from JYA
(call that mythbuntu if you want, however irrelevant as it can be)
NVIDIA 8400GS, 190 driver
2.66 GHz Core 2 Duo

Nico
http://www.youplala.net/linux/home-theater-pc/

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jansenj+myth at gmail

Nov 6, 2009, 9:02 AM

Post #17 of 136 (3272 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

1. changing distro isn't much of a fix.
2. I've noticed I can get rid of the problem if I change my gui size from
full screen to a size that matches the theme's default resolution.

I have a 1920x1080 screen using mythcenter-wide ( which might have a native
resolution of 1280x720). If I change my GUI to not be full screen, but
rather 1280x720 on my 1920x1080 screen, CPU usage drops back to where I
would expect it to be. And the same behavior is with terra theme as well.

Is it possible there is something that is trying to reconvert the something
on the screen at the refresh rate of the screen? And if the graphic is
displayed in its native resolution it doesn't need converting? Just
stabbing in the dark. Maybe someone else can try this and report their
results.


dlknight at sdf

Nov 6, 2009, 11:55 AM

Post #18 of 136 (3270 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Fri, November 6, 2009 5:02 pm, jansenj wrote:
> 1. changing distro isn't much of a fix.
> 2. I've noticed I can get rid of the problem if I change my gui size from
> full screen to a size that matches the theme's default resolution.
>
> I have a 1920x1080 screen using mythcenter-wide ( which might have a
> native
> resolution of 1280x720). If I change my GUI to not be full screen, but
> rather 1280x720 on my 1920x1080 screen, CPU usage drops back to where I
> would expect it to be. And the same behavior is with terra theme as well.
>
> Is it possible there is something that is trying to reconvert the
> something
> on the screen at the refresh rate of the screen? And if the graphic is
> displayed in its native resolution it doesn't need converting? Just
> stabbing in the dark. Maybe someone else can try this and report their
> results.
>

Same issue here - the mythfrontend log file says the native resolution for
the theme I am using is 1280x720 (Graphite). If I switch my X resolution
to 1280x720 all the menu's are extremely fast. Change back to 1920x1080
and I get pauses when selecting Recordings.

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jansenj+myth at gmail

Nov 6, 2009, 12:34 PM

Post #19 of 136 (3257 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Fri, Nov 6, 2009 at 12:02 PM, jansenj
<jansenj+myth [at] gmail<jansenj%2Bmyth [at] gmail>
> wrote:

> 1. changing distro isn't much of a fix.
> 2. I've noticed I can get rid of the problem if I change my gui size from
> full screen to a size that matches the theme's default resolution.
>
> I didn't think it would be worth mentioning that I use the DVR menu
structure before, but odd as it may sound, the problem doesn't seem to exist
near as much if I use the default menu structure as opposed to the DVR
structure.

Is there a possibility for something recursive going on here under just this
menu structure at non-native resolutions?


jansenj+myth at gmail

Nov 6, 2009, 12:46 PM

Post #20 of 136 (3266 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Fri, Nov 6, 2009 at 3:34 PM, jansenj
<jansenj+myth [at] gmail<jansenj%2Bmyth [at] gmail>
> wrote:

> On Fri, Nov 6, 2009 at 12:02 PM, jansenj <jansenj+myth [at] gmail<jansenj%2Bmyth [at] gmail>
> > wrote:
>
>> 1. changing distro isn't much of a fix.
>> 2. I've noticed I can get rid of the problem if I change my gui size from
>> full screen to a size that matches the theme's default resolution.
>>
>> I didn't think it would be worth mentioning that I use the DVR menu
> structure before, but odd as it may sound, the problem doesn't seem to exist
> near as much if I use the default menu structure as opposed to the DVR
> structure.
>
> Is there a possibility for something recursive going on here under just
> this menu structure at non-native resolutions?
>

Ok, I don't use all the plugins like weather games and a few others so I had
removed them from mythbuntu control center. However, I gave it a shot to go
all all of them back in, and my cpu usage is normal even for scaled
resolutions.

What do you think, does this constitute enough evidence/info to enter a
bug? It seems to me like it is a mythfrontend issue with themes and
possibly some dependency on some plugins.


jarpublic at gmail

Nov 6, 2009, 1:14 PM

Post #21 of 136 (3257 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

> Ok, I don't use all the plugins like weather games and a few others so I had
> removed them from mythbuntu control center.  However, I gave it a shot to go
> all all of them back in, and my cpu usage is normal even for scaled
> resolutions.
>
> What do you think, does this constitute enough evidence/info to enter a
> bug?  It seems to me like it is a mythfrontend issue with themes and
> possibly some dependency on some plugins.

Are you sure you are waiting long enough after restarting the frontend
to see the steady state CPU usage. I get the same thing regardless of
what I have the GUI resolution set to. I am on SD CRT and I tried
640x480 and the theme base resolution of 1280x720. I also have almost
all of those plugins installed. If I restart the frontend the CPU
usage goes down and then after a minute or two it will come back up to
15% and sit there like that. So if I don't wait long enough then it
appears that the CPU usage is down around 0% to 1%, but if I wait I
see the steady state of 15%.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


stichnot at gmail

Nov 6, 2009, 7:39 PM

Post #22 of 136 (3249 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Fri, Nov 6, 2009 at 1:14 PM, Johnny <jarpublic [at] gmail> wrote:
>> Ok, I don't use all the plugins like weather games and a few others so I had
>> removed them from mythbuntu control center.  However, I gave it a shot to go
>> all all of them back in, and my cpu usage is normal even for scaled
>> resolutions.
>>
>> What do you think, does this constitute enough evidence/info to enter a
>> bug?  It seems to me like it is a mythfrontend issue with themes and
>> possibly some dependency on some plugins.
>
> Are you sure you are waiting long enough after restarting the frontend
> to see the steady state CPU usage. I get the same thing regardless of
> what I have the GUI resolution set to. I am on SD CRT and I tried
> 640x480 and the theme base resolution of 1280x720. I also have almost
> all of those plugins installed. If I restart the frontend the CPU
> usage goes down and then after a minute or two it will come back up to
> 15% and sit there like that. So if I don't wait long enough then it
> appears that the CPU usage is down around 0% to 1%, but if I wait I
> see the steady state of 15%.

I tried to take a deeper look at this. I used the Intel VTune
performance analyzer to sample mythfrontend while it was sitting idle
on the main menu page. The top routine in mythfrontend in terms of
CPU usage was MythUIType::Pulse(). Its function is to call
HandleMovementPulse() and HandleAlphaPulse() on the current object,
and then call Pulse() on all its children. Pulse() is called at the
top level by MythMainWindow::animate(). The MythMainWindow
constructor creates a timer to call animate() 70 times per second.

So, even if the frontend is on a menu page that "does nothing", it is
still 70 times per second looking at all buttons, backgrounds, text
areas, etc., to see if anything needs to "pulse". And the more
heavyweight the theme, the more widgets it has to look at.

If anyone wants to experiment, try reducing the refresh rate of 70
times per second to something like 10 times per second. Look for the
2 statements "d->drawTimer->start(1000 / 70);" in mythmainwindow.cpp
and change the 70 to 10, then see how much it reduces the CPU usage
when idle.

Jim
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jansenj+myth at gmail

Nov 7, 2009, 12:14 PM

Post #23 of 136 (3200 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

> If anyone wants to experiment, try reducing the refresh rate of 70
> times per second to something like 10 times per second. Look for the
> 2 statements "d->drawTimer->start(1000 / 70);" in mythmainwindow.cpp
> and change the 70 to 10, then see how much it reduces the CPU usage
> when idle.
>

So your guess is that it would be the change to mythui that increased the
cpu usage for even a simple theme like mythcenter.


jarpublic at gmail

Nov 7, 2009, 12:35 PM

Post #24 of 136 (3194 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

>> If anyone wants to experiment, try reducing the refresh rate of 70
>> times per second to something like 10 times per second.  Look for the
>> 2 statements "d->drawTimer->start(1000 / 70);" in mythmainwindow.cpp
>> and change the 70 to 10, then see how much it reduces the CPU usage
>> when idle.

I don't know if this would be considered a bug, but if this is the
cause then it is certainly a design issue that could use some
reconsideration. If only polling all of the objects in the current
screen is taking 15% of a modern CPU, even when no animation is
actually being done, then this is a poor design. I don't mean to be
critical of all of the great work that has gone into the new MythUI,
and I realize that there are probably other complexities that led to
this design decision. But this is a terrible waste of resources
especially when a machine may be sitting on the menu 90% of the day.

>
> So your guess is that it would be the change to mythui that increased the
> cpu usage for even a simple theme like mythcenter.

Mythcenter doesn't really exist anymore like it did in .21. They just
used the mythcenter background and main menu but everything else is
falling back to the new MythUI default theme.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


stichnot at gmail

Nov 8, 2009, 9:56 PM

Post #25 of 136 (3127 views)
Permalink
Re: Mythfrontend idle cpu consumption help [In reply to]

On Tue, Nov 3, 2009 at 1:34 PM, Jim Stichnoth <stichnot [at] gmail> wrote:
> I have been noticing the same kind of behavior since moving to 0.22,
> which I am running on 3 IONITX frontends (one of which is also a slave
> backend).  After booting up, the frontend consumes about 2% CPU
> displaying the main menu, which is fine.  Over the next few days, this
> CPU usage gradually increases, until it's at around 10%.  When it gets
> to 10%, the response time gets much worse.  For example, from the main
> menu, selecting Watch Recordings may pause for 4-5 seconds while still
> displaying the main menu, then it displays a blank Recordings page for
> another 5+ seconds, and finally displays the recordings.  The same
> sluggish performance happens for MythVideo as well.
>
> When it reaches this funk, restarting the frontend doesn't help.  It
> comes back up consuming 10% CPU like before.  I haven't found anything
> other than rebooting to get the zippy performance back.  (Makes me
> feel like it's a Windows machine!)
>
> Any ideas for explaining this behavior?

[Responding to my own post.]

I again used the Intel VTune performance analyzer to have a look, when
the overall performance degraded after the machine was up a few days.
All the time was being spent in the sunrpc module, particularly the
rpcauth_lookup_credcache and generic_match functions. A web search
shows that this is a known NFS problem in the 2.6.27 kernel, which
what I'm using (MythDora 10.21).

My frontends are diskless NFS clients, so I guess this makes sense,
and may even explain why the problem gets worse over time and
restarting the frontend doesn't help.

Then I used "strace" to see what files are being accessed. Turns out
it's all a stat64 of /etc/localtime, about 70 times per second. I
don't know if this is something Myth is doing directly, or indirectly
through Qt. But if I set the TZ environment variable to the correct
value (in my case, 'America/Los_Angeles') and restart the frontend,
the performance problem mostly goes away. Running VTune again to
monitor the "idle" main menu shows mostly stuff related to the 70Hz
Pulse loop which I pointed out previously.

So setting the TZ environment variable to the appropriate value before
starting the frontend may be another thing to try for people seeing
sluggish UI performance *and* an unexpectedly high CPU usage when
sitting at the main menu.

Jim
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

First page Previous page 1 2 3 4 5 6 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.