[Mongrel] mongrel garbage collection
Steve Midgley
public at misuse.org
Fri Mar 21 17:19:13 EDT 2008
At 01:19 PM 3/21/2008, mongrel-users-request at rubyforge.org wrote:
>Date: Fri, 21 Mar 2008 14:19:01 -0600
>From: "Kirk Haines" <wyhaines at gmail.com>
>Subject: Re: [Mongrel] mongrel garbage collection
>To: mongrel-users at rubyforge.org
>Message-ID:
> <f4cd26df0803211319o491ad3c1u92ef5509c433c76b at mail.gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1
>On Fri, Mar 21, 2008 at 1:23 PM, Scott Windsor <swindsor at gmail.com>
>wrote:
>
> > I understand that the GC is quite knowledgeable about when to run
> garbage
> > collection when examining the heap. But, the GC doesn't know
> anything about
> > my application or it's state. The fact that when the GC runs
> everything
> > stops is why I'd prefer to limit when the GC will run. I'd rather
> it run
> > outside of serving a web request rather then when it's right in the
> middle
> > of serving requests.
>
>It doesn't matter, if one is looking at overall throughput.
Hi Kirk,
One thought on this - would it be possible to schedule GC to run just
after all the html has been rendered to the client from Rails, but
while leaving open the connection (so that mongrel is blocked on
Rails)?
If so, it seems like if one were using something like nginx fair proxy,
then the mongrel would be running it's garbage collection AFTER the
client got all its html but BEFORE any new requests were sent to it.
In a fully loaded server it wouldn't matter at all, but most
environments have a little headroom at least, so that nginx fair proxy
would just route around the mongrel that is still running a GC at the
end of it's Rails loop.
So total throughput for a given (non-max) volume of requests might be
unaffected since nothing would ever pile up behind a rails process that
has slowed down to run GC (and the client will be happy since they got
all their html before the GC started).
I have no idea if this is meaningful, but I've been playing with some
performance tests against mongrel + nginx fair proxy and it occurs to
me that this might be relevant..
Best,
Steve
More information about the Mongrel-users
mailing list