Tracking Memory Consumption Using Pmap (March 19, 2012)
Massif is a really nifty tool which is very powerful, especially paired with my visualizer. The caveat of course is that it slows down the application considerably, I’ve seen anything up to a factor of 100… I see no alternative to Massif when it comes to investigating where your memory problems come from. But if you just want to see whether you have a problem at all, tracking the total memory consumption should suffice.
A few days ago, I came across pmap on Stack Overflow, which makes it easy to track the RSS memory consumption of an application using the
-x switch. Of course I had to write some bash magic to automate this process and visualize the data using Gnuplot! Behold:
memory consumption of a PhantomJS script over ~30min