Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 566BB6322EB for ; Fri, 13 Mar 2009 15:48:43 -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 56244-03 for ; Fri, 13 Mar 2009 15:48:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from brmea-mail-2.sun.com (brmea-mail-2.Sun.COM [192.18.98.43]) by mail.postgresql.org (Postfix) with ESMTP id 7EC116321F0 for ; Fri, 13 Mar 2009 15:48:36 -0300 (ADT) Received: from fe-amer-09.sun.com ([192.18.109.79]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n2DImZR1001997 for ; Fri, 13 Mar 2009 18:48:35 GMT MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; format=flowed; charset=windows-1252 Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java(tm) System Messaging Server 7.0-5.01 64bit (built Feb 19 2009)) id <0KGG00E00IAG0E00@mail-amer.sun.com> for pgsql-performance@postgresql.org; Fri, 13 Mar 2009 12:48:35 -0600 (MDT) Received: from Macintosh-8.local ([unknown] [129.150.33.46]) by mail-amer.sun.com (Sun Java(tm) System Messaging Server 7.0-5.01 64bit (built Feb 19 2009)) with ESMTPSA id <0KGG00LJWK8YYK80@mail-amer.sun.com>; Fri, 13 Mar 2009 12:48:35 -0600 (MDT) Date: Fri, 13 Mar 2009 14:48:33 -0400 From: "Jignesh K. Shah" Subject: Re: Proposal of tunable fix for scalability of 8.4 In-reply-to: To: Scott Carey Cc: "pgsql-performance@postgresql.org" Message-id: <49BAAA81.2080408@sun.com> References: User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200903/174 X-Sequence-Number: 33096 Somebody else asked a question: This is actually a two socket machine (128) threads but one socket is disabled by the OS so only 64-threads are available... The idea being let me choke one socket first with 100% CPU .. > Forgot some data: with the second test above, CPU: 48% user, 18% sys, > 35% idle. CPU increased from 46% used in the first test to 65% used, > the corresponding throughput increase was not as large, but that is > expected on an 8-threads per core server since memory bandwidth and > cache resources at a minimum are shared and only trivial tasks can > scale 100%. > > Based on the above, I would guess that attaining closer to 100% > utilization (its hard to get past 90% with that many cores no matter > what), will probablyl give another 10 to 15% improvement at most, to > maybe 180000/min throughput. > > Its also rather interesting that the 2000 connection case with wait > times gets 170000/min throughput and beats the 328 users with 0 delay > result above. I suspect the ‘wake all’ version is just faster. I would > love to see a ‘wake all shared, leave exclusives at front of queue’ > version, since that would not allow lock starvation. Considering that there is one link list it is just easier to wake the sequential selected few or wake them all up.. If I go through the list trying to wake all the shared ones then I essentially need to have another link list to collect all the exclusives ... I will retry the thundering herd of waking all waiters irrespective of shared, exclusive and see how that behaves.. I think the biggest benefit is when the process is waked up and the process in reality is already on the cpu checking the field to see whether last guy who released the lock is allowing him to wake up or not. Still I will try some more experiments.. Definitely reducing time in "Waiting" lock waits benefits and making "Acquired" times more efficient results in more tpm per user. I will try another run with plain wake up all and see with the same parameters (0 think time) that test behaves.. -Jignesh -- Jignesh Shah http://blogs.sun.com/jkshah The New Sun Microsystems,Inc http://sun.com/postgresql