Mailing List Archive

Memory usage
Hey,

I just recorded two shows (one half hour, the other an hour) and
watched as my memory got chewed up. I didn't have the front end
running, just the back end. When I started my memory utilization was
around 22%, now it's at 95% even though the recordings are done. Should
Myth eventually release the memory that it chewed up during recording?
If so, how long would it usually take? Oh, and I've got 1GB of RAM.

Thanks,

Vince
Re: Memory usage [ In reply to ]
On Thursday 10 April 2003 11:13 pm, Vincent Colombo wrote:
> Hey,
>
> I just recorded two shows (one half hour, the other an hour) and
> watched as my memory got chewed up. I didn't have the front end
> running, just the back end. When I started my memory utilization was
> around 22%, now it's at 95% even though the recordings are done. Should
> Myth eventually release the memory that it chewed up during recording?
> If so, how long would it usually take? Oh, and I've got 1GB of RAM.

Ah, no, that's not normal at all. It shouldn't be using more than 40/50MB of
ram or so.

Isaac
Re: Memory usage [ In reply to ]
Any idea what might be causing it and how I could go about fixing it?

Thanks,

Vince


On Thursday, April 10, 2003, at 10:43 PM, Isaac Richards wrote:

> On Thursday 10 April 2003 11:13 pm, Vincent Colombo wrote:
>> Hey,
>>
>> I just recorded two shows (one half hour, the other an hour) and
>> watched as my memory got chewed up. I didn't have the front end
>> running, just the back end. When I started my memory utilization was
>> around 22%, now it's at 95% even though the recordings are done.
>> Should
>> Myth eventually release the memory that it chewed up during recording?
>> If so, how long would it usually take? Oh, and I've got 1GB of RAM.
>
> Ah, no, that's not normal at all. It shouldn't be using more than
> 40/50MB of
> ram or so.
>
> Isaac
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
Re: Memory usage [ In reply to ]
Thus spake Vincent Colombo:
> Any idea what might be causing it and how I could go about fixing it?

Out of curiosity, are you referring to the actual resident size of the
mythtv process, or were you looking at the "Free" number on the Memory
line in top?

--
Nathan Poznick <poznick@conwaycorp.net>

Ignorance breeds monsters to fill up the vacancies of the soul that are
unoccupied by the verities of knowledge. - Horace Mann
Re: Memory usage [ In reply to ]
On Thursday 10 April 2003 11:59 pm, Vincent Colombo wrote:
> Any idea what might be causing it and how I could go about fixing it?

Just as a sanity check, are you talking about system ram (as reported by
'free') or ram specifically used by mythbackend?

Isaac
Re: Memory usage [ In reply to ]
What are you using as a memory benchmark? free, top, etc?

Are you possibly confusing free memory from cached memory?

-Rob

> Any idea what might be causing it and how I could go about fixing it?
>
> Thanks,
>
> Vince
>
>
> On Thursday, April 10, 2003, at 10:43 PM, Isaac Richards wrote:
>
> > On Thursday 10 April 2003 11:13 pm, Vincent Colombo wrote:
> >> Hey,
> >>
> >> I just recorded two shows (one half hour, the other an hour) and
> >> watched as my memory got chewed up. I didn't have the front end
> >> running, just the back end. When I started my memory utilization was
> >> around 22%, now it's at 95% even though the recordings are done.
> >> Should
> >> Myth eventually release the memory that it chewed up during recording?
> >> If so, how long would it usually take? Oh, and I've got 1GB of RAM.
> >
> > Ah, no, that's not normal at all. It shouldn't be using more than
> > 40/50MB of
> > ram or so.
> >
> > Isaac
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users@snowman.net
> > http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
> >
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>



Dege

So Many Things in Life Would Be Really Funny
.... If They Weren't Happening To Me
Re: Memory usage [ In reply to ]
Ok, according to TOP mythbackend isn't using much memory (about 15MB).

But yes, my free ram decreased to about 10MB while mythbackend was
recording? Is this normal?

Sorry if this was a dumb question that got you worried Isaac. ;)

Vince


On Thursday, April 10, 2003, at 11:13 PM, Isaac Richards wrote:

> On Thursday 10 April 2003 11:59 pm, Vincent Colombo wrote:
>> Any idea what might be causing it and how I could go about fixing it?
>
> Just as a sanity check, are you talking about system ram (as reported
> by
> 'free') or ram specifically used by mythbackend?
>
> Isaac
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
Re: Memory usage [ In reply to ]
I had issues with mythbackend starting up a lot of threads (it starts one
every time it transfers a file to the front end, network logos, etc.)
These threads aren't garbage collected until the frontend closes. Each of
these threads was getting a stack of the same size as the rlimit stack size
I had set (which was 256M for some old reason with my dotfiles). Because
of this, mythbackend would freeze up after about 7 threads. Shrinking the
stack size fixed it and mythbackend wouldn't immediately freeze. However,
those threads were still never garbage collected until the frontend closed.

-- Gerald
Re: Memory usage [ In reply to ]
My memory (1280MB) does get saturated while recording. It also doesn't really
flush it either, even when the backend dies.

--Ken


Quoting Isaac Richards <ijr@po.cwru.edu>:

> On Thursday 10 April 2003 11:13 pm, Vincent Colombo wrote:
> > Hey,
> >
> > I just recorded two shows (one half hour, the other an hour) and
> > watched as my memory got chewed up. I didn't have the front end
> > running, just the back end. When I started my memory utilization was
> > around 22%, now it's at 95% even though the recordings are done. Should
> > Myth eventually release the memory that it chewed up during recording?
> > If so, how long would it usually take? Oh, and I've got 1GB of RAM.
>
> Ah, no, that's not normal at all. It shouldn't be using more than 40/50MB of
>
> ram or so.
>
> Isaac
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
>


--
Ken VanDine
biZrace Inc.
http://www.biZrace.com
kvandine@biZrace.com
Re: Memory usage [ In reply to ]
Ah. Alright. Sorry 'bout that.


On Thursday, April 10, 2003, at 11:36 PM, Dwight Hubbard wrote:

>> Ok, according to TOP mythbackend isn't using much memory (about 15MB).
>>
>> But yes, my free ram decreased to about 10MB while mythbackend was
>> recording? Is this normal?
>
> That's normal, free memory gets utilized for disk cache if it isn't
> needed
> for anything else. In top the disk cache is shows up as "buff". So
> the
> actual free memory is the sum of free and buff.
>
>
Re: Memory usage [ In reply to ]
> Ok, according to TOP mythbackend isn't using much memory (about 15MB).
>
> But yes, my free ram decreased to about 10MB while mythbackend was
> recording? Is this normal?

That's normal, free memory gets utilized for disk cache if it isn't needed
for anything else. In top the disk cache is shows up as "buff". So the
actual free memory is the sum of free and buff.
Re: Memory usage [ In reply to ]
Thus spake Dwight Hubbard:
> That's normal, free memory gets utilized for disk cache if it isn't needed
> for anything else. In top the disk cache is shows up as "buff". So the
> actual free memory is the sum of free and buff.

Actually, the disk cache is part of the 'cached' number in top. It's a
little deceiving because it's listed on the Swap line, but it's part of
the memory stats.

But yes, this is completely normal. On my myth machine right now (512mb
ram), it's sitting at about 400mb of memory being used for cache. It's
nothing to worry about, since if the memory is needed for something
important, the kernel will take care of it.

--
Nathan Poznick <poznick@conwaycorp.net>

To teach is to learn twice. --Joseph Joubert
Re: Memory usage [ In reply to ]
At 11:09 PM 4/10/2003 -0500, Nathan Poznick wrote:
>Thus spake Vincent Colombo:
> > Any idea what might be causing it and how I could go about fixing it?
>
>Out of curiosity, are you referring to the actual resident size of the
>mythtv process, or were you looking at the "Free" number on the Memory
>line in top?

This clarification involves more than curiosity ... especially now that
others are jumping on this bandwagon.

The "top" entry, like the first line in "free", will over time always grow
to close to 100% usage of physical (not swap) RAM, because that's the way
the Linux kernel works. It leaves recently-used processes and files in
memory, as buffers and cache, against the possibility that they will be
used again (so can be run or accessed more quickly, since they don't need
to be reloaded from comparatively slow disk). Every Linux system ... not
just Myth ones ... works like that.

OTOH, if you see this unbounded growth in the Myth process itself, or on
the second line of the output of "free" (the one that adjusts for cache and
buffers), then you probably have a problem and should post the details.
Re: Memory usage [ In reply to ]
On Friday 11 April 2003 12:31 am, Gerald Britton wrote:
> I had issues with mythbackend starting up a lot of threads (it starts one
> every time it transfers a file to the front end, network logos, etc.)
> These threads aren't garbage collected until the frontend closes. Each of
> these threads was getting a stack of the same size as the rlimit stack size
> I had set (which was 256M for some old reason with my dotfiles). Because
> of this, mythbackend would freeze up after about 7 threads. Shrinking the
> stack size fixed it and mythbackend wouldn't immediately freeze. However,
> those threads were still never garbage collected until the frontend closed.

Thanks for pointing that out, should be fixed in current CVS now.

Isaac