Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 50D89632270 for ; Sat, 14 Mar 2009 01:29:46 -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 88272-07 for ; Sat, 14 Mar 2009 01:29:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from bifrost.lang.hm (mail.lang.hm [64.81.33.126]) by mail.postgresql.org (Postfix) with ESMTP id 75D80632257 for ; Sat, 14 Mar 2009 01:29:30 -0300 (ADT) Received: from asgard.lang.hm (asgard.lang.hm [10.0.0.100]) by bifrost.lang.hm (8.13.4/8.13.4/Debian-3) with ESMTP id n2E4TO7L025948; Fri, 13 Mar 2009 20:29:24 -0800 Date: Fri, 13 Mar 2009 21:29:24 -0700 (PDT) From: david@lang.hm X-X-Sender: dlang@asgard To: Kevin Grittner cc: Robert Haas , Tom Lane , Greg Smith , "pgsql-performance@postgresql.org" , Scott Carey , "Jignesh K. Shah" Subject: Re: Proposal of tunable fix for scalability of 8.4 In-Reply-To: <49BA5960.EE98.0025.0@wicourts.gov> Message-ID: References: <603c8f070903121829r31cf1472ha9876e5c480a542e@mail.gmail.com><603c8f070903121829r31cf1472ha9876e5c480a542e@mail.gmail.com> <12292.1236964604@sss.pgh.pa.us> <49BA5960.EE98.0025.0@wicourts.gov> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/185 X-Sequence-Number: 33107 On Fri, 13 Mar 2009, Kevin Grittner wrote: > Tom Lane wrote: >> Robert Haas writes: >>> I think that changing the locking behavior is attacking the problem >>> at the wrong level anyway. >> >> Right. By the time a patch here could have any effect, you've >> already lost the game --- having to deschedule and reschedule a >> process is a large cost compared to the typical lock hold time for >> most LWLocks. So it would be better to look at how to avoid >> blocking in the first place. > > That's what motivated my request for a profile of the "80 clients with > zero wait" case. If all data access is in RAM, why can't 80 processes > keep 64 threads (on 8 processors) busy? Does anybody else think > that's an interesting question, or am I off in left field here? I don't think that anyone is arguing that it's not intersting, but I also think that complete dismissal of the existing test case is also wrong. last night Tom documented some reasons why the prior test may have some issues, but even with those I think the test shows that there is room for improvement on the locking. making sure that the locking change doesn't cause problems for other workload is a _very_ valid concern, but it's grounds for more testing, not dismissal. I think that the suggestion to wake up the first N waiters instead of all of them is a good optimization (and waking N - # active back-ends would be even better if there is an easy way to know that number) but I think that it's worth making the result testable by more people so that we can see if what workloads are pathalogical for this change (if any) David Lang