Re: futex results with dbt-3

From: Neil Conway <neilc(at)samurai(dot)com>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org, Gavin Sherry <swm(at)alcove(dot)com(dot)au>, Stephen Hemminger <shemminger(at)osdl(dot)org>
Subject: Re: futex results with dbt-3
Date: 2004-10-14 02:30:05
Message-ID: 1097721005.4682.2.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, 2004-10-14 at 04:57, Mark Wong wrote:
> I have some DBT-3 (decision support) results using Gavin's original
> futex patch fix.

I sent an initial description of the futex patch to the mailing lists
last week, but it never appeared (from talking to Marc I believe it
exceeded the size limit on -performance). In any case, the "futex patch"
uses the Linux 2.6 futex API to implement PostgreSQL spinlocks. The hope
is that using futexes will lead to better performance when there is
contention for spinlocks (e.g. on a busy SMP system). The original patch
was written by Stephen Hemminger at OSDL; Gavin and myself have done a
bunch of additional bugfixing and optimization, as well as added IA64
support.

I've attached a WIP copy of the patch to this email (it supports x86,
x86-64 (untested) and IA64 -- more architectures can be added at
request). I'll post a longer writeup when I submit the patch to
-patches.

> Definitely see some overall throughput performance on the tests, about
> 15% increase, but not change with respect to the number of context
> switches.

I'm glad to see that there is a performance improvement; in my own
testing on an 8-way P3 system provided by OSDL, I saw a similar
improvement in pgbench performance (50 concurrent clients, 1000
transactions each, scale factor 75; without the patch, TPS/sec was
between 180 and 185, with the patch TPS/sec was between 200 and 215).

As for context switching, there was some earlier speculation that the
patch might improve or even resolve the "CS storm" issue that some
people have experienced with SMP Xeon P4 systems. I don't think we have
enough evidence to answer this one way or the other at this point.

-Neil

Attachment Content-Type Size
futex-spin-16.patch text/x-patch 15.1 KB

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2004-10-14 03:47:05 Re: Free PostgreSQL Training, Philadelphia, Oct 30
Previous Message Jan Wieck 2004-10-14 00:52:43 Re: First set of OSDL Shared Mem scalability results, some