Dave Cramer <pg(at)fastcrypt(dot)com> writes:
> I tried increasing the NUM_SPINS to 1000 and it works better.
Doesn't surprise me. The value of 100 is about right on the assumption
that the spinlock instruction per se is not too much more expensive than
any other instruction. What I was seeing from oprofile suggested that
the spinlock instruction cost about 100x more than an ordinary
instruction :-( ... so maybe 200 or so would be good on a Xeon.
> This is certainly heading in the right direction ? Although it looks
> like it is highly dependent on the system you are running on.
Yeah. I don't know a reasonable way to tune this number automatically
for particular systems ... but at the very least we'd need to find a way
to distinguish uniprocessor from multiprocessor, because on a
uniprocessor the optimal value is surely 1.
regards, tom lane
In response to
pgsql-performance by date
|Next:||From: Christopher Kings-Lynne||Date: 2004-04-22 04:44:07|
|Subject: Re: Wierd context-switching issue on Xeon patch for 7.4.1|
|Previous:||From: Tom Lane||Date: 2004-04-22 04:15:13|
|Subject: Re: 225 times slower |