Skip site navigation (1) Skip section navigation (2)

Re: futex results with dbt-3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Manfred Spraul <manfred(at)colorfullife(dot)com>
Cc: neilc(at)samurai(dot)com, markw(at)osdl(dot)org,pgsql-performance(at)postgresql(dot)org
Subject: Re: futex results with dbt-3
Date: 2004-10-20 17:15:35
Message-ID: 7178.1098292535@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Manfred Spraul <manfred(at)colorfullife(dot)com> 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

In response to

Responses

pgsql-performance by date

Next:From: Rod TaylorDate: 2004-10-20 17:20:19
Subject: Re: Insert performance, what should I expect?
Previous:From: Manfred SpraulDate: 2004-10-20 17:14:46
Subject: Re: futex results with dbt-3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group