[mythtv-users] mythbackend still eats memory: the current status

Nick Morrott knowledgejunkie at gmail.com
Thu May 21 15:17:04 UTC 2009

On 21/05/2009, David Lister <foceni at gmail.com> wrote:

>  I'll talk about these graphs:

First, many many thanks for posting such a detailed and informative response.

>  [1] http://www.insidethex.co.uk/mythtv/mbe-mem-usage-active-eit-disabled.png
>  [2] http://www.insidethex.co.uk/mythtv/mbe-mem-usage-6months.png


>  If there was a real leak (i.e. memory allocation without free), the
>  lowest BASE of the VSZ would be rising steeply in a linear manner.
>  Especially noticeable on sbrk trim drops.
>  As you can see on [2], during the whole 6 months, there was NO rise
>  whatsoever. The bottom line is at 330k the whole time, i.e. no leak.

Graph [2] shows mythbackend running with passive EIT collection. The
mythbackend process was restarted a couple of times during that 6
month period. However, this is not marked on graph [2] or mentioned in
a previous message, and the poor labelling I've used makes it
challenging to match up gridlines to dates.

The most recent backend restarts per my logs were:

Starting up as the master server.
2009-03-29 14:21:21.316 mythbackend: MythBackend started as master server
Starting up as the master server.
2009-04-03 20:34:07.565 mythbackend: MythBackend started as master server

I've generated a new 8 week graph of my most recent data and uploaded
it to http://www.insidethex.co.uk/mythtv/mbe-mem-usage-2months.png.
You can see that since the most recent restart on 2009-04-03 VSZ
continually rises from 330MiB initally to 380MiB today (approx
1MiB/day). Whether is means anything is not for me to say.

>  Graph [1] - is that one process without interruption? If so, then again,
>  no leak - perhaps there's the slightest 1k rise towards the end, but
>  that's just too little for too short a time to call it a leak. If you
>  mean the big sawtooth, it's properly freed to the OS eventually, that is
>  not what you call a leak. If the graph begins with mythbackend startup,
>  this peak could even be associated with some initial data collection,
>  (custom?) allocator trim kicking in for the first time after initial
>  estimations, or whatever - it's irrelevant, because it's freed.

Graph[1] relates to last year and shows the difference in usage with
active EIT enabled (first half of graph) and then disabled (second
half). The mythbackend process was restarted on 2008-07-15 and
resulted in much flatter memory usage. The graph therefore shows two


Nick Morrott

MythTV Official wiki:
MythTV users list archive:

"An investment in knowledge always pays the best interest." - Benjamin Franklin

More information about the mythtv-users mailing list