Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D1487B5DC33 for ; Mon, 5 Sep 2011 08:17:02 -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 57124-03 for ; Mon, 5 Sep 2011 11:16:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vx0-f174.google.com (mail-vx0-f174.google.com [209.85.220.174]) by mail.postgresql.org (Postfix) with ESMTP id 4FB51B5DC08 for ; Mon, 5 Sep 2011 08:16:56 -0300 (ADT) Received: by vxi9 with SMTP id 9so3747283vxi.19 for ; Mon, 05 Sep 2011 04:16:56 -0700 (PDT) Received: by 10.52.76.170 with SMTP id l10mr3518013vdw.479.1315221413598; Mon, 05 Sep 2011 04:16:53 -0700 (PDT) Received: from [10.1.1.8] (124-169-102-162.dyn.iinet.net.au [124.169.102.162]) by mx.google.com with ESMTPS id u7sm5097496vds.5.2011.09.05.04.16.51 (version=SSLv3 cipher=OTHER); Mon, 05 Sep 2011 04:16:53 -0700 (PDT) Message-ID: <4E64AF9D.3060601@ringerc.id.au> Date: Mon, 05 Sep 2011 19:16:45 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 MIME-Version: 1.0 To: Richard Shaw CC: pgsql-performance@postgresql.org Subject: Re: Rather large LA References: <4E64A94E.7000803@ringerc.id.au> <0894B018-542F-45B6-9A2E-A84DEA99AE0A@aggress.net> In-Reply-To: <0894B018-542F-45B6-9A2E-A84DEA99AE0A@aggress.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 201109/33 X-Sequence-Number: 44809 On 5/09/2011 6:55 PM, Richard Shaw wrote: > Hi Craig, > > Apologies, I should have made that clearer, I am using PgBouncer 1.4.1 in front of Postgres and included the config at the bottom of my original mail > Ah, I see. The point still stands: your hardware can *not* efficiently do work for 1000 concurrent backend workers. Reduce the maximum number of workers by setting a lower cap on the pool size and a lower max_connections. This won't work (you'll run out of pooler connections) unless you also set PgBouncer to transaction pooling mode instead of the default session pooling mode, which you're currently using. It is *important* to read the documentation on this before doing it, as there are implications for apps that use extra-transactional features like HOLD cursors and advisory locks. See: http://pgbouncer.projects.postgresql.org/doc/usage.html It may also be necessary to set PgBouncer to block (wait) rather than report an error when there is no pooled connection available to start a new transaction on. I'm not sure what PgBouncer's default behavior for that is and didn't see anything immediately clear in the pgbouncer(5) ini file man page. -- Craig Ringer