[olug] understanding Linux memory usage

Christopher Cashell topher-olug at zyp.org
Thu Feb 21 22:43:12 UTC 2008


On Thu, Feb 21, 2008 at 11:36 AM, Luke -Jr <luke at dashjr.org> wrote:
> On Thursday 21 February 2008, Ryan Stille wrote:
>  > Ok, so doesn't this make the output of "free" and the free value shown
>  > in the top command *worthless*?  It may say you have 2GB free, so you
>  > think that server is running fine and could handle an additional task or
>  > something, but really that 2GB might be allocated to other processes
>  > that just haven't used the memory yet?
>
>  I think Linux is the only OS that overcommits on memory allocation.
>  BSD might do what you want, or perhaps there's a configuration option to
>  disable overcommitting.

Both the way Linux will overcommit (or if it will at all), and the
overcommit ratio are configurable via /proc entries.  However, the
default overcommit overcommit settings are almost always what you
want, and with rare exception, work very well.

Note though, there's a difference between overcommiting memory, and
the difficulty in trying to determine memory usage among processes.
The first is where Linux will potentially, in certain circumstances
and quantities, allow processes to request more memory than exists
(physical + swap), under the knowledge that many processes aren't
using all the memory they request.  The latter is what we've mostly
been talking about here, and you'll usually see fairly similar
behavior under most Unix-like OS's.

-- 
Christopher



More information about the OLUG mailing list