[mythtv-users] finding leaks

Eric Sharkey eric at lisaneric.org
Mon Sep 1 17:43:01 UTC 2014


On Mon, Sep 1, 2014 at 11:04 AM, Daryl McDonald <darylangela at gmail.com> wrote:
> When the system turned on this morning for a recording the ram usage was at
> 1.5Gb and has steadily climbed to 3.3Gb in one hour doing only one
> recording. Am I even on the right track?

Probably not.  Valgrind is a powerful tool for catching leaks, but
it's meant for developers to use.  Generally, you only want to run it
on unstripped binaries, which means the first step is to compile
mythtv from sources.  You don't want to use a prepackaged deb/rpm.
These usually have the symbol table stripped prior to packaging.

But before you do that, why don't you back up a few steps?  What are
you using to determine your RAM usage?  Which processes are are
consuming the most memory?  Have you used "top" with sort-by-memory
(press shift-m)?

If you're concerned about leaks during a recording, I wouldn't user
valgrind to look at mythfrontend.  The frontend process only handles
playback.  Leaks during a recording would most likely be in the
backend.  Top will tell you which processes are using the most memory.
That will tell you where to look.

But most importantly of all, remember that unused memory is wasted
memory.  The Linux kernel will use any otherwise unused memory to
cache the filesystem data.  If the memory usage statistic you're
quoting is inclusive of filesystem cache data, then what you're
describing is normal and not indicative of a leak.

Eric


More information about the mythtv-users mailing list