Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B5DB61337B2F for ; Sun, 21 Nov 2010 22:19:11 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 80648-04 for ; Mon, 22 Nov 2010 02:19:06 +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 5E86C1335B36 for ; Sun, 21 Nov 2010 22:19:03 -0400 (AST) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PKLzj-0005Zu-50 for pgsql-performance@postgresql.org; Mon, 22 Nov 2010 03:19:03 +0100 Received: from cpe-188-129-98-75.dynamic.amis.hr ([188.129.98.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Nov 2010 03:19:03 +0100 Received: from ivoras by cpe-188-129-98-75.dynamic.amis.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Nov 2010 03:19:03 +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 03:18:50 +0100 Lines: 20 Message-ID: References: <4CE9773D0200002500037CA6@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: cpe-188-129-98-75.dynamic.amis.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: <4CE9773D0200002500037CA6@gw.wicourts.gov> 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/344 X-Sequence-Number: 41368 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. I've been monitoring the server some more and it looks like there are periods where almost all servers are in the semwait state followed by periods of intensive work - approximately similar to the "thundering herd" problem, or maybe to what Josh Berkus has posted a few days ago.