Re: Memory leak?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux