Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1CB4D1337B6E for ; Thu, 6 Jan 2011 14:59:22 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 93330-10 for ; Thu, 6 Jan 2011 18:59:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148150.authsmtp.net (outmail148150.authsmtp.net [62.13.148.150]) by mail.postgresql.org (Postfix) with ESMTP id 098A01337B5E for ; Thu, 6 Jan 2011 14:59:13 -0400 (AST) Received: from mail-c193.authsmtp.com (mail-c193.authsmtp.com [62.13.128.118]) by punt7.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p06IxB36057857; Thu, 6 Jan 2011 18:59:11 GMT Received: from Sidney-Stratton.local (dsl081-245-111.sfo1.dsl.speakeasy.net [64.81.245.111]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p06Ix5ZT010664; Thu, 6 Jan 2011 18:59:06 GMT Message-ID: <4D2610F3.8070407@agliodbs.com> Date: Thu, 06 Jan 2011 10:58:59 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: Jeff Janes CC: pgsql-performance@postgresql.org Subject: Re: Wrong docs on wal_buffers? References: <4D24D7DE.6020507@agliodbs.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: 0985d37a-19c7-11e0-97bb-002264978518 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkGMA9GIUINWEQL c1ACcB1xOVtbHwkA AnYKU15RWVdxXi1z bxRZbBtfZk9QXgRr T0pMQFdNFEsoARp4 Tht0NhlzdwNAfDBz bUFkEHBSVEEudkEs X09dRmobZGY1aH0W VxIKagNUcgFMehZC YlV+XD1vNG8XDRoV JSEUBRUEdQpFLyJa Cg0KJklaRkBDATc4 cBofEzsiB1ZSLzXr X-Authentic-SMTP: 61633136333939.1014:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201101/26 X-Sequence-Number: 41813 > And the risks are rather asymmetric. I don't know of any problem from > too large a buffer until it starts crowding out shared_buffers, while > under-sizing leads to the rather drastic performance consequences of > AdvanceXLInsertBuffer having to wait on the WALWriteLock while holding > the WALInsertLock, Yes, performance testing has bourne that out. Increasing wal_buffers to between 1MB and 16MB has benfitted most test cases (DBT2, pgBench, user databases) substantially, while an increase has never been shown to be a penalty. Increases above 16MB didn't seem to help, which is unsurprising given the size of a WAL segment. > But I wonder if initdb.c, when selecting the default shared_buffers, > shouldn't test with wal_buffers = shared_buffers/64 or > shared_buffers/128, with a lower limit of 8 blocks, and set that as > the default. We talked about bumping it to 512kB or 1MB for 9.1. Did that get in? Do I need to write that patch? It would be nice to have it default to 16MB out of the gate, but there we're up against the Linux/FreeBSD SysV memory limits again. When are those OSes going to modernize? -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com