Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 01E87633F85 for ; Thu, 12 Mar 2009 16:26:40 -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 14761-03 for ; Thu, 12 Mar 2009 16:26:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36]) by mail.postgresql.org (Postfix) with ESMTP id D2DD4632C8D for ; Thu, 12 Mar 2009 16:26:04 -0300 (ADT) Received: from fe-amer-10.sun.com ([192.18.109.80]) by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n2CJQ33t003206 for ; Thu, 12 Mar 2009 19:26:03 GMT MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_5lhTqzQOv9cO0kD5jdRsjw)" 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 <0KGE00900OFBY400@mail-amer.sun.com> for pgsql-performance@postgresql.org; Thu, 12 Mar 2009 13:26:03 -0600 (MDT) Received: from [129.148.169.151] ([unknown] [129.148.169.151]) by mail-amer.sun.com (Sun Java(tm) System Messaging Server 7.0-5.01 64bit (built Feb 19 2009)) with ESMTPSA id <0KGE00JKPRB2GKE0@mail-amer.sun.com>; Thu, 12 Mar 2009 13:25:51 -0600 (MDT) Date: Thu, 12 Mar 2009 15:22:09 -0400 From: "Jignesh K. Shah" Subject: Re: Proposal of tunable fix for scalability of 8.4 In-reply-to: <20090312191020.GB29971@alvh.no-ip.org> To: Alvaro Herrera Cc: Tom Lane , Scott Carey , Kevin Grittner , "pgsql-performance@postgresql.org" Message-id: <49B960E1.6070101@sun.com> Organization: Sun Microsystems References: <12916.1236882481@sss.pgh.pa.us> <20090312191020.GB29971@alvh.no-ip.org> User-Agent: Thunderbird 2.0.0.17 (X11/20081023) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200903/140 X-Sequence-Number: 33062 This is a multi-part message in MIME format. --Boundary_(ID_5lhTqzQOv9cO0kD5jdRsjw) Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7BIT On 03/12/09 15:10, Alvaro Herrera wrote: > Tom Lane wrote: > >> Scott Carey writes: >> >>> They are not meaningless. It is certainly more to understand, but the test is entirely valid without that. In a CPU bound / RAM bound case, as concurrency increases you look for the throughput trend, the %CPU use trend and the context switch rate trend. More information would be useful but the test is validated by the evidence that it is held up by lock contention. >>> >> Er ... *what* evidence? There might be evidence somewhere that proves >> that, but Jignesh hasn't shown it. The available data suggests that the >> first-order performance limiter in this test is something else. >> Otherwise it should be possible to max out the performance with a lot >> less than 1000 active backends. >> > > With 200ms of think times as Jignesh just said, 1000 users does not > equate 1000 active backends. (It's probably closer to 100 backends, > given an avg. response time of ~20ms) > > Something that might be useful for him to report is the avg number of > active backends for each data point ... > short of doing select * from pg_stat_activity and removing the IDLE entries, any other clean way to get that information. If there is no other latency then active backends should be active users * 10ms/200ms or activeusers/20 on average. However the number is still lower than that since active user can still be waiting for locks which can be either on CPU (spin) or sleeping (proven by increase in average response time of execution which includes the wait). Also till date I am primarily more interested in active backends which are waiting for acquiring the locks since I find making that more efficient gives me the biggest return on my buck.. Lower response time and higher throughput. -Jignesh --Boundary_(ID_5lhTqzQOv9cO0kD5jdRsjw) Content-type: text/html; charset=us-ascii Content-transfer-encoding: 7BIT

On 03/12/09 15:10, Alvaro Herrera wrote:
Tom Lane wrote:
  
Scott Carey <scott@richrelevance.com> writes:
    
They are not meaningless.  It is certainly more to understand, but the test is entirely valid without that.  In a CPU bound / RAM bound case, as concurrency increases you look for the throughput trend, the %CPU use trend and the context switch rate trend.  More information would be useful but the test is validated by the evidence that it is held up by lock contention.
      
Er ... *what* evidence?  There might be evidence somewhere that proves
that, but Jignesh hasn't shown it.  The available data suggests that the
first-order performance limiter in this test is something else.
Otherwise it should be possible to max out the performance with a lot
less than 1000 active backends.
    

With 200ms of think times as Jignesh just said, 1000 users does not
equate 1000 active backends.  (It's probably closer to 100 backends,
given an avg. response time of ~20ms)

Something that might be useful for him to report is the avg number of
active backends for each data point ...
  
short of doing select * from pg_stat_activity and removing the IDLE entries, any other clean way to get that information.  If there is no other latency then active backends  should be active users * 10ms/200ms or activeusers/20   on average. However the number is still lower than that since active user can still be waiting for locks which can be either on CPU (spin) or sleeping (proven by increase in average response time of execution which includes the wait).
 
Also till date I am primarily more interested in active backends which are waiting for acquiring the locks since I find  making that more efficient gives me the biggest return on my buck.. Lower response time and higher throughput.

-Jignesh

--Boundary_(ID_5lhTqzQOv9cO0kD5jdRsjw)--