Re: Memory usage - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Memory usage
Date
Msg-id 20040228222302.GC12519@svana.org
Whole thread Raw
In response to Memory usage  ("Rick Gigger" <rgigger@leadership-solutions.net>)
List pgsql-general
On Wed, Feb 25, 2004 at 02:10:56PM -0700, Rick Gigger wrote:
> I want to know how much memory I've got free on my system.
>
> The free command gives me something like this:
>
>              total       used       free     shared    buffers     cached
> Mem:       2064832    2046196      18636          0     146892    1736968
> -/+ buffers/cache:     162336    1902496
> Swap:      2040244      12180    2028064
>
> It would make sense to me that the kernel is sucking up most of my memory
> into a bunch of unused buffers and that I actually have a lot more than 18
> megs of free memory.  Is this the correct interpretation of these numbers?
> What is the best way to get a good idea of how much memory I actually have
> free on my system.

Depends what do you mean by "free". If you mean "the amount of memory not used by
anything", that's the free column. If you mean "the amount of memory
that can be allocated by a program without forcing swapping", that's
the free column plus the cached column and probably the buffers column
too.

The buffers and cache are managed by the kernel since totally unused
memory is wasted memory.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> If the Catholic church can survive the printing press, science fiction
> will certainly weather the advent of bookwarez.
>    http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow

Attachment

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: postmaster out of memory....
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Irreversible performance drop after increasing shared mem