pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: kumar1@home.com
To: pgsql-admin@postgresql.org
Subject: Re: Memory management
Date: 06 Jul 2000 17:51:39 -0700
Message-ID: <m33dlm4vac.fsf@C654771-a.frmt1.sfba.home.com> (raw)
References: <000801bfe6b5$b1d72800$090a0a0a@prog>

=?iso-8859-1?Q?R=E9my_Dufour?= <remy.tech@webnet.qc.ca> writes:
<snip> Recently, I've installed postgres 6.5 on a P3 450 396 megs of RAM. I'm
> running Linux RedHat 6.2. I got a few db on it and one has around 2 million=
> s records. When I boot my server, I do a 'free' and it tells me that I got =
> around 300 megs of RAM free.
> 
> After I do a couple of requests like "Select count(ID) from Store" the memo=
> ry fills itself and my system swaps a bit.
> 
> So, is there a way to limit the memory postgresql is allowed to use?
> 
> And, if anyone can point me out some docs or references on how postgresql/l=
> inux
>  manage its memory.
> 
> I would just add more memory to my machine, but it seems to me that it will=
>  always fills itself and swap some.
<snip>

You might be able to use the ulimit command to prevent a app running
from exceeding a particular amount of virtual memory but that is a
per process limit I think.

Also, a common mistake people make when they check free memory is they
look at the wrong column. In the example below, the free space is
24112K, not 3820K because buffers and caches are just otherwise unused
memory put to good use. See the sample below:

             total       used       free     shared    buffers     cached
Mem:        127720     123900       3820      45420       2984      17308
-/+ buffers/cache:     103608      24112
Swap:       539264      19988     519276                                  

-- 
Prasanth Kumar
kumar1@home.com



view thread (2+ messages)

Message-ID: <m33dlm4vac.fsf@C654771-a.frmt1.sfba.home.com>
Permalink:  ../m33dlm4vac.fsf@C654771-a.frmt1.sfba.home.com/
Also on:    postgresql.org/message-id/m33dlm4vac.fsf@C654771-a.frmt1.sfba.home.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: kumar1@home.com
  Subject: Re: Memory management
  In-Reply-To: <m33dlm4vac.fsf@C654771-a.frmt1.sfba.home.com>
  References: <000801bfe6b5$b1d72800$090a0a0a@prog> <m33dlm4vac.fsf@C654771-a.frmt1.sfba.home.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox