[squeak-dev] What are we leaking in the www.squeak.org process?

Ken Causey ken at kencausey.com
Thu Oct 14 21:55:16 UTC 2010


For some time now I've been bugging Janko about the memory usage of the
process that serves http://www.squeak.org/ .  I've gathered a bit more
info today and I'd like to see if anyone here has any thoughts.

First while there is some variation most of the Squeak processes that
serve squeak.org sites (source.squeak.org, map.squeak.org,
wiki.squeak.org) have a more or less constant and reasonable memory
usage.  Let me clarify that what I am talking about here is RSS
(Resident Set Size) as reported by ps/top on Linux.  Swiki as the oldest
of the group is the clear winner at just under 30MB, squeakmap is around
47MB, and source.squeak.org is around 59MB.

In contrast immediately after starting it www.squeak.org is using about
70MB and it grows from there.  Now a bit more than an hour since the
last restart it is already up to about 85MB.  I have seen it over 300MB
before, and it commonly uses 140-250MB.  It doesn't simply grow and
grow, it does shrink occasionally.

First, there is a known issue with Swazoo that it does not close sockets
correctly and Janko has addressed this by having Swazoo automatically
restarted every 15 minutes.  So using netstat for example I can watch
the socket count for the process continually grow and then it drops to
zero and this repeats.  In contrast for all the other process (all
running some variation of Kom/Comanche I believe) I'm hard pressed to
even catch a single open socket at any time (not counting the listener
that is).

Secondly, since I've been complaining about this issue for a long time
Janko has running a little morph that shows current memory usage.  What
this shows is the values of SmalltalkImage current vmParameterAt: 2 and
3.  These numbers are quite stable.  For example at this moment these
are 68.3MB and 71.0MB respectively.  Whereas ps shows the RSS at
85752KB.  Where is the discrepancy here?

My current theory is that the vmParameters are not reflecting incidental
memory use by the VM and plugins or that we are simply misinterpreting
the values.  Is it possible that Swazoo is failing to release something
that is causing the VM to use more memory than it should?

Note that the same VM is used by all of these processes.  It is

3.8a-1 #1 Sun May  1 19:46:46 EDT 2005 gcc 3.3.5

Yes, I know it's old, but 'if it ain't broke, don't fix it' has been the
motto and with the possible exception of Swazoo/www.squeak.org it has
been working wonderfully for a long time now.

Your thoughts would be greatly appreciated,

Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20101014/3c0980ec/attachment.pgp


More information about the Squeak-dev mailing list