Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Latch spin - OS timeslice

Re: Latch spin - OS timeslice

From: Andrew Mobbs <andrewm_at_chiark.greenend.org.uk>
Date: 14 Mar 2002 17:34:43 +0000 (GMT)
Message-ID: <3Rk*mFdjp@news.chiark.greenend.org.uk>


Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk> wrote:
>
>No doubt there is supporting code in the
>loop somewhere for counting and timing
>purposes, but pre-9, I believe the most
>commonly used instruction was the
>atomic 'test and set' instruction.

"pre-9" ? What happens at 9?

>Your comment about length of spin relative
>to time slice is interesting, because it is
>virtually the only good reason for considering
>adjusting the spin_count (or latch_spin_count)
>parameter.
>
>The spin_count has not changed (I believe) since
>it was first introduced, not has the typical latch sleep
>time, (nor, in passing has the approximate cost of a
>context switch). but CPU speeds have gone up by
>a factor of 5 or so. Consequently, we now
> spin for much less time
>
> sleep for a time which loses far more work-time than
> it used to.
>
> pay the cost of a task-switch a lot sooner
> than we used to.

Yes, I tend to set _spin_count as a matter of course for performance benchmarks (as do people running TPC-C tests). I really don't understand why Oracle "hid" that parameter in 8i, as it's not at all self-tuning. I've measured a 20%+ performance increase in some tests from just setting _spin_count correctly.

As I understand it, as CPUs have become more complex, with more cache, out-of-order processing and the like, context switches are becoming increasingly expensive.

-- 
Andrew Mobbs - http://www.chiark.greenend.org.uk/~andrewm/
Received on Thu Mar 14 2002 - 11:34:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US