Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D45C19F9FDA for ; Thu, 7 Dec 2006 12:42:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 01610-04 for ; Thu, 7 Dec 2006 12:42:41 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by postgresql.org (Postfix) with ESMTP id 8940C9F9C35 for ; Thu, 7 Dec 2006 12:42:40 -0400 (AST) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Thu, 07 Dec 2006 11:42:39 -0500 id 00056424.4578447F.00010845 Date: Thu, 7 Dec 2006 11:42:39 -0500 From: Bill Moran To: pgsql-performance@postgresql.org Subject: How to determine if my setting for shared_buffers is too high? Message-Id: <20061207114239.c6b72e63.wmoran@collaborativefusion.com> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.10.6; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/179 X-Sequence-Number: 22235 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