Re: memory allocation ; postgresql-8.0 - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: memory allocation ; postgresql-8.0
Date
Msg-id 1115404683.3868.86.camel@state.g2switchworks.com
Whole thread Raw
In response to memory allocation ; postgresql-8.0  ("Kavan, Dan (IMS)" <KavanD@imsweb.com>)
List pgsql-admin
On Fri, 2005-05-06 at 13:28, Kavan, Dan (IMS) wrote:
>       Hi,
>
> I am reserving 2.1 GB of memory for postgres to use with SuSE linux 9.0
> (SLES) in sysctl.conf.
> I have configured postgres to use 1.9 GB of memory so it won't go over
> the 2.1 cap (postgresql.conf).
> I have a total of 4GB of memory.  Somewhere I read to keep half of the
> memory for other things.  This server is dedicated to postgresql.  Does
> anyone agree with just using 2GB?  Does anyone know where I might have
> read that?

Unless you routinely actually handle data sets that are 1.9 gigabytes in
size, it's probably not a great idea.

PostgreSQL doesn't really cache data in the classical sense.  All the
data stored in its internal buffers is tossed away when the last backend
referencing said material stops referencing it.

Plus, there's a fair bit of overhead to managing such a large data set,
and, until 8.0, the algorithms for doing so with efficiency weren't a
part of PostgreSQL.

While some future version might incorporate genuine caching that could
utilize all that memory, for now, one is still better off giving
postgresql about 250 megabytes max and letting the kernel use the rest
for caching.

pgsql-admin by date:

Previous
From: "Kavan, Dan (IMS)"
Date:
Subject: memory allocation ; postgresql-8.0
Next
From: Edan Gavish
Date:
Subject: how to restore only one db from a pg_dumpall type dump