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 3C96D32B0DF for ; Wed, 20 Oct 2004 18:10:22 +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 49924-06 for ; Wed, 20 Oct 2004 17:10:11 +0000 (GMT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by svr1.postgresql.org (Postfix) with ESMTP id D2E7832AEB0 for ; Wed, 20 Oct 2004 18:10:10 +0100 (BST) Received: (from markw@localhost) by mail.osdl.org (8.11.6/8.11.6) id i9KHA1g13777; Wed, 20 Oct 2004 10:10:01 -0700 Date: Wed, 20 Oct 2004 10:10:01 -0700 From: Mark Wong To: Manfred Spraul Cc: neilc@samurai.com, pgsql-performance@postgresql.org Subject: Re: futex results with dbt-3 Message-ID: <20041020101001.A13359@osdl.org> References: <417221B5.1050704@colorfullife.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <417221B5.1050704@colorfullife.com>; from manfred@colorfullife.com on Sun, Oct 17, 2004 at 09:39:33AM +0200 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/322 X-Sequence-Number: 8798 On Sun, Oct 17, 2004 at 09:39:33AM +0200, Manfred Spraul wrote: > Neil wrote: > > >. In any case, the "futex patch" > >uses the Linux 2.6 futex API to implement PostgreSQL spinlocks. > > > Has anyone tried to replace the whole lwlock implementation with > pthread_rwlock? At least for Linux with recent glibcs, pthread_rwlock is > implemented with futexes, i.e. we would get a fast lock handling without > os specific hacks. Perhaps other os contain user space pthread locks, too. > Attached is an old patch. I tested it on an uniprocessor system a year > ago and it didn't provide much difference, but perhaps the scalability > is better. You'll have to add -lpthread to the library list for linking. I've heard that simply linking to the pthreads libraries, regardless of whether you're using them or not creates a significant overhead. Has anyone tried it for kicks? Mark