[mythtv] wierd backend memory usage/reporting?

Jack Perveiler perveilerj at yahoo.com
Wed Sep 13 12:40:28 UTC 2006


<snip>

> > That's right, 1.1 GB.
> > 
> Firstly your math is wrong.
> 
> 1105592 / (1024 * 1024) = 1.05Gb

Ok, so I rounded it to 1 decimal place.  The even bigger math error was when I
took 1.1 GB + 0.6 GB and said it added up to 1.6 GB :)

> 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.

Yeah, I get the differenct between VSZ and RSS (although I hadn't considered
the shared portion).  Still, mythbackend used to hover around 300 mb, and now
grows (over a week, maybe) to 1.05 GB?  Seemed suspicious.  If I start the
backend fresh it consumes about 200 MB (ballpark), then grows to about 300 MB
when recording starts happening (buffering, I'm guessing).  It's the growth
over time that concerns me.

> 
> The true amount of memory being taken up by the backend is
> normally ~= RSS.
I agree here, and I'm not worried about the 58 meg or so (seems reasonable). 
But whether the usage is in ram or in swap, the total virtual size of the
machine is still bound by ram + swap (1.5 GB or so in my case).  So if
mythbackend grows enough such that it + the non-shared portions of other apps
(mysql, mythfrontend, X) > 1.5 GB then there's still a problem.

> 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.

Hmm, that's new to me.  Pretty cool.  In my case, here's the numbers:

VmPeak:  1180604 kB
VmSize:  1166016 kB
VmLck:         0 kB
VmHWM:    189108 kB
VmRSS:     61272 kB
VmData:  1119256 kB
VmStk:        84 kB
VmExe:       816 kB
VmLib:     41916 kB
VmPTE:       676 kB
Threads:        78

Note that these don't totally correspond with last night's quoted numbers, as
the backend has grown since then :)

The data segment is where it's all at, which suggests to me that we aren't
talking about shared libraries dominating the virtual size.

Also, the thread cound seems high.

Is anybody else seeing this?  I'm guessing not or someone would've piped up by
now.  

The usual suspect for memory problems lately was eit... how can i check if it's
on or not?  I have all my channels set to not "use onair guide", but I didn't
see a global "disable eit" setting.  Is there a logging level I could use to
confirm whether eit crawling was happening?

We're in season premiere time, and I only have 1 fe/be combo, so I'd prefer to
use valgrind as a last resort (won't even be able to try until this weekend). 
Still, if that's what needs to be done...

--Jack


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the mythtv-dev mailing list