Re: SHMEM settings under FreeBSD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fork <mfork(at)toledolink(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: SHMEM settings under FreeBSD
Date: 2001-03-19 06:40:01
Message-ID: 15638.984984001@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Michael Fork <mfork(at)toledolink(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Schuller 2001-03-19 09:56:10 Re: Backing up postgresql databases
Previous Message Michael Fork 2001-03-19 05:24:43 SHMEM settings under FreeBSD