Linux memory leak?

Josip Loncaric josip at icase.edu
Thu Feb 28 14:19:00 PST 2002


"Huntsinger, Reid" wrote:
> 
> As far as I can tell, on later kernels (2.4.10, 2.4.13, 2.4.17) this is
> mostly due to aggressive caching. (?) You can get an idea for what's going
> on by running a program to eat up lots of memory (e.g, malloc then write
> over and over) and check how long it takes. You should notice that when
> "free" reports lots of "used" memory but nothing is really running, the
> program will nearly run as fast as after a fresh boot. The "used" pages are
> easily given up (not swapped out). This also has the side-effect of making
> "free" report a reasonable number.

I'll test this.  Unfortunately, a few of the past incidents suggest that
the missing RAM may be unavailable to processes (i.e. swapping
starts).   We've also had a few (rare) episodes where a node reaches a
memory starved state and starts mercilessly killing processes to the
point of crashing.

Also, /proc/meminfo and 'free' should reliably report correct memory
usage because the amount of available memory is reported to schedulers
such as PBS, so if 'free' numbers are wrong then the node can drop out
of service.

Finally, memory management in 2.2 kernels did seem more reliable than in
2.4 kernels, which are clearly still evolving.

Thanks,
Josip

-- 
Dr. Josip Loncaric, Research Fellow               mailto:josip at icase.edu
ICASE, Mail Stop 132C           PGP key at http://www.icase.edu./~josip/
NASA Langley Research Center             mailto:j.loncaric at larc.nasa.gov
Hampton, VA 23681-2199, USA    Tel. +1 757 864-2192  Fax +1 757 864-6134



More information about the Beowulf mailing list