[TriLUG] Understanding output of "free"
Andrew Perrin
clists at perrin.socsci.unc.edu
Fri May 3 11:46:22 EDT 2002
The buffers are reclaimable by new memory requests -- they're stored in
buffers rather than cleared because:
- Clearing memory takes processing time; and
- The kernel makes an assumption that a recently-used program is more
likely to be asked for again than is a non-recently-used program.
Therefore it makes sense to keep the information in RAM, but not reserved,
until the memory is needed (or the same information is "reloaded").
Corrections welcome.
ap
----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists at perrin.socsci.unc.edu * andrew_perrin (at) unc.edu
On Fri, 3 May 2002, Jeremy P wrote:
>
> Can anyone explain what the kernel buffers/cache are used for, as
> displayed in the output of "free"?
>
> For example, one of my servers shows this:
> $ free -m
> total used free shared buffers cached
> Mem: 885 872 12 501 371 156
> -/+ buffers/cache: 344 540
> Swap: 133 7 125
>
> (Yes, I know I need more swap.)
>
> At first glance, it looks like there's only 12 MB free memory, but if you
> subtract the buffers/cache amount, there's 540 MB free (344 used). What's
> all that buffer memory being used for?
>
> Suppose an application requests more than 125 MB of memory, the total
> amount shown free. Will it "steal" extra memory from the buffers? Or will
> it get out-of-memory errors?
>
> Also, why does it only show 885 MB physical RAM even though the computer
> has a 1 GB DIMM installed? The BIOS reports something like 992MB at the
> POST. That's a difference of 107MB -- that's a lot!
>
> I'm trying to figure out whether this box really needs more physical RAM
> or not. The extremely tight budget is becoming even tighter...
>
> Thanks for any tips!
>
> --Jeremy
>
> _______________________________________________
> TriLUG mailing list
> http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ:
> http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
>
More information about the TriLUG
mailing list