X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C916D3A4188 for ; Mon, 25 Oct 2004 18:45:37 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84185-09 for ; Mon, 25 Oct 2004 17:45:35 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 605553A4165 for ; Mon, 25 Oct 2004 18:45:35 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i9PHjTkY021744; Mon, 25 Oct 2004 13:45:29 -0400 (EDT) To: Manfred Spraul Cc: neilc@samurai.com, markw@osdl.org, pgsql-performance@postgresql.org Subject: Re: futex results with dbt-3 In-reply-to: <417D383E.1010807@colorfullife.com> References: <417221B5.1050704@colorfullife.com> <20151.1098222733@sss.pgh.pa.us> <417697A5.1050600@colorfullife.com> <7178.1098292535@sss.pgh.pa.us> <4176A2C1.3070205@colorfullife.com> <21093.1098722706@sss.pgh.pa.us> <417D383E.1010807@colorfullife.com> Comments: In-reply-to Manfred Spraul message dated "Mon, 25 Oct 2004 19:30:38 +0200" Date: Mon, 25 Oct 2004 13:45:28 -0400 Message-ID: <21743.1098726328@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/423 X-Sequence-Number: 8899 Manfred Spraul writes: > Tom Lane wrote: >> It could be that I'm all wet and there is no relationship between the >> cache line thrashing and the seemingly excessive BufMgrLock contention. >> > Is it important? The fix is identical in both cases: per-bucket locks > for the hash table and a buffer aging strategy that doesn't need one > global lock that must be acquired for every lookup. Reducing BufMgrLock contention is a good idea, but it's not really my idea of a fix for this issue. In the absence of a full understanding, we may be fixing the wrong thing. It's worth remembering that when we first hit this issue, I made some simple changes that approximately halved the number of BufMgrLock acquisitions by joining ReleaseBuffer and ReadBuffer calls into ReleaseAndReadBuffer in all the places in the test case's loop. This made essentially no change in the CS storm behavior :-(. So I do not know how much contention we have to get rid of to get the problem to go away, or even whether this is the right path to take. (I am unconvinced that either of those specific suggestions is The Right Way to break up the bufmgrlock, either, but that's a different thread.) regards, tom lane