Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id CDF1C9FBB5A for ; Thu, 19 Jul 2007 14:45:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 35993-04 for ; Thu, 19 Jul 2007 14:45:18 -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 7BF1E9FB55F for ; Thu, 19 Jul 2007 14:45:19 -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 l6JHjFj5014010; Thu, 19 Jul 2007 13:45:15 -0400 (EDT) To: Alvaro Herrera cc: Josh Berkus , pgsql-performance@postgresql.org Subject: Re: User concurrency thresholding: where do I look? In-reply-to: <20070719173704.GA12084@alvh.no-ip.org> References: <200707190828.59088.josh@agliodbs.com> <20070719154912.GG6538@alvh.no-ip.org> <200707190922.24497.josh@agliodbs.com> <12686.1184865938@sss.pgh.pa.us> <20070719173704.GA12084@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Thu, 19 Jul 2007 13:37:04 -0400" Date: Thu, 19 Jul 2007 13:45:15 -0400 Message-ID: <14009.1184867115@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/248 X-Sequence-Number: 25932 Alvaro Herrera writes: > Tom Lane wrote: >> AFAIK you'd get hard failures, not slowdowns, if you ran out of lock >> space entirely; > Well, if there still is shared memory available, the lock hash can > continue to grow, but it would slow down according to this comment in > ShmemInitHash: Right, but there's not an enormous amount of headroom in shared memory beyond the intended size of the hash tables. I'd think that you'd start seeing hard failures not very far beyond the point at which performance impacts became visible. Of course this is all speculation; I quite agree with varying the table-size parameters to see if it makes a difference. Josh, what sort of workload is being tested here --- read-mostly, write-mostly, a mixture? > However I was talking to Josh Drake yesterday and he told me that > pg_dump was spending some significant amount of time in LOCK TABLE when > there are lots of tables (say 300k). I wouldn't be too surprised if there's some O(N^2) effects when a single transaction holds that many locks, because of the linked-list proclock data structures. This would not be relevant to Josh's case though. regards, tom lane