Re: Memory management

From: kumar1(at)home(dot)com (Prasanth A(dot) Kumar)
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Memory management
Date: 2000-07-07 00:51:39
Message-ID: m33dlm4vac.fsf@C654771-a.frmt1.sfba.home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

=?iso-8859-1?Q?R=E9my_Dufour?= <remy(dot)tech(at)webnet(dot)qc(dot)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(at)home(dot)com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message THANHMAI 2000-07-07 02:56:04 postmaster start problem
Previous Message Stein, Neil 2000-07-06 19:56:08 Index pg_attribute_relid_attnam_index is not a btree