On Tue, 2008-11-18 at 08:24 -0800, 7timesTom wrote:

[...]
> Maybe this post will help someone else also one thing I don't
> understand:
> 
> Why wasn't the memory returned to me after each page view? Why was an
> apache off/on necessary to clear memory? And is there anything I can
> do to help clear memory that been used, but not returned to the system?

I'm going to guess a bit here, since it's almost impossible to tell
without seeing the system in action. But there's one common situation
where it looks like a process is "leaking memory" when it's actually
just running on a Unix-like system. Normal Unix-like process operation
is that malloc'd memory is not returned to the system immediately (it's
the difference between the library call malloc() and the system call
brk(), in effect). This is because the process will often need to
request the same memory again in a short while, so it makes sense to
leave it hanging around. Once memory gets to the over-allocated stage,
it will be reclaimed and once the process exits, it will also be
reclaimed, so there's no long-term memory leak with that model of
operation (which has been around for decades -- it isn't a new thing).

The problem is that software-layer memory monitoring tools don't know
about this and can't tell the system that it is essentially
over-allocated. So there's a conflict between normal operation and those
sorts of monitoring processes.

I don't really know what a solution is there. Been a while since I've
had to play with things at that level and I can't remember if ulimit
settings (setrlimit() at the C library level) is helpful or a hinderance
there, for example.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to