[mythtv-users] Mythbackend recording glitches

Allen Edwards allen.p.edwards at gmail.com
Thu Oct 18 14:50:35 UTC 2018


Here is the swap screen.  Seems to change every half minute or so.


top - 07:43:04 up 1 day, 13:06,  2 users,  load average: 1.17, 0.98, 0.78
Tasks: 178 total,   2 running, 176 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.4 us,  3.1 sy, 45.8 ni, 42.4 id,  4.1 wa,  0.0 hi,  0.3 si,
0.0 st
KiB Mem :  2061948 total,   135672 free,   450240 used,  1476036 buff/cache
KiB Swap:  2094076 total,  1704088 free,   389988 used.  1349872 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+
COMMAND              SWAP
 1463 dad       20   0  797276 202396  70308 S   6.0  9.8  62:25.69
mythfrontend.re    112496
  877 mysql     20   0  591676 112716   7852 S   0.3  5.5   4:02.20 mysqld
            79360
 1417 dad       20   0  190808   3524   3228 S   0.0  0.2   0:04.19
xfdesktop           45392
  866 mythtv    20   0  694168  39028   8264 S   6.6  1.9  68:35.58
mythbackend         30564
  959 root      20   0 1720888  18912  13756 S   1.7  0.9   4:08.08 Xorg
            21792
 1471 dad       20   0  119084   4728   3848 S   0.0  0.2   0:00.28
nm-applet            5016
  782 root      20   0   90816   2952   2100 S   0.0  0.1   0:00.55
NetworkManager       4868
  670 root      20   0   38488   2088   1688 S   0.0  0.1   0:02.55
accounts-daemon      4440
 1655 dad       20   0   63016   3380   2936 S   0.0  0.2   0:00.11
notify-osd           4344
 1366 dad       20   0   43648   2924   2668 S   0.0  0.1   0:00.06
xfce4-session        2960
  691 root      20   0  859748   1216    452 S   0.0  0.1   0:00.56 snapd
              2828


On Thu, Oct 18, 2018 at 1:55 AM Stephen Worthington <
stephen_agent at jsw.gen.nz> wrote:

> On Wed, 17 Oct 2018 20:03:11 -0700, you wrote:
>
> >OK, well I have 2G of memory.  That might be a problem then.  I ordered a
> >new 1T HD and was going to put the new system on there from scratch. One
> >issue is that the 750G drive I am using is old as well so I was thinking a
> >new one might be a good idea.  Not sure what I was going to do with the
> old
> >recordings... The main goal is to get a system that works.
> >
> >Allen
>
> From looking at what the RAM usage is on my mother's box (which has
> only 4 Gibytes of RAM), I think that 2 Gibytes of RAM is OK for
> mythbackend.  Mythfrontend uses more than mythbackend, and it
> increases as the number of recordings grows, so it will probably be OK
> for a while, but you are likely to get some swapping.  Adding in other
> large memory users such as Firefox or Thunderbird really will cause
> big problems - you will likely get thrashing of the swapper - and that
> will certainly damage or kill recordings.
>
> So I think you need to try running a recording with mythfrontend shut
> down, to see if the problem is too much swapping going on.  And run
> top or htop to see the resource usage.  If the recordings do work
> without glitches, then try with mythfrontend running.  Play a
> recording, so it will have used a lot of RAM to do that, then Alt-Tab
> back to a command prompt again to check the swap use.  And see if
> recordings are getting glitched again.
>
> To see the swap usage in top (which should already be installed), run
> it from the command line.  Do f (to see the field management screen),
> scroll down to the "SWAP" line, hit space (to turn on display of the
> swap field) then s to sort by swap size, then escape go back to the
> main screen.  The swap usage should be a column at the far right.  Use
> q to quit out of top, and h for help.
>
> The problem with swap usage is not data that is swapped out because it
> is not being used - that does no damage as it simply gets swapped out
> once and causes no further problems.  There is quite a bit of code and
> data like that in mythfrontend and mythbackend - everything that is
> only used at startup or is used for a feature you are not using (eg
> PCIe or USB tuners).  But at some point there gets to be something
> that needs to be swapped in, but there is nothing in RAM that is not
> going to be used again.  So making room to swap something in will push
> out something that will need to be swapped in again later.  If there
> is too much of that going on, then things will be swapped in too late
> to do something critical and a recording will be damaged.  This is
> called "thrashing".  It can get so bad that attempting to kill
> everything and shut down will go so slowly it will take hours to
> happen.  The only good solution if that is happening is to get more
> RAM.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181018/590334fd/attachment.html>


More information about the mythtv-users mailing list