Skip site navigation (1) Skip section navigation (2)

Re: Wierd context-switching issue on Xeon patch for 7.4.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pg(at)fastcrypt(dot)com
Cc: Josh Berkus <josh(at)agliodbs(dot)com>,Paul Tuckfield <paul(at)tuckfield(dot)com>, Anjan Dave <adave(at)vantage(dot)com>,Neil Conway <neilc(at)samurai(dot)com>,Dirk Lutzeb├Ąck <lutzeb(at)aeccom(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Wierd context-switching issue on Xeon patch for 7.4.1
Date: 2004-04-22 04:23:24
Message-ID: 19596.1082607804@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
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

Responses

pgsql-performance by date

Next:From: Christopher Kings-LynneDate: 2004-04-22 04:44:07
Subject: Re: Wierd context-switching issue on Xeon patch for 7.4.1
Previous:From: Tom LaneDate: 2004-04-22 04:15:13
Subject: Re: 225 times slower

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group