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

David Lister foceni at gmail.com
Thu May 21 12:31:34 UTC 2009


Udo van den Heuvel wrote:
>> 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.
> Did you try to graph the numbers I posted when this thread was revived
> most recently? See at the bottom of this message.
Not different from graph [1]. This is the initial huge peak after which
it drops and "levels out", as you say. I couldn't say how "normal" it is
for mythbackend, but it's NOT a memory leak. As I said, the backed isn't
even extremely inefficient memory-wise. :) That's all I can say from
your graphs. I don't have problems personally and I can't measure or
audit anything, because I'm on a project in India. It's 6pm, so see you
tomorrow!

>> 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.
>
> My idea is: the process starts, acquires memory and acquires some more
> as it progresses with doing what it does.
> In a process like mythbackend, after a certain time I expect the
> memory consumption to 'level out', i.e.: not grow any furter. All
> buffers necessary have been mallocced, all variables were filled and
> freed etc.
> Please explain if this general idea is wrong and/or where it needs
> correction.
> If the general idea is true, then the numbers I collected look strange
> since they would lead to the assumption that if this would continue
> the computer would grind to a halt eventually.
That might be how some applications work, but I couldn't say what's
going on in mythbackend. Never looked at it as a programmer, really.
Frankly, and this is very important, considering what mythbackend
actually does and what rates and amounts of data it manages, I really
don't think that 266MB RSS is anything to talk about. Actually, that is
not much by any standards - my stupid Firefox is 150MB RSS at this
moment. If you underestimated HW requirements, it's your fault. I wonder
how much RAM you have alloted for this demanding task (MythTV). VIA CPUs
and ITX mobos are all fine for toys, but if you used proper HW, fully
HD-capable FE/BE HTPC wouldn't be any bigger than an old VCR's and you
wouldn't rile us here because of one application using 200-300MB RAM. :)
Your and the 6-month graphs clearly show there is no leak.

-- 
Dave


More information about the mythtv-users mailing list