[mythtv-users] Mythbackend recording glitches

Stephen Worthington stephen_agent at jsw.gen.nz
Thu Oct 18 08:54:58 UTC 2018


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.


More information about the mythtv-users mailing list