If you ever coded with Ruby on Rails, you probably are already aware that Garbage Collector is its Achilles’ heel. Though it has been significantly improved through the last couple of years, it still has plenty room for improvement. It is hard to find a Ruby app that would be happy with default Garbage Collector settings. To help you with this, we decided to share with a pretty handy tool called TuneMyGC. Learn about it now!

What is TuneMyGC?

TuneMyGC is a product designed to provide repeatable and systematic tuning process of Garbage Collector in order to make your development faster and more enjoyable. It works as a lightweight agent, which suggests GC configuration and additional tips and insights. Sounds pretty good. But how does it work?

Have a look at rough scheme of its interaction with your application.

tunemygc

Why should I use TuneMyGC?

If your are still a bit skeptic about this product, have a look at the main benefits it brings about:

  1. Faster boot times
  2. Less major GC cycles during requests
  3. Less worst case memory usage
  4. No need to keep up to date with the C Ruby GC

And here’s comparison of GC default settings to suggested TuneMyGC ones:

tunemygc

As you see, TuneMyGC is a real treasure for those, who are looking for ways to improve the performance. Let’s see how to install it.

How to install TuneMyGC?

Luckily, installing TuneMyGC isn’t a lot of pain. Just follow the instruction.

  1. Add it to your Gem file
  2. Register your app
  3. Boot the application. Recommended Garbage Collector configurations will be provided in a report after it ends.

As you see, al work would take you less than 15 minutes, but as a result you will get GC configurations that work best specifically for your app.

We, Rubyroid Labs Team, highly recommend using this gem for optimization. And how do you cope with Ruby Garbage Collector? Share with us in the comments!

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?


Author

Business Analyst at Rubyroid Labs

Write A Comment