News for hackers. Stuff that matters.
Re:Ruby Garbage Collection: Still Not Ready for Production by csfrancis on Friday March 28, 2014 @01:00PM (#7488461)
Ruby 2.1.1 introduces a new environment variable, RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR, that helps to mitigate the heap growth caused by the generational garbage collector added in 2.1. By setting this variable to a value lower than the default of 2 (we are using the suggested value of 1.3) you can indirectly force the garbage collector to perform more major GCs, which reduces heap growth.

See https://bugs.ruby-lang.org/issues/9607 for more information.

Re:Ruby Garbage Collection: Still Not Ready for Production by gnufied on Friday March 28, 2014 @01:43PM (#7488776)
This needs to be upvoted more. We went through similar pains when upgrading rather big app to Ruby 2.1.1 and setting RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR value to 1.3 did help reduce memory usage of Unicorn workes by almost 100MB.

I am not saying this is actual fix and I would like to hear from OP if he tried this environment variable and if it had any impact.

TL;DR New generational garbage collector of Ruby has some issues and ruby-core is working to fix it.

Re:Ruby Garbage Collection: Still Not Ready for Production by jamesharker on Friday March 28, 2014 @03:05PM (#7489284)
We're using this & found it works well at slowing down heap growth however we still end up with the same maximum memory usage as before, it just takes longer to get there.
Re:Ruby Garbage Collection: Still Not Ready for Production by timr on Friday March 28, 2014 @06:39PM (#7490405)
Yes, exactly. You're changing the slope of the growth, but the growth still happens.