Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 8AE4AB5DBDC for ; Fri, 12 Aug 2011 15:41:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 67589-07 for ; Fri, 12 Aug 2011 18:41:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 08230B5DBD0 for ; Fri, 12 Aug 2011 15:41:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p7CIf1Mh001941; Fri, 12 Aug 2011 14:41:02 -0400 (EDT) To: Waldo Nell cc: pgsql-performance@postgresql.org Subject: Re: Recommended optimisations slows down PostgreSQL 8.4 In-reply-to: References: Comments: In-reply-to Waldo Nell message dated "Thu, 11 Aug 2011 16:35:34 -0700" Date: Fri, 12 Aug 2011 14:41:01 -0400 Message-ID: <1940.1313174461@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.711 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.811 X-Spam-Level: X-Archive-Number: 201108/152 X-Sequence-Number: 44599 Waldo Nell writes: > I have PostgreSQL 8.4.8 on Ubuntu Linux x64. Server is a Core i7 950 > with 6GB of RAM. 2GB of RAM us used by Java, some small amount by the > kernel / services and the rest is available to PostgreSQL. [ and the DB is 74GB, and things get slower when raising shared_buffers from 24MB to 1500MB ] One other point here is that with the DB so much larger than available RAM, you are almost certainly doing lots of I/O (unless your test case has lots of locality of reference). With small shared_buffers, the space for kernel disk cache amounts to 3 or so GB, and that's your primary buffer against duplicate I/Os. When you crank shared_buffers up to half that, you now have two buffer pools of about the same size independently trying to cache the most-used parts of the DB. This is likely to not work too well and result in much more I/O. You save some shared-buffers-to-kernel-buffers transfers with more shared_buffers, but if the amount of disk I/O goes up a lot in consequence, you'll come out way behind. regards, tom lane