Tips for optimizing your Rails app

Over on the TextDrive weblog, Julik shares some tips for keeping your server resource usage to a minimum when deploying a Rails app.

Rails is nuclear stuff, it allows you to do wonders in minutes but you have to be careful with it. The amount of magic contained in Rails imposes quite an overhead“ that you, as a developer, are obliged to manage. These things not only make your application faster, scalable and tolerant, but also bearable for people living on the same web and application servers. Failures to do this in a shared heteregenous environment certifably leads to memory leaks and hard crashes. These tips are good standard procedures for a Rails application at any level (even if you are on a dedicated cluster setup).

Here are the tips Julik suggests, with explanations for each in the weblog post linked above:

  1. Minimize the amount of FCGI listeners
  2. Use caching
  3. NEVER run development on FastCGI for more than 1-2 hours
  4. Observe your memory consumption
  5. Rotate your logs
  6. Write and run unit tests
  7. Check for memory leaks when you are developing
  8. Be careful with iterations
  9. Watch the Rails TRAC for bug reports
  10. Be vigilant when restarting your server

0 Comments

Sorry, comments are closed for this article to ease the burden of pruning spam.

About

Authored by John Nunemaker (Noo-neh-maker), a programmer who has fallen deeply in love with Ruby. Learn More.

Projects

Flipper
Release your software more often with fewer problems.
Flip your features.