Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 46B4A65AC0F for ; Tue, 16 Mar 2010 04:28:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 33949-05 for ; Tue, 16 Mar 2010 07:28:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mail.postgresql.org (Postfix) with ESMTP id 7D9BF65AC0D for ; Tue, 16 Mar 2010 04:28:08 -0300 (ADT) Received: from [192.168.0.105] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MEKbo-1Ntaw80LzU-00FzPZ; Tue, 16 Mar 2010 08:28:05 +0100 Message-ID: <4B9F3302.4020900@2ndquadrant.com> Date: Tue, 16 Mar 2010 03:28:02 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Dave Crooke CC: Paul McGarry , pgsql-performance@postgresql.org Subject: Re: shared_buffers advice References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/dcI+Goycc++80XjoFFaFl6O8VTK1obGR4Uyj JzHUeXh38lpmUHAGP7YTEszVfp5V5cH8nUjxRQy86uyyYgMj+u hw7rqFTb8iEyX+VGoJmL5rhohXuaiBd X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.377 tagged_above=-10 required=5 tests=AWL=0.222, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/162 X-Sequence-Number: 37987 Dave Crooke wrote: > There seems to be a wide range of opinion on this .... I am new to PG > and grew up on Oracle, where more SGA is always a good thing ... I > know people who run Oracle on 2TB Superdome's with titanic SGA sizes > to keep the whole DB in RAM. I'd be using a 40GB+ Oracle SGA on that > box of yours. I wouldn't call it opinion so much as a series of anecdotes all suggesting the same thing: that you cannot translate SGA practice into PostgreSQL and expect that to work the same way. Some data points: -An academic study at Duke suggested 40% of RAM was optimal for their mixed workload, but that was a fairly small amount of RAM. http://www.cs.duke.edu/~shivnath/papers/ituned.pdf -Tests done by Jignesh Shah at Sun not too long ago put diminishing returns on a system with a bunch of RAM at 10GB, probably due to buffer lock contention issues (details beyond that number not in the slides, recalling from memory of the talk itself): http://blogs.sun.com/jkshah/entry/postgresql_east_2008_talk_best -My warnings about downsides related to checkpoint issues with larger buffer pools isn't an opinion at all; that's a fact based on limitations in how Postgres does its checkpoints. If we get something more like Oracle's incremental checkpoint logic, this particular concern might go away. -Concerns about swapping, work_mem, etc. are all very real. All of us who have had the database server process killed by the Linux OOM killer at least once know that's one OS you absolutely cannot push this too hard on. This is not unique to here, that issue exists in Oracle+SGA land as well: http://lkml.indiana.edu/hypermail/linux/kernel/0103.3/0906.html -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us