[mythtv-users] Mythfrontend idle cpu consumption help

Steven Ellis steven at openmedia.co.nz
Mon Nov 9 21:50:31 UTC 2009

On 9/11/2009, at 6:56 PM, Jim Stichnoth wrote:

> On Tue, Nov 3, 2009 at 1:34 PM, Jim Stichnoth <stichnot at gmail.com>   wrote:

> 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.

Some interesting analysis there, but is anyone else also seeing an  
increase in memory use by mythfrontend over time

top - 22:15:18 up 2 days, 12:41,  5 users,  load average: 0.17, 0.27,   0.17
Tasks: 216 total,   1 running, 213 sleeping,   0 stopped,   2 zombie
Cpu(s):  4.6%us,  3.3%sy,  0.0%ni, 92.0%id,  0.2%wa,  0.0%hi,
0.0%si,  0.0%st
Mem:   1996004k total,  1946236k used,    49768k free,    40716k buffers
Swap:   875532k total,   320012k used,   555520k free,   971780k cached

  2714 mythfe    20   0 1020m 171m  15m S   15  8.8 482:38.99
  1455 mythtv    20   0  450m  41m 9944 S    2  2.1  32:10.37

Here I have an Athlon 5050e which is currently running at 1GHz under  
Mythbuntu 9.10. As has already been mentioned mythfrontend is doing  
around 15% cpu.

Now the frontend process has been up for a couple of days and now has   a
virtual memory footprint of over 1GB which I personally consider  
somewhat extreme. Is this to be expected under 0.22?


Steven Ellis - Technical Director
OpenMedia Limited - The Home of myPVR
email   - steven at openmedia.co.nz
website - http://www.openmedia.co.nz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20091110/3c6ddacb/attachment.htm>

More information about the mythtv-users mailing list