Re: Spinlocks, yet again: analysis and proposed patches - Mailing list pgsql-hackers

From Michael Paesold
Subject Re: Spinlocks, yet again: analysis and proposed patches
Date
Msg-id 022a01c5b7c9$170a07d0$0f01a8c0@zaphod
Whole thread Raw
In response to Spinlocks, yet again: analysis and proposed patches  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Spinlocks, yet again: analysis and proposed patches
List 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



pgsql-hackers by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Materialized Views in PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: Spinlocks, yet again: analysis and proposed patches