Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1F5C2633AE8 for ; Thu, 12 Mar 2009 14:10:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 80084-06 for ; Thu, 12 Mar 2009 14:10:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og111.obsmtp.com (exprod7og111.obsmtp.com [64.18.2.175]) by mail.postgresql.org (Postfix) with SMTP id F34A8633277 for ; Thu, 12 Mar 2009 14:09:54 -0300 (ADT) Received: from source ([209.85.220.176]) by exprod7ob111.postini.com ([64.18.6.12]) with SMTP ID DSNKSblB4WpB5v0DYN0hgt5+GANU53CwNrLI@postini.com; Thu, 12 Mar 2009 10:09:55 PDT Received: by fxm24 with SMTP id 24so1784868fxm.20 for ; Thu, 12 Mar 2009 10:09:52 -0700 (PDT) Received: by 10.216.29.196 with SMTP id i46mr129149wea.113.1236877792299; Thu, 12 Mar 2009 10:09:52 -0700 (PDT) Received: from oxford.xeocode.com.enterprisedb.com ([82.16.16.210]) by mx.google.com with ESMTPS id 7sm1528437nfv.65.2009.03.12.10.09.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 12 Mar 2009 10:09:51 -0700 (PDT) To: Grzegorz =?utf-8?Q?Ja=C5=9Bkiewicz?= Cc: Kevin Grittner , "pgsql-performance\@postgresql.org" , Scott Carey , "Jignesh K. Shah" Subject: Re: Proposal of tunable fix for scalability of 8.4 In-Reply-To: <2f4958ff0903120831q4ca3d0a8o8f2571f16b316ecf@mail.gmail.com> ("Grzegorz =?utf-8?Q?Ja=C5=9Bkiewicz=22's?= message of "Thu\, 12 Mar 2009 15\:31\:28 +0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+imap.gmail.com:PG" 112822) References: <49B7F470.EE98.0025.0@wicourts.gov> <49B8E044.EE98.0025.0@wicourts.gov> <2f4958ff0903120831q4ca3d0a8o8f2571f16b316ecf@mail.gmail.com> From: Gregory Stark Organization: EnterpriseDB Date: Thu, 12 Mar 2009 17:09:49 +0000 Message-ID: <87k56u652a.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200903/127 X-Sequence-Number: 33049 Grzegorz Ja=C5=9Bkiewicz writes: > So please, don't say that this doesn't make sense because he tested it > against ram disc. That was precisely the point of exercise. What people are tip-toeing around saying, which I'll just say right out in = the most provocative way, is that Jignesh has simply *misconfigured* the system. He's contrived to artificially create a lot of unnecessary contention. Optimizing the system to reduce the cost of that artificial contention at t= he expense of a properly configured system would be a bad idea. It's misconfigured because there are more runnable threads than there are cpus. A lot more. 15 times as many as necessary. If users couldn't run connection poolers on their own the right approach for us to address this contention would be to build one into Postgres, not to re-engineer the internals around the misuse. Ram-resident use cases are entirely valid and worth testing, but in those u= se cases you would want to have about as many processes as you have processes. The use case where having larger number of connections than processors makes sense is when they're blocked on disk i/o (or network i/o or whatever else other than cpu). And having it be configurable doesn't mean that it has no cost. Having a te= st of a user-settable dynamic variable in the middle of a low-level routine co= uld very well have some cost. Just the extra code would have some cost in reduc= ed cache efficiency. It could be that loop prediction and so on save us but th= at remains to be proven. And as always the question would be whether the code designed for this misconfigured setup is worth the maintenance effort if it's not helping properly configured setups. Consider for example any work with dtrace to optimize locks under properly configured setups would lead us to make chang= es which would have to be tested twice, once with and once without this option. What do we do if dtrace says some unrelated change helps systems with this option disabled but hurts systems with it enabled? --=20 Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services!