Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D870A6501F8 for ; Wed, 26 Nov 2008 18:57:55 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84379-09 for ; Wed, 26 Nov 2008 18:57:53 -0400 (AST) X-Greylist: delayed 00:10:38.140399 by SQLgrey-1.7.6 Received: from net-domino.com (net-domino.com [74.208.97.86]) by mail.postgresql.org (Postfix) with ESMTP id 12B396501DC for ; Wed, 26 Nov 2008 18:57:52 -0400 (AST) Received: from [127.0.0.1] (u15278506.onlinehome-server.com [74.208.97.86]) by net-domino.com (8.14.1/8.14.1) with ESMTP id mAQMl5BK001174; Wed, 26 Nov 2008 18:47:06 -0400 Message-ID: <492DD1EA.8000504@mochima.com> Date: Wed, 26 Nov 2008 17:47:06 -0500 From: Carlos Moreno User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: Ryan Hansen CC: pgsql-performance@postgresql.org Subject: Re: Memory Allocation References: <011101c95013$b6fca0a0$24f5e1e0$@hansen@brightbuilders.com> In-Reply-To: <011101c95013$b6fca0a0$24f5e1e0$@hansen@brightbuilders.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Added-Header: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/274 X-Sequence-Number: 32005 Ryan Hansen wrote: > > Hey all, > > This may be more of a Linux question than a PG question, but I’m > wondering if any of you have successfully allocated more than 8 GB of > memory to PG before. > > I have a fairly robust server running Ubuntu Hardy Heron, 24 GB of > memory, and I’ve tried to commit half the memory to PG’s shared > buffer, but it seems to fail. > Though not sure why this is happening or whether it is normal, I would suggest that such setting is maybe too high. From the Annotated postgresql.conf document at http://www.powerpostgresql.com/Downloads/annotated_conf_80.html, the suggested range is 8 to 400MB. They specifically say that it should never be set to more than 1/3 of the available memory, which in your case is precisely the 8GB figure (I guess that's just a coincidence --- I doubt that the server would be written so that it fails to start if shared_buffers is more than 1/3 of available RAM) Another important parameter that you don't mention is the effective_cache_size, which that same document suggests should be about 2/3 of available memory. (this tells the planner the amount of data that it can "probabilistically" expect to reside in memory due to caching, and as such, the planner is likely to produce more accurate estimates and thus better query optimizations). Maybe you could set shared_buffers to, say, 1 or 2GB (that's already beyond the recommended figure, but given that you have 24GB, it may not hurt), and then effective_cache_size to 16GB or so? HTH, Carlos --