So I’ve got this web app. It’s pretty “heavy” and it does a lot of image manipulation. It’s a bit of a pig, to be honest.
Under Ruby 1.8.7 and 1.9.1, you can reliably expect the memory usage of this app to grow .. and grow .. and grow. I have seen it reach 900M before I shut it down (manually on development machine – in production monit would have killed and restarted it long ago).
Memory usage under 1.9.2pre1? 72.7M and it’s been running for hours. It got as high as ~130M or so at one point, but then – astonishingly – GC actually worked and released unused memory. Will wonders ever cease?
Performance is up around 20% on 1.9.1, too.
Memory usage, and the constant leaking/growth thereof, is my number one daily problem with Ruby. The preview release of 1.9.2 seems to have solved it. To say I’m happy about this development would be an understatement. I am looking forward to deploying on 1.9.2 ASAFP and will do so, probably, upon the release of preview 2 (I have noticed no stability problems whatsoever).
update: 12 hours later it’s gone down to 65.5M. Praise the Ruby Gods!
Tags: ruby
December 6th, 2009 at 7:59 pm
Will have to try out 1.9.2 with my Walrus gem. That has always suffered from uncollected garbage bloat.
December 6th, 2009 at 11:13 pm
Bah, no luck testing it so far, because it depends on a gem that refuses to build under 1.9. Investigating the cause, but no idea what’s happening so far.
December 7th, 2009 at 12:02 am
so, does rails 2.3.x work on 1.9.x?
December 7th, 2009 at 12:09 am
Yes, mostly, with the patches described in my previous post.