Bumping Up Rails Performance
November 16th, 2009

Just wanted to put up some useful methods for fine-tuning Rails performance.  I’ve never tried all the methods in this list at once, but if you find your app bottlenecking in a particular area, here’s some fixes.

Caching

Bandwidth

  • AssetPacker [synthesis.sbecker.net] – Dynamically pack JS/CSS files
  • Better Output Compression [agilewebdevelopment.com] - Use GZIP to compress data being sent to browsers that can handle gzip’d data.  This is not necessary if you’re behind Apache or another webserver that has this feature.

CPU & Memory

  • Tips @ Joyent [wiki.joyent.com] - There aren’t too many generic ways to reduce memory usage, but this page has some tips.
  • Optimize and cache.  This is very specific to an individual app, but anytime you’re doing a large read-only query against data that doesn’t change much, cache it.

And finally a page similar to this post: