Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 2D2EF9FB764 for ; Thu, 19 Jul 2007 14:25:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 97419-01 for ; Thu, 19 Jul 2007 14:25:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id AC3CE9FB4F3 for ; Thu, 19 Jul 2007 14:25:43 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l6JHPcRi012687; Thu, 19 Jul 2007 13:25:38 -0400 (EDT) To: Josh Berkus cc: Alvaro Herrera , pgsql-performance@postgresql.org Subject: Re: User concurrency thresholding: where do I look? In-reply-to: <200707190922.24497.josh@agliodbs.com> References: <200707190828.59088.josh@agliodbs.com> <20070719154912.GG6538@alvh.no-ip.org> <200707190922.24497.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Thu, 19 Jul 2007 09:22:24 -0700" Date: Thu, 19 Jul 2007 13:25:38 -0400 Message-ID: <12686.1184865938@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/245 X-Sequence-Number: 25929 Josh Berkus writes: > Alvaro, >> Have you messed with max_connections and/or max_locks_per_transaction >> while testing this? The lock table is sized to max_locks_per_xact times >> max_connections, and shared memory hash tables get slower when they are >> full. Of course, the saturation point would depend on the avg number of >> locks acquired per user, which would explain why you are seeing a lower >> number for some users and higher for others (simpler/more complex >> queries). > That's an interesting thought. Let me check lock counts and see if this is > possibly the case. AFAIK you'd get hard failures, not slowdowns, if you ran out of lock space entirely; and the fact that you can continue the curve upwards says that you're not on the edge of running out. However I agree that it's worth experimenting with those two parameters to see if the curve moves around at all. Another resource that might be interesting is the number of open files. Also, have you tried watching vmstat or local equivalent to confirm that the machine's not starting to swap? regards, tom lane