O'Reilly logo

Ruby Performance Optimization by Alexander Dymo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required