Rails 1.2 slower than 1.1?

| by Sebastien Auvray Follow 0 Followers on Apr 04, 2007. Estimated reading time: 1 minute |
Stefan Kaes, a Rails core developer since 2005, and author of InfoQ's 2006 most viewed article on Rails Performance,  has released Railsbench 0.9.2. Railsbench is a collection of ruby and shell scripts which make measuring raw performance of rails apps a snap. Benchmarking of HTTP POST requests is now supported and several other features have been added that affect the specification of the Railsbench benchmarks.yml configuration file, and the generation of PNG graphics.

Stefan put the new version into practice by comparing Rails 1.1-stable and 1.2-stable with a test suite made of simple rendering, action cached and session creation. The suites were run with different session options using pstore, ActiveRecordStore and SqlSessionStore.

From those tests, Stefan found out that 1.2-stable was about 20% slower than version 1.1.   The full report comes with remarks and advise:
  • Previous reports on Rails 1.2 being twice as slow as Rails 1.1 are performance FUD
  • Action caching could use some attention
  • Never use pstore as your session container
  • With the current Ruby interpreter it seems impossible to avoid slowdowns as the code base of Rails grows, due to slow GC and large interpreter overhead. YARV might change this.
The question perhaps remains: Did the Rails core team sacrifice performance for features on Rails 1.2? Will there be focus on performance for the next stable release?

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Unsubstantiated Claims... by Sam Smoot

Rails creates a lot of objects it doesn't need to. It seems that the language and GC is catching some of the flak for this undeservedly.

If 1.1 was good enough for you... by Michael Neale

then 1.2 will be just fine. Just use it, the features are probably worth it.

Ruby and concurrency by Scott Fraser

It appears that these benchmarks are a single threaded client, is that correct? In other words when the test was "run 5000 times", it was 5000 serial calls to the web server. As opposed to 5000/X calls made by X number of clients all at the same time.

I am curious about how Ruby performs under a multi-threaded load - can anyone comment?


Scott Fraser

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

3 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you