[mythtv] wierd backend memory usage/reporting?

Stuart Auchterlonie stuarta at squashedfrog.net
Wed Sep 13 08:18:47 UTC 2006

On Tue, Sep 12, 2006 at 06:41:01PM -0700, Jack Perveiler wrote:
> So I updated recently (to r11068, not quite 0.20) and tonight I noticed
> mythbackend appeared to be using a TON of memory:
> mythtv at cerebro:~/myth_dev$ ps aux | grep mythbackend
> mythtv   19034  0.3  5.6 1105592 58464 ?       Ssl  Sep06  29:32
> /usr/local/bin/mythbackend --daemon --logfile /var/log/mythtv/mythbackend.log
> --pidfile /var/run/mythtv/mythbackend.pid
> That's right, 1.1 GB.

Firstly your math is wrong.

1105592 / (1024 * 1024) = 1.05Gb

Secondly there are 2 memory sizes there 1105592 and 58464 
The first is VSZ and the 2nd RSS.

VSZ = Virtual Size. This includes memory taken by all
shared libraries that the program pulls in.

RSS = Resident Set Size. How much of the program is actually
in physical memory.

The true amount of memory being taken up by the backend is
normally ~= RSS.

If you cat /proc/{pid of backend}/status and look at all the
Vm figures, VmPeak, VmSize, VmRSS, VmData, VmData, VmExe etc
you will find the true memory usage of the process.

In this case your backend is using around 58Mb :)

For further reading look up "Unix Memory Management"


More information about the mythtv-dev mailing list