Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C68336347F7 for ; Wed, 10 Mar 2010 21:28:33 -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 51882-07 for ; Thu, 11 Mar 2010 01:28:22 +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 277AF63415E for ; Wed, 10 Mar 2010 21:28:23 -0400 (AST) Received: by qyk8 with SMTP id 8so6858650qyk.4 for ; Wed, 10 Mar 2010 17:28:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=d9e/UUw6ng3LIDXNPSNvC6cm2a4AhzHXF26lM11fppI=; b=S7yMPINsoVTeFemMXg+zn8u2bZ5NPLSxTiEgNZfYqXOnBraGe/7rf2WfpDMG+o5k1o ii5PhM52o75my4Aij1T9vMV2rmgBowA94dsJsyQQayrx7g1mXCZMp8UlwAI5oibP4Us9 gEzKTnv4+C6d49hvTjtssoeQGm/wx1ABBICqw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=qZz/wUL0S1lH+eybAh7fNrLlJT+K5EoqyVPaxuHEsDvQ3aivU75oB75J2A17u4nYo4 Q8Xi+HGBsjxlFZI1bHLWGMk4GDTvgKagHR0IBLXf3sFiA8OkAr+to1b36KtPWCe1Phm9 nfm05GDgROGPnxq9ISB0R85mb9jfNQBVhGSHs= MIME-Version: 1.0 Received: by 10.224.48.72 with SMTP id q8mr1767936qaf.2.1268270901315; Wed, 10 Mar 2010 17:28:21 -0800 (PST) Date: Thu, 11 Mar 2010 12:28:21 +1100 X-Google-Sender-Auth: 40d097b7fa5f3ffb Message-ID: Subject: shared_buffers advice From: Paul McGarry To: pgsql-performance@postgresql.org 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/153 X-Sequence-Number: 37978 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