Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 8D2626322B9 for ; Fri, 30 Jul 2010 14:50:08 -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 52893-08 for ; Fri, 30 Jul 2010 17:50:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f174.google.com (mail-px0-f174.google.com [209.85.212.174]) by mail.postgresql.org (Postfix) with ESMTP id 604876322A5 for ; Fri, 30 Jul 2010 14:50:01 -0300 (ADT) Received: by pxi14 with SMTP id 14so632557pxi.19 for ; Fri, 30 Jul 2010 10:50:00 -0700 (PDT) Received: by 10.142.185.13 with SMTP id i13mr2057575wff.57.1280512199764; Fri, 30 Jul 2010 10:49:59 -0700 (PDT) Received: from Craig-Jamess-MacBook-Pro.local (wsip-70-167-124-126.sd.sd.cox.net [70.167.124.126]) by mx.google.com with ESMTPS id h41sm2844432qcz.25.2010.07.30.10.49.58 (version=SSLv3 cipher=RC4-MD5); Fri, 30 Jul 2010 10:49:59 -0700 (PDT) Message-ID: <4C5310C4.1040906@emolecules.com> Date: Fri, 30 Jul 2010 10:49:56 -0700 From: Craig James User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-admin@postgresql.org Subject: Re: Connection pooling for a mixture of lightweight and heavyweight jobs? References: <4C50ABA5.5010408@emolecules.com> <4C52B0240200002500033F10@gw.wicourts.gov> <4C530758.7050804@emolecules.com> <4C52C7790200002500033F1C@gw.wicourts.gov> In-Reply-To: <4C52C7790200002500033F1C@gw.wicourts.gov> 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, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/224 X-Sequence-Number: 35243 On 7/30/10 10:37 AM, Kevin Grittner wrote: > Craig James wrote: > >>> Well, the "if it ain't broke, don't fix it" rule might come into >>> play here. >> >> I should have given one more detail here: We've been the victim >> of persistent "CPU spikes" that were discussed extensively in >> postgres-performance. Tom suggested upgrading to 8.4.4, but that >> can't happen for a couple more months (we're working on it). >> >> > http://archives.postgresql.org/pgsql-performance/2010-04/msg00071.php > > Ah, I hadn't connected that thread with this. After rereading that > thread with the information from this thread in mind, I think what > you describe on the other thread could well be the "thundering herd" > problem. Some form of connection pooling could well help. > > BTW, I hope you've updated to the latest 8.3.x by now. If not, you > should expedite that. Yes, I updated to 8.3.10, partly to see if it would solve this problem. I'm not clear on how connection pooling would help this problem. I would have 100 lightweight backends, whether they were pooled or not, always sitting around. Or are you suggesting that I not use Apache::DBI to maintain persistent connections, and instead rely on the connection pooler to provide fast connect/disconnect from Postgres? Thanks, Craig