Triggering OobGC when heap is nearly full
normalperson at yhbt.net
Mon Jun 4 04:47:33 UTC 2012
Tony <bascule at gmail.com> wrote:
> We've started using OobGC at my workplace and it's definitely helping,
> however the amount of garbage various requests in our app can generate
> is quite the chunky stew.
Cool! (though I can't say I've ever /liked/ OobGC :x)
> It seems like OobGC configuration is all predicated around a number of
> requests to process before OobGCing. However, REE exposes heap/GC
> stats that could be used to make that decision intelligently at
> Is there any way presently to use some heuristics around the current
> state of the heap to decide when to OobGC, or barring that, a way to
> pass a proc I would write into OobGC that can answer the question
> "should I OobGC?" with true/false rather than relying on a certain
> number of requests?
Not right now, but OobGC is only ~20 lines of code or so it
should be easy to figure out how to add/change.
Btw, I'm still really curious to know how the lazy-sweep GC in 1.9.3
behaves with OobGC, I think 1.9.3+ should make OobGC obsolete.
More information about the mongrel-unicorn