Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9A8909FA173 for ; Fri, 8 Dec 2006 15:19:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 64550-02 for ; Fri, 8 Dec 2006 15:19:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 9AF3B9FA136 for ; Fri, 8 Dec 2006 15:19:38 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id A0D9C56437; Fri, 8 Dec 2006 19:19:37 +0000 (UTC) Received: (hashcash-sendmail, from uid 1001); Fri, 8 Dec 2006 13:19:35 -0600 Date: Fri, 8 Dec 2006 13:19:35 -0600 From: "Jim C. Nasby" To: Bill Moran Cc: pgsql-performance@postgresql.org Subject: Re: How to determine if my setting for shared_buffers is too high? Message-ID: <20061208191935.GJ44124@nasby.net> References: <20061207114239.c6b72e63.wmoran@collaborativefusion.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061207114239.c6b72e63.wmoran@collaborativefusion.com> X-Operating-System: FreeBSD 6.1-RELEASE-p10 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.13 (2006-08-11) X-Hashcash: 1:20:061208:wmoran@collaborativefusion.com::XAWjt4JzbOS56Zl7:0000000 0000000000000000000000004R6K X-Hashcash: 1:20:061208:pgsql-performance@postgresql.org::8WaNjtM5ZppuugJF:00000 0000000000000000000000001fK1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/187 X-Sequence-Number: 22243 Remember that as you increase shared_buffers you might need to make the bgwriter more aggressive too. On Thu, Dec 07, 2006 at 11:42:39AM -0500, Bill Moran wrote: > > I'm gearing up to do some serious investigation into performance for > PostgreSQL with regard to our application. I have two issues that I've > questions about, and I'll address them in two seperate emails. > > This one regards tuning shared_buffers. > > I believe I have a good way to monitor database activity and tell when > a database grows large enough that it would benefit from more > shared_buffers: if I monitor the blks_read column of pg_stat_database, > it should increase very slowly if there is enough shared_buffer > space. When shared buffer space runs out, more disk read requests > will be required and this number will begin to climb. > > If anyone sees a flaw in this approach, I'd be interested to hear it. > > The other tuning issue with shared_buffers is how to tell if I'm > allocating too much. For example, if I allocate 1G of RAM to > shared buffers, and the entire database can fit in 100M, that 900M > might be better used as work_mem, or something else. > > I haven't been able to find anything regarding how much of the > shared buffer space PostgreSQL is actually using, as opposed to > simply allocating. > > -- > Bill Moran > Collaborative Fusion Inc. > > wmoran@collaborativefusion.com > Phone: 412-422-3463x4023 > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)