Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B2438B5DBEE for ; Thu, 4 Aug 2011 17:38:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 89065-02 for ; Thu, 4 Aug 2011 20:38:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 6C052B5DBE0 for ; Thu, 4 Aug 2011 17:38:39 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 04 Aug 2011 15:38:39 -0500 Message-Id: <4E3ABCFB020000250003FAF4@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 04 Aug 2011 15:38:35 -0500 From: "Kevin Grittner" To: , "Claire Chang" Subject: Re: Postgres 8.4 memory related parameters References: <1312489633.71838.YahooMailClassic@web31912.mail.mud.yahoo.com> In-Reply-To: <1312489633.71838.YahooMailClassic@web31912.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.616 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.716 X-Spam-Level: X-Archive-Number: 201108/64 X-Sequence-Number: 44511 Claire Chang wrote: > hi, We recently bought a 4 8core 128G memory database server and I > am setting it up to replace our old 4 4cores 128G memory database > server as a master. The memory related settings that we use on > the old machine seem a bit wrong according to the experts on IRC: > max_connections = 600 You're probably going to get better performance by setting that to 2 to 3 times the number of actual cores (don't county hyperthreading for this purpose), and using a connection pooler to funnel the 600 user connections down to a smaller number of database connections. > shared_buffers = 32GB I seem to remember seeing some benchmarks showing that performance falls off after 10GB or 20GB on that setting. > effective_cache_size = 64GB Seems sane. > work_mem = 5MB You could bump that up, especially if you go to the connection pool. > maintenance_work_mem = 1GB OK, but I might double that. > wal_buffers = 64kB This should definitely be set to 16MB. -Kevin