A good write-up is in the TextDrive blog about how to optimize Rails’ resource usage.