Re: Spinlocks, yet again: analysis and proposed patches

From: "Michael Paesold" <mpaesold(at)gmx(dot)at>
To: <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Spinlocks, yet again: analysis and proposed patches
Date: 2005-09-12 18:37:54
Message-ID: 022a01c5b7c9$170a07d0$0f01a8c0@zaphod
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Comments and testing invited.

I have tested the patches on a Dual Xeon 2,4 GHz w/ HT (no EM64T).
(Configured with
"CFLAGS='-O2 -mcpu=pentium4 -march=pentium4' --enable-casserts").
The results were pretty stable (around .2 seconds). I would not trust the
numbers for N=2, linux, at least 2.4 is not good at not scheduling two
running processes on two different HTs on the same core. Those values also
had the most variance (> 1s). All other measures were quite stable over
several runs.

CVS tip from 2005-09-12 ~16:00
1: 57s 2: 82s 4: 124s 8: 237s

with only slock-no-cmpb.patch applied
1: 55s 2: 79s 4: 119s 8: 229s

with only spin-delay.patch applied
1: 56s 2: 79s 4: 124s 8: 235s

with both patches applied
1: 55s 2: 78s 4: 124s 8: 235s

compare to 7.4.8 on the same machine ;-)
1: 92s 2: 235s 4: 474s 8: did not try ...

It seems to me the slock-no-cmpb is a win in any case. The spin-delay patch
does not really help much on this machine. That seems to match Stephen
Frost's results with EM64T, if I read them correctly.

The cs rate is about 150 on CVS tip without patches and below 100 with the
patches (all three cases).
With 7.4.8 its 230000-280000 with N>1. 8.1 is clearly the winner here. Great
work, Tom.

I hope some more data helps.

Best Regards,
Michael Paesold

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-09-12 18:48:27 Re: Spinlocks, yet again: analysis and proposed patches
Previous Message Dann Corbit 2005-09-12 18:00:27 Re: Materialized Views in PostgreSQL