Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 55330133655C for ; Thu, 25 Nov 2010 08:39:53 -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 19987-09 for ; Thu, 25 Nov 2010 12:39:47 +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 62700133616B for ; Thu, 25 Nov 2010 08:39:45 -0400 (AST) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PLb73-00025A-H9 for pgsql-performance@postgresql.org; Thu, 25 Nov 2010 13:39:45 +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 ; Thu, 25 Nov 2010 13:39:45 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Nov 2010 13:39:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Ivan Voras Subject: Re: Performance under contention Date: Thu, 25 Nov 2010 13:39:42 +0100 Lines: 31 Message-ID: References: <4CEA56600200002500037D03@gw.wicourts.gov> <4CEA58430200002500037D06@gw.wicourts.gov> <4CEA58430200002500037D06@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: <4CEA58430200002500037D06@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/374 X-Sequence-Number: 41398 On 11/22/10 18:47, Kevin Grittner wrote: > Ivan Voras wrote: > >> It looks like a hack > > Not to everyone. In the referenced section, Hellerstein, > Stonebraker and Hamilton say: > > "any good multi-user system has an admission control policy" > > In the case of PostgreSQL I understand the counter-argument, > although I'm inclined to think that it's prudent for a product to > limit resource usage to a level at which it can still function well, > even if there's an external solution which can also work, should > people use it correctly. It seems likely that a mature admission > control policy could do a better job of managing some resources than > an external product could. I didn't think it would be that useful but yesterday I did some (unrelated) testing with MySQL and it looks like its configuration parameter "thread_concurrency" does something to that effect. Initially I thought it is equivalent to PostgreSQL's max_connections but no, connections can grow (MySQL spawns a thread per connection by default) but the actual concurrency is limited in some way by this parameter. The comment for the parameter says "# Try number of CPU's*2 for thread_concurrency" but obviously it would depend a lot on the real-world load.