Detect Excessive Memory Usage
But before we get to that, let’s talk about how to determine that memory usage is in fact a problem in your application. For that you’ll need two kinds of tools: one for monitoring and one for profiling.
No matter where you deploy, on servers or on customers’ workstations, you’ll need a monitoring tool to show your application’s memory usage. In the Ruby on Rails world the go-to monitoring tool is New Relic.[13] Some deployment platforms, such as Heroku, have their own monitoring. If you prefer to set up your own solution, tools are available for that too. Good examples are Nagios[14] and Munin.[15]
So what can a monitoring tool show you? Something like this:
That’s the Heroku memory metric chart. You can ...
Get Ruby Performance Optimization now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.