<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 10, 2022 at 10:23 PM Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, 10 Apr 2022 17:03:35 -0500, you wrote:<br>
<br>
>Looking for a little help from the group:<br>
>I'm running v31 fixes on Xubuntu v20.04 and have recently and only<br>
>occasionally have the kernel kill <a href="http://mythfrontend.re" rel="noreferrer" target="_blank">mythfrontend.re</a> for the reason of "Out of<br>
>memory". It has happened 3 times in the last 4 weeks and a total of 6<br>
>times since 2020. It's not a show-stopper, as it does recover after about<br>
>5-10 minutes (I assume that's the amount of time it's using chewing up all<br>
>the RAM). There isn't anything of interest in the mythfrontend.log file.<br>
>Just normal stuff while watching a recording. This is a snippet from<br>
>kern.log specifically about mythfrontend:<br>
><br>
>Apr 9 22:00:03 MythTV kernel: [703811.529409] [ pid ] uid tgid<br>
>total_vm rss pgtables_bytes swapents oom_score_adj name<br>
>Apr 9 22:00:03 MythTV kernel: [703811.529507] [ 3635] 1000 3635<br>
> 97165 1257 204800 987 0 xfce4-terminal<br>
>Apr 9 22:00:03 MythTV kernel: [703811.529508] [ 3640] 1000 3640<br>
>2751 196 61440 248 0 bash<br>
>Apr 9 22:00:03 MythTV kernel: [703811.529510] [ 3753] 1000 3753<br>
> 652 1 45056 30 0 mythfrontend<br>
>Apr 9 22:00:03 MythTV kernel: [703811.529511] [ 3762] 1000 3762<br>
> 3609880 1093884 12263424 307492 0 <a href="http://mythfrontend.re" rel="noreferrer" target="_blank">mythfrontend.re</a><br>
>Apr 9 22:00:03 MythTV kernel: [703811.529512] [ 5513] 107 5513<br>
>2648 37 53248 5 0 uuidd<br>
>Apr 9 22:00:03 MythTV kernel: [703811.529513] [ 8712] 127 8712<br>
> 652 0 40960 23 0 sh<br>
>Apr 9 22:00:03 MythTV kernel: [703811.529514] [ 8713] 127 8713<br>
>768613 462526 4624384 46665 0 mythcommflag<br>
><br>
>Has anyone else seen this anomaly?<br>
><br>
>Regards,<br>
><br>
>Ken Emerson<br>
<br>
There have been some memory leak problems with mythfrontend in the<br>
past, but I have not seen any in v31 or v32. It is possible that you<br>
have just accumulated too many recordings now. Mythfrontend is quite<br>
memory hungry - it keeps the full recording list in RAM. So, how much<br>
RAM does the system have? How much swap space is allocated? How much<br>
swap space is mythfrontend.real using? How many recordings are there?<br>
<br>
In general, these days I would recommend using at least 8 Gibytes of<br>
RAM for systems where there are lots of recordings.<br>
<br>
To find out what is using swap space, I use this script:<br>
<br>
<a href="https://gist.github.com/samqiu/5954487" rel="noreferrer" target="_blank">https://gist.github.com/samqiu/5954487</a><br>
<br>
The pmap command will show the RAM usage of a process, but its output<br>
is not easy to interpret. You can get all the available information<br>
about a process from its /proc entry (under its PID number). Pmap<br>
just copies information from some of those entries.<br>
_______________________________________________<br>Stephen:</blockquote><div> </div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">The system RAM is 8Gb. There is a 2Gb swap space. There are about 3,000 recordings. Here is the output from swap.sh:</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><br></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px">ken@mythtv:~$ ./swap.sh</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><br></div></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>..............................</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">Overall swap used: 798096 kB</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><br></div></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>========================================</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">kB pid name</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><br></div></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>========================================</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">404072 1408 <a href="http://mythfrontend.re">mythfrontend.re</a></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>77376 1365 xfdesktop</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">42080 1277 xfwm4</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>38504 1377 applet.py</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">37120 1509 blueman-tray</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>34504 1426 blueman-applet</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">15624 1131 xfce4-session</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>14224 1310 panel-1-whisker</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">12480 1321 panel-10-pulsea</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>12224 1317 panel-8-statusn</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">11536 1314 panel-6-notific</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>10552 1401 update-notifier</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">10216 1411 nm-applet</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>9408 1360 Thunar</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">9336 1282 xfsettingsd</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>8608 1313 panel-5-systray</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">8576 1318 panel-9-power-m</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>8528 1385 xfce4-power-man</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">8240 1315 panel-7-indicat</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>5840 1283 xfce4-panel</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">3280 12076 bash</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>3272 1382 xiccd</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">3032 3791 bash</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>2688 1123 systemd</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">2640 1442 polkit-gnome-au</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>1920 1130 pulseaudio</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">1224 1437 agent</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>504 1145 dbus-daemon</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">248 3784 tmux: server</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>240 1368 mythfrontend</div></div></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><br></blockquote>ken@mythtv:~$ free -m<br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><br></div></blockquote><div class="gmail_quote"><div> total used free shared buff/cache available</div></div>Mem: 7934 2964 202 7 4768 4668<br><br></blockquote>If it's meaningful the CPU is an Intel i5-2500K 3.3GHz<div><br></div><div>Perhaps I am hitting some limit on number of recordings, but I don't ever remember there being a (soft?) limit.<br><div class="gmail_quote">The system is a bit old, but I would hope it's powerful enough. I only use it as a media center with only MythTv as the main application.</div></div><div class="gmail_quote"><br></div><div class="gmail_quote">Regards,</div><div class="gmail_quote"><br></div><div class="gmail_quote">Ken Emerson</div></div>