On Dec 27, 2005, at 9:05 AM, Andrea Arcangeli wrote:

> I run into a problem recently with a reconnectingclientfactory with
> twisted while write some spare time software, that turned out to be  
> a gc
> inefficiency.
>
> In short the protocol memory wasn't released after the reconnect  
> and the
> protocol had about 50M attached to it. So with frequent reconnects the
> rss of the task grown to >1G and it pushed the system into heavy swap.
> In reality only 50M were allocated, so 950M were wasted by python.

In this particular case, you might be better off just writing some  
Twisted code that periodically checks the size of the current process  
and does a gc.collect() when necessary.  Of course, it requires some  
platform specific code, but presumably you only care about one, maybe  
two, platforms anyway.

-bob

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to