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. 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 runtime. 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? -- Tony Arcieri
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 > runtime. > > 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.
Tony <bascule at gmail.com> wrote:> 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 > runtime.We''re having the exact same issues here. Also, I find using God to kill workers over memory limits as relatively awkward. It would be great if we could have a proc run after each request. It would be nice if we could check memory usage and then either run the GC or signal QUIT if too much memory has leaked (usually happens after around 10 minutes for us). Clifton