Received: from sss.pgh.pa.us ([209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2J6ht683644 for ; Mon, 19 Mar 2001 01:43:55 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f2J6e1t15641; Mon, 19 Mar 2001 01:40:01 -0500 (EST) To: Michael Fork cc: pgsql-admin@postgresql.org Subject: Re: SHMEM settings under FreeBSD In-reply-to: References: Comments: In-reply-to Michael Fork message dated "Mon, 19 Mar 2001 00:24:43 -0500" Date: Mon, 19 Mar 2001 01:40:01 -0500 Message-ID: <15638.984984001@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/139 X-Sequence-Number: 987 Michael Fork 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