[Mongrel] garbage collection patch

Roger Pack lists at ruby-forum.com
Mon Dec 22 03:42:07 EST 2008


Evan Weaver wrote:
> Disabling GC around the requests would guarantee that the size of the
> Mongrel process will balloon to the size of all objects combined in
> the most heavyweight request. Remember that the Ruby heap never
> returns space to the OS. As soon as you re-enable the GC, the entire
> Ruby heap (now 4-5x bigger than it normally would be) will get paged
> back in to physical RAM.
> 

One thing that could be done is to force a GC every "x" requests--that 
way a GC is for sure run between requests [at least with single threaded 
rails] and that way the stack is most shallow and the GC will not pick 
up ghost references left on the stack.  But hopefully we won't have to 
worry about that soon :)
-=R
-- 
Posted via http://www.ruby-forum.com/.


More information about the Mongrel-users mailing list