From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Fork <mfork@toledolink.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: SHMEM settings under FreeBSD
Date: Mon, 19 Mar 2001 01:40:01 -0500
Message-ID: <15638.984984001@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSI.4.21.0103190016210.10409-100000@glass.toledolink.com>
References: <Pine.BSI.4.21.0103190016210.10409-100000@glass.toledolink.com>
Michael Fork <mfork@toledolink.com> writes:
> The box has 512MB or RAM, of which I would like for Postgres to use 400MB
> for buffers and 32MB for sorting, which I determined would be:
This is a bad idea. For one thing, you have neglected to allow anything
for backend local data; you should probably leave at least 10-20MB per
backend to avoid swap thrashing. (And you do realize that -S is the
amount of memory to use *per sort operation*? Each backend will feel
entitled to use that much for each sort it's doing, which could well
be several on a complex query.)
Also, I think you are better off leaving a good chunk of memory free for
kernel disk buffering, even on a machine that's not going to do anything
but Postgres.
While you didn't say how many backends you intend to run, my first
instinct would be to allocate no more than 100 to 200Mb of your box
for Postgres disk buffers. They're not the only thing that you want
to use memory for.
regards, tom lane
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: tgl@sss.pgh.pa.us, mfork@toledolink.com
Subject: Re: SHMEM settings under FreeBSD
In-Reply-To: <15638.984984001@sss.pgh.pa.us>
References: <Pine.BSI.4.21.0103190016210.10409-100000@glass.toledolink.com> <15638.984984001@sss.pgh.pa.us>
* 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