Memory leak?

Gordon Messmer yinyang at eburg.com
Mon Jan 30 19:37:58 UTC 2006


Jeffrey Ross wrote:
> I believe I have a memory leak someplace on the system,  over several 
> days I watch the used memory slowly climb and eventually the system 
> starts swapping

How much does it swap?

New users often ask about memory use, since "free" memory will under 
normal conditions, shrink toward 0.

Example output from the "free" command:
$ free
            total       used       free     shared    buffers     cached
Mem:     1555352    1518588      36764          0      61120     855200
-/+ buffers/cache:   602268     953084
Swap:      1044216      848    1043368

In that example, my workstation with 1.5GB of RAM has just 36M of free 
memory.  However, swap barely has anything at all in it, less than 1M.

The key is the memory used for write buffers and cached files.  Files, 
when accessed, will be stored in memory as long as nothing else is 
contending for the space.  That way, when they're accessed again, they 
don't need to be read off of the disk.  This boosts performance, and 
decreases wear on the disk and power consumption.

To simplify the math, "free" prints a second line which shows memory 
use, but doesn't count cached files.  That line, in the example, shows 
that ~600M is used by applications, and ~950M is free memory.




More information about the fedora-list mailing list