Monitoring memory use

Jerry Feldman gaf at blu.org
Mon Sep 24 11:54:47 EDT 2007


On Mon, 24 Sep 2007 10:35:59 -0400
Bill McGonigle <bill at bfccomputing.com> wrote:

> 
> On Sep 21, 2007, at 09:44, Kent Johnson wrote:
> 
> > I was hoping for a utility that would wrap the process in some way and
> > report the high-water memory use of the process. Oh well...
> 
> That sounds something like a profiler.  Sorry, not a specific  
> recommendation, but perhaps an extra Google keyword.

Valgrind is a very useful tool to monitor memory use. It is not exactly
what the OP wants, but it is designed to indicate things such as memory
leaks et. al. Strace(1) may also be useful where you can trace calls to
sbrk(2), brk(2), or mmap(2) calls. 

Additionally some commercial programs can also do this such as Intel's
VTune or HP's Caliper. We used both tools not only to monitor hot
spots, but we also looked at memory usage as well as cache misses. Both
products also produce graphs.

Also remember that a process lives in virtual memory so its high water
mark might not be all that relevant.  In general, when a process
allocates memory via malloc(3)- and friends, while it may free(3) that
memory, malloc(3) generally does not return that memory to the OS.
(Same with the C++ new and delete operators. 
-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20070924/6c6249ff/attachment.bin 


More information about the gnhlug-discuss mailing list