[TriLUG] Understanding output of "free"
Fri, 3 May 2002 11:21:11 -0400 (EDT)
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!