<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 9/11/2009, at 6:56 PM, Jim Stichnoth wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Tue, Nov 3, 2009 at 1:34 PM, Jim Stichnoth &lt;<a href="mailto:stichnot@gmail.com">stichnot@gmail.com</a>&gt; wrote:<br><blockquote type="cite">I have been noticing the same kind of behavior since moving to 0.22,<br></blockquote><blockquote type="cite">which I am running on 3 IONITX frontends (one of which is also a slave<br></blockquote><blockquote type="cite">backend). &nbsp;After booting up, the frontend consumes about 2% CPU<br></blockquote><blockquote type="cite">displaying the main menu, which is fine. &nbsp;Over the next few days, this<br></blockquote><blockquote type="cite">CPU usage gradually increases, until it's at around 10%. &nbsp;When it gets<br></blockquote><blockquote type="cite">to 10%, the response time gets much worse. &nbsp;For example, from the main<br></blockquote><blockquote type="cite">menu, selecting Watch Recordings may pause for 4-5 seconds while still<br></blockquote><blockquote type="cite">displaying the main menu, then it displays a blank Recordings page for<br></blockquote><blockquote type="cite">another 5+ seconds, and finally displays the recordings. &nbsp;The same<br></blockquote><blockquote type="cite">sluggish performance happens for MythVideo as well.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When it reaches this funk, restarting the frontend doesn't help. &nbsp;It<br></blockquote><blockquote type="cite">comes back up consuming 10% CPU like before. &nbsp;I haven't found anything<br></blockquote><blockquote type="cite">other than rebooting to get the zippy performance back. &nbsp;(Makes me<br></blockquote><blockquote type="cite">feel like it's a Windows machine!)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Any ideas for explaining this behavior?<br><
/blockquote><br>[Responding to my own post.]<br><br>I again used the Intel VTune performance analyzer to have a look, when<br>the overall performance degraded after the machine was up a few days.<br>All the time was being spent in the sunrpc module, particularly the<br>rpcauth_lookup_credcache and generic_match functions. &nbsp;A web search<br>shows that this is a known NFS problem in the 2.6.27 kernel, which<br>what I'm using (MythDora 10.21).<br><br>My frontends are diskless NFS clients, so I guess this makes sense,<br>and may even explain why the problem gets worse over time and<br>restarting the frontend doesn't help.<br><br>Then I used "strace" to see what files are being accessed. &nbsp;Turns out<br>it's all a stat64 of /etc/localtime, about 70 times per second. &nbsp;I<br>don't know if this is something Myth is doing directly, or indirectly<br>through Qt. &nbsp;But if I set the TZ environment variable to the correct<br>value (in my case, 'America/Los_Angeles') and restart the frontend,<br>the performance problem mostly goes away. &nbsp;Running VTune again to<br>monitor the "idle" main menu shows mostly stuff related to the 70Hz<br>Pulse loop which I pointed out previously.<br><br>So setting the TZ environment variable to the appropriate value before<br>starting the frontend may be another thing to try for people seeing<br>sluggish UI performance *and* an unexpectedly high CPU usage when<br>sitting at the main menu.<br><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><br></div><div>Some interesting analysis there, but is anyone else also seeing an increase in memory use by mythfrontend over time</div><div><br></div><div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 12px;">top - 22:15:18 up 2 days, 12:41, &nbsp;5 users, &nbsp;load average: 0.17, 0.27, 0.17</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-s
tyle-span" style="font-size: 12px;">Tasks: 216 total, &nbsp; 1 running, 213 sleeping, &nbsp; 0 stopped, &nbsp; 2 zombie</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 12px;">Cpu(s): &nbsp;4.6%us, &nbsp;3.3%sy, &nbsp;0.0%ni, 92.0%id, &nbsp;0.2%wa, &nbsp;0.0%hi, &nbsp;0.0%si, &nbsp;0.0%st</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 12px;">Mem: &nbsp; 1996004k total, &nbsp;1946236k used, &nbsp; &nbsp;49768k free, &nbsp; &nbsp;40716k buffers</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 12px;">Swap: &nbsp; 875532k total, &nbsp; 320012k used, &nbsp; 555520k free, &nbsp; 971780k cached</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;&nbsp;PID USER &nbsp; &nbsp; &nbsp;PR &nbsp;NI &nbsp;VIRT &nbsp;RES &nbsp;SHR S %CPU %MEM &nbsp; &nbsp;TIME+ &nbsp;COMMAND &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;2714 mythfe &nbsp; &nbsp;20 &nbsp; 0 1020m 171m &nbsp;15m S &nbsp; 15 &nbsp;8.8 482:38.99 mythfrontend.re &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &n
bsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 12px;">&nbsp;1455 mythtv &nbsp; &nbsp;20 &nbsp; 0 &nbsp;450m &nbsp;41m 9944 S &nbsp; &nbsp;2 &nbsp;2.1 &nbsp;32:10.37 mythbackend &nbsp; &nbsp; &nbsp;</span></font></div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Steve</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div><br></div><div><br></div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><div>Steven Ellis - Technical Director<br>OpenMedia Limited<br>email &nbsp;&nbsp;-&nbsp;<a href="mailto:steven@openmedia.co.nz">steven@openmedia.co.nz</a><br>website -&nbsp;<a href="http://www.openmedia.co.nz/">http://www.openmedia.co.nz</a><br></div></span>
</div>
<br></body></html>