[Zope] Python use more and more memory

ken ken@cleveland.lug.net
Wed, 11 Dec 2002 18:31:34 -0500 (EST)


Felix Ulrich-Oltean at 14:36 (UTC-0000) on Wed, 11 Dec 2002 said:

= On Wed, Dec 11, 2002 at 09:27:07AM -0500, ken wrote:
= > Dieter Maurer at 20:18 (UTC+0100) on Tue, 10 Dec 2002 said:
= > = Terry writes:
= > =  > In beginning I start Zope.
= > =  > the python use about 26M memory.
= > =  > 
= > =  > After several hours
= > =  > get the result by "top"
= > =  > Sort by memory usage
= > =  > 
= > =  > PID  USER    PRI NI  SIZE RSS SHARE STAT %CPU %MEM  TIME COMMAND
= > =  > 4931 www-data 13  0 94324 92M 2504     S  3.5 10.4  7:43 python
= > =  > 5022 www-data  9  0 94324 92M 2504     S  0.0 10.4  0:00 python
= > =  > 5023 www-data  9  0 94324 92M 2504     S  0.0 10.4 15:55 python
= > =  > 5024 www-data 14  0 94324 92M 2504     S 14.5 10.4 16:55 python
= > =  > 5025 www-data 10  0 94324 92M 2504     S  0.3 10.4 15:35 python
= > =  > 5026 www-data  9  0 94324 92M 2504     S  0.0 10.4 16:32 python
= > =  > 
= > =  > Have any idea why?
= > ...
= > Maybe I'm missing something, but I see the %MEM staying at 10.4; SHARE 
= > and SIZE are likewise staying the same.  Seems that it's behaving itself 
= > quite well.  Or...?
= 
= I think the listing is a snapshot at one time - the lines are the
= different threads and the memory figures are in fact shared memory.
= The percentage is 10.4, but the actual size is 94M, which compared to
= 26M at the beginning is a sizeable increase.
= ...

Working from that and looking at the second instance, we can see that
process 5022 has been running for 0.00 (just started, presumably), but 
still has claimed 92M, the same as other processes which have been 
running much longer.  On the face of it, this doesn't indicate a memory 
leak-- which would be something to be concerned about-- but that, for 
some reason, python thinks it requires more memory upon initiating a 
process.

By itself, this doesn't tell us what is causing the increase in demand 
for memory.  It would be a situation calling for diagnostics collected 
over time, as with sar or vmstat, and these correlated with demands made 
on python.


Cheers,
ken