Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 650A4633F22 for ; Wed, 10 Mar 2010 22:22:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 61940-06 for ; Thu, 11 Mar 2010 02:22:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.221.178]) by mail.postgresql.org (Postfix) with ESMTP id EA70D6326F0 for ; Wed, 10 Mar 2010 22:22:12 -0400 (AST) Received: by qyk8 with SMTP id 8so6900714qyk.4 for ; Wed, 10 Mar 2010 18:22:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=fCZ+04MPpXOBRV9q0/hdr2Gxb5SD19J8SQ0/eTTVYfA=; b=QaMfFvgIhbwIkXcY2BmDV5d8m4mCKusaz3TyHom9K9ObC1lRRj8vgXVJffEcnhQT5n J3Cmaqa/jKsYdT6CAO24Ebcx+fmA0uVBXYOcdcBpv5/xUPeY+uIXLwxSWJ4wRezrUQTg z4kKw6hcI8Ys78VxbYYy3rYabMDfeToaqIggs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=UiYYfWM4qHhpNfPxI9Vf9eISpwcuV4yti9UkQFj4Yc4AfI1kjWWBOCyfM+GPWpBmzN F6RdG0Q89Is3EtLmdoontoQFcHUjb8T+RpP3RgOnNfWjYvZVGEnkAU44CeZvy3PaPV47 hmL/XpH/QGp9hsxS2aXjlEGVQSTMt5YByMe4g= MIME-Version: 1.0 Received: by 10.224.44.233 with SMTP id b41mr1726758qaf.278.1268274130796; Wed, 10 Mar 2010 18:22:10 -0800 (PST) Date: Thu, 11 Mar 2010 13:22:10 +1100 Message-ID: Subject: shared_buffers advice From: Paul McGarry To: Postgresql Performance list Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/120 X-Sequence-Number: 37945 Hi there, I'm after a little bit of advice on the shared_buffers setting (I have read the various docs on/linked from the performance tuning wiki page, some very helpful stuff there so thanks to those people). I am setting up a 64bit Linux server running Postgresql 8.3, the server has 64gigs of memory and Postgres is the only major application running on it. (This server is to go alongside some existing 8.3 servers, we will look at 8.4/9 migration later) I'm basically wondering how the postgresql cache (ie shared_buffers) and the OS page_cache interact. The general advice seems to be to assign 1/4 of RAM to shared buffers. I don't have a good knowledge of the internals but I'm wondering if this will effectively mean that roughly the same amount of RAM being used for the OS page cache will be used for redundantly caching something the Postgres is caching as well? IE when Postgres reads something from disk it will go into both the OS page cache and the Postgresql shared_buffers and the OS page cache copy is unlikely to be useful for anything. If that is the case what are the downsides to having less overlap between the caches, IE heavily favouring one or the other, such as allocating shared_buffers to a much larger percentage (such as 90-95% of expected 'free' memory). Paul (Apologies if two copies of this email arrive, I sent the first from an email address that wasn't directly subscribed to the list so it was blocked).