Reputation: 996
I simply want to keep track of how much memory various processes are using (different options can radically change the memory usage of this particular application). I don't like the various "find the process pid and grok /proc/pid/smaps" solutions described elsewhere...
Is there an alternative command to use that will just dump memory usage of a particular process? memusage?
Upvotes: 0
Views: 7405
Reputation: 6771
According to Valgrind Manual, Valgrind will very noticeably slow down your application:
The amount of instrumentation code added varies widely between tools. At one end of the scale, Memcheck adds code to check every memory access and every value computed, making it run 10-50 times slower than natively. At the other end of the spectrum, the minimal tool, called Nulgrind, adds no instrumentation at all and causes in total "only" about a 4 times slowdown.
In my experience Valgrind indeed slows down an application by about factor 10.
How detailed do you need the memory usage to be reported? Is top
(RES
column) not sufficient?
Upvotes: 6
Reputation: 996
Just had a look with "time valgrind memhog 1024m", and it's about 10 times slower. Don't notice any slowdown with 'memusage'.
Upvotes: 1