Ruby on Rails Optimizing Performance
Ruby on Rails is very fun, i love it, but Ruby sometimes can be slow.. So here there are some hints to speed up your Ruby on Rails web application.
Rails Performance Tips
- Common Performance Problems in Rails – Pros and con between SQLSessionStore and MemChacheStore session containers, tips on optimizing queries, and general information regarding how to avoid slow helpers.
- The Adventures of Scaling: Stage 1, Stage 2, Stage 3, Stage 4 – A detailed explanation a Rails production architecture.
- Optimizing Rails Resource Usage – A short list of top Rails optimization tips, which include the proper use of caching.
- Sustainable Performance with Ruby on Rails – A 58 page PDF presentation describing railsbench, caching, session performance, and efficient Ruby code.
- Rails performance tips – A discussion on eager loading, excluding unnecessary columns, indexing database columns, and caching.
- Top 10 Ruby on Rails performance tips – Provides great tips to optimize your ruby code and how to handle finders.
- Performance related changes in Rails 1.1 – Discussion of performance enhancements in rails 1.1.
- Rails performance and caching, Part 2 – A discussing of Rails performance using caching.
- Stefan Kaes – Rails Performance – RubyConf 2006 conference notes on the Rails Performance presentation given by Stefan Kaes.
- Stefen Kaes – Optimizing Rails – Another post on the Rails 2006 presentation by Stefan Kaes on Rails Performance.
- Rails performance with FastCGI and Apache – A blog post on performance with Apache.
- Rails Performance Tool Box – A list of tools that come in handy when optimizing a Ruby on Rails application, which include query analyzer, query trace, and mtop.
- Rails Caching Documentation – Documentation for action, page, and fragment caching.
- The effect of using Rails fragment caching – Goes over the performance boost of using fragment caching.
Rails Performance Tools
- Query Builder Plugin – Bypass the overhead of construct_finder_sql.
- QueryTrace Plugin – Helps to identify the location/caller of bad queries.
- MySQL Query Analyzer Rails Plugin – Helpful to analyze SQL queries.
- Rails Log Analyzer – Reads the Rails log files and exposes potential points of optimization.
- Railsbench – “A small collection of ruby and shell scripts which make measuring raw performance of rails apps a snap.
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Another tool you may want to include in the Rails Performance Tools section is request-log-analyzer. I may no be fully objective as the author, but I think the reports it produces are superior to the other open source tools available like rawk and pl_analyze. Moreover, no special logger is needed and it can be easily adapted to specific application needs.