Ruby 2.2.0 Preview 1 quick Rails benchmarks

Great news everyone! Ruby 2.2 preview 1 has been released ! I'm really curios about the Incremental GC and Symbol GC so let's run some quick Rails benchmarks on a normal Rails API app.

First off let's install the preview via RVM:

rvm install ruby-2.2.0-preview1

After fiddling around about five minutes trying to find a part of the application that doesn't fail under the Preview I stopped at the simple /profiles endpoint that just renders a JSON of all profiles, quite simple indeed. Using the trusty wrk I fired up a quick bench:

I'm not really sure that I should interpret them yet it seems that under the Preview we have a slight improvement but within margins of error. At this point I don't think is the best benchmark for the Preview as we don't use views thus Rails won't bloat up the memory with Strings.

On the memory usage side we have 65M vs 75M (Preview vs. 2.1) so in this scenario we clearly have a winner.

note: this was measured using OSX's Activity Monitor after wrk finished the benchmark and it's the average of the unicorn workers sizes.

Issues

Bundler and all the gems installed without issue but in some cases I got silent failures. The benchmarks were run on an actual working/production Rails 4.0.x app with around 25 gems. Nonetheless all of the gems installed and I could boot up Rails with unicorn and benchmark the simpler endpoints which is great.