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 3BAE432A64E for ; Thu, 21 Oct 2004 01:27:34 +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 56381-10 for ; Thu, 21 Oct 2004 00:27:25 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 84D7732A569 for ; Thu, 21 Oct 2004 01:27:24 +0100 (BST) Received: (qmail 17092 invoked from network); 21 Oct 2004 00:28:47 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 21 Oct 2004 00:28:47 -0000 Message-ID: <41770285.5090604@fastcrypt.com> Date: Wed, 20 Oct 2004 20:27:49 -0400 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 0.8 (X11/20041001) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Manfred Spraul , neilc@samurai.com, markw@osdl.org, pgsql-performance@postgresql.org Subject: Re: futex results with dbt-3 References: <417221B5.1050704@colorfullife.com> <20151.1098222733@sss.pgh.pa.us> <417697A5.1050600@colorfullife.com> <7178.1098292535@sss.pgh.pa.us> In-Reply-To: <7178.1098292535@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/331 X-Sequence-Number: 8807 Forgive my naivete, but do futex's implement some priority algorithm for which process gets control. One of the problems as I understand it is that linux does (did ) not implement a priority algorithm, so it is possible for the context which just gave up control to be the next context woken up, which of course is a complete waste of time. --dc-- Tom Lane wrote: >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 > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > > > -- Dave Cramer www.postgresintl.com 519 939 0336 ICQ#14675561