Re: spin_count and cpu usage

  • From: Tim Gorman <tim@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Sun, 03 Sep 2006 20:50:58 -0600

Spin count has little to do with CPU cycles, and everything to do with the duration of non-pre-emptive waits on latches (i.e. column SPIN_GETS on V$LATCH). It is literally the count in a loop that Oracle spins while waiting non-pre-emptively (i.e. without losing the CPU) for a latch. Really, really bad feng-shui to mess with spin count.

Oracle cannot record if your CPU is working "efficiently" or not. All it can do is report on how much CPU time was consumed. If you do the math, 3 million centi-seconds is 30,000 seconds. An hour has 3,600 seconds, so eight CPUs can use 28,800 seconds in an hour. It pretty much adds up to Oracle consuming all the CPU on your server, which is OK if it is the only thing on the server. As far as the discrepency between 28,800 and 30,000, don't expect too much accuracy from a mechanism that is constantly rounding or truncating micro-seconds to the nearest centi-second...


amonte wrote:

Hi
I was wondering if anyone know how is spin_count measured? In CPU CYCLES?
I havea doubt with CPU usage as well, I undersstand that in v$sysstat it is using centiseconds to measure CPU usage. I wonder how can we determine 1 centisecond is equivalent to how many CPU cycles? For example I have a server with 8 PA-RISC 1200 MHz CPU, in 1 hour it reports 3 million centiseconds usage, am I using fully? Basically is how do you know how efficiently is your CPU working from Oracle Statistics.
TIA
Alex

-- -- -Tim Gorman consultant - Evergreen Database Technologies, Inc.

website = http://www.evdbt.com
email   = tim@xxxxxxxxx
mobile  = +1-303-885-4526
fax     = +1-303-484-3608

--
//www.freelists.org/webpage/oracle-l


Other related posts: