Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Latch spin - OS timeslice
I think you'll find it varies across platforms.
The 'latch spin' is just a loop of code where Oracle goes:
gimme gimme gimme gimme gimme gimme
until it reaches a limit count, or until it gets the latch.
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.
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.
-- Jonathan Lewis http://www.jlcomp.demon.co.uk Next Seminar - UK, April 3rd - 5th http://www.jlcomp.demon.co.uk/seminar.html Host to The Co-Operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html Author of: Practical Oracle 8i: Building Efficient Databases Alex Bardos wrote in message ...Received on Thu Mar 14 2002 - 04:18:54 CST
>Hi,
>
>I am looking for information on what instructions are being executed
>when Oracle is in latch spin (active wait) and how long the spin is
>relative to OS time slice (e.g. 10 ms).
>
>Thanks.