X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CA9AA40C20F for ; Sun, 30 Jan 2005 21:52:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18667-04 for ; Sun, 30 Jan 2005 21:52:35 +0000 (GMT) Received: from flake.decibel.org (flake.decibel.org [66.143.173.58]) by svr1.postgresql.org (Postfix) with ESMTP id A952640C0DC for ; Sun, 30 Jan 2005 21:50:27 +0000 (GMT) Received: by flake.decibel.org (Postfix, from userid 1001) id 8752E1C903; Sun, 30 Jan 2005 15:50:29 -0600 (CST) Date: Sun, 30 Jan 2005 15:50:29 -0600 From: "Jim C. Nasby" To: Rick Apichairuk Cc: pgsql-general@postgresql.org Subject: Re: FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings Message-ID: <20050130215029.GP64304@decibel.org> References: <9776bb66050130122122a3e342@mail.gmail.com> <20050130205021.GA14588@guests.deus.net> <9776bb660501301326565859a3@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9776bb660501301326565859a3@mail.gmail.com> X-Operating-System: FreeBSD 4.10-RELEASE-p3 i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/1766 X-Sequence-Number: 72715 On Sun, Jan 30, 2005 at 04:26:29PM -0500, Rick Apichairuk wrote: > Is the shared_buffers per process? The reason I ask is the formula > given on http://www.postgresql.org/docs/7.4/static/kernel-resources.html > for calculating how much SHMMAX you need is: > > SHMMAX = 250 kB + 8.2 kB * shared_buffers + 14.2 kB * max_connections > up to infinity No, it is system-wide. shared_buffers is used for a number of things, but any excess is used by PostgreSQL to buffer data it reads. Before 8.0 the consensus was that (unlike most databases) it's better to let the OS cache the data instead of PostgreSQL. 8.0 has a much more advanced cache management algorithm, so it might now be better to let PostgreSQL be your primary cache, but AFAIK no testing has been done to show that's the case. -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"