Peformance up - using OobGC & GC.disable

Eric Wong normalperson at
Tue Oct 4 18:53:05 EDT 2011

secondlife <hotchpotch at> wrote:
> after applied,
> application response time 130% fast!
> and CPU usage to half!
> - (response time)
> - (CPU usage)

Thanks for the feedback!  I wonder if 1.9.3 with lazy sweep GC can
provide similar improvements (without needing OobGC or GC.disable,

> This is OobGC patch, apply please.
> - (patch)

Thanks! Applied as c7ba76a21c5d00fb5c173cd6aa847442bbc652cb
with the following commit message:

From: Yuichi Tateno <hotchpotch at>
Date: Mon, 3 Oct 2011 16:51:19 +0900
Subject: [PATCH] OobGC: force GC.start

[ew: we need to explicitly enable GC if it is disabled
 and respect applications that disable GC]

Acked-by: Eric Wong <normalperson at>

> I wrote process killing code because GC.disable create more memory leak.
> -

I think that could be done entirely as Unicorn-specific Rack middleware
and not hook into Unicorn internal methods like process_client.  Also,
the pid checks are unnecessary since that code never runs in the master.

More information about the mongrel-unicorn mailing list