Re: Memory usage

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Rick Gigger <rgigger(at)leadership-solutions(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Memory usage
Date: 2004-02-28 22:23:02
Message-ID: 20040228222302.GC12519@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-02-28 22:24:48 Re: postmaster out of memory....
Previous Message Martijn van Oosterhout 2004-02-28 22:18:38 Re: Irreversible performance drop after increasing shared mem