Takeaways
When optimizing your application, look beyond the code in your search for performance problems. Sometimes an unoptimized application running on a properly configured software stack will perform better than the thoroughly optimized one in a poorly configured stack.
This chapter has expored several items you need to think about when deploying your Ruby application:
-
Restart your long-running processes when they grow too large in memory. A freshly started application runs faster because the GC has fewer objects to collect.
-
Run heavy tasks in an isolated forked environment. This way the forked process will give back to the operating system all the memory allocated during its execution.
-
Do out-of-band garbage collection if you use ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access