Re: Spinlocks, yet again: analysis and proposed patches
Michael Paesold <mpaesold@gmx.at>
From: "Michael Paesold" <mpaesold@gmx.at>
To: <pgsql-hackers@postgresql.org>, "Tom Lane" <tgl@sss.pgh.pa.us>
Date: 2005-09-12T18:37:54Z
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