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 9266832A3B9 for ; Wed, 20 Oct 2004 18:15:56 +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 54367-10 for ; Wed, 20 Oct 2004 17:15:42 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9C65732A37C for ; Wed, 20 Oct 2004 18:15:41 +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 i9KHFZKW007179; Wed, 20 Oct 2004 13:15:35 -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: <417697A5.1050600@colorfullife.com> References: <417221B5.1050704@colorfullife.com> <20151.1098222733@sss.pgh.pa.us> <417697A5.1050600@colorfullife.com> Comments: In-reply-to Manfred Spraul message dated "Wed, 20 Oct 2004 18:51:49 +0200" Date: Wed, 20 Oct 2004 13:15:35 -0400 Message-ID: <7178.1098292535@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/325 X-Sequence-Number: 8801 Manfred Spraul writes: > Tom Lane wrote: >> The bigger problem here is that the SMP locking bottlenecks we are >> currently seeing are *hardware* issues (AFAICT anyway). The only way >> that futexes can offer a performance win is if they have a smarter way >> of executing the basic atomic-test-and-set sequence than we do; >> > lwlocks operations are not a basic atomic-test-and-set sequence. They > are spinlock, several nonatomic operations, spin_unlock. Right, and it is the spinlock that is the problem. See discussions a few months back: at least on Intel SMP machines, most of the problem seems to have to do with trading the spinlock's cache line back and forth between CPUs. It's difficult to see how a futex is going to avoid that. regards, tom lane