Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 57EDD1337990 for ; Mon, 22 Nov 2010 11:38:43 -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 48355-06 for ; Mon, 22 Nov 2010 15:38:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 044331336FA7 for ; Mon, 22 Nov 2010 11:38:35 -0400 (AST) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PKYTS-0007Su-8i for pgsql-performance@postgresql.org; Mon, 22 Nov 2010 16:38:34 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Nov 2010 16:38:34 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Nov 2010 16:38:34 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Ivan Voras Subject: Re: Performance under contention Date: Mon, 22 Nov 2010 16:38:28 +0100 Lines: 25 Message-ID: References: <4CE9773D0200002500037CA6@gw.wicourts.gov> <4CEA373D0200002500037CED@gw.wicourts.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 In-Reply-To: <4CEA373D0200002500037CED@gw.wicourts.gov> X-Enigmail-Version: 1.1.2 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/357 X-Sequence-Number: 41381 On 11/22/10 16:26, Kevin Grittner wrote: > Ivan Voras wrote: >> On 11/22/10 02:47, Kevin Grittner wrote: >>> Ivan Voras wrote: >>> >>>> After 16 clients (which is still good since there are only 12 >>>> "real" cores in the system), the performance drops sharply >>> >>> Yet another data point to confirm the importance of connection >>> pooling. :-) >> >> I agree, connection pooling will get rid of the symptom. But not >> the underlying problem. I'm not saying that having 1000s of >> connections to the database is a particularly good design, only >> that there shouldn't be a sharp decline in performance when it >> does happen. Ideally, the performance should remain the same as it >> was at its peek. > > Well, I suggested that we add an admission control[1] mechanism, It looks like a hack (and one which is already implemented by connection pool software); the underlying problem should be addressed. But on the other hand if it's affecting so many people, maybe a warning comment in postgresql.conf around max_connections would be helpful.