Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total Waits Time (s)
Event Waits Time (s) Ela Time per sec per sec
-------------------------------------------- ------------ ----------- -------- --------- --------
enqueue 1,801,215 3,281,392 59.82 499.9 910.74
buffer busy waits 1,984,703 1,235,865 22.53 550.8 343.01
latch free 6,425,043 847,386 15.45 1,783.2 235.19
SQL*Net break/reset to client 50,394 35,937 .66 14.0 9.97
CPU time 23,828 .43 6.61
This is the statspack report for 9.2.0.8 instance suffered from heavy latch contention.
Every time I saw such CPU bound Oracle instance with latch contention, I asked myself. Which part of this CPU power is currently burned for useless latch spin attempts? How many processes spin for the latch? How can we estimate this?
Unfortunately I still do not have contemporary answer yet. But in this post I would like to show that we had had such estimations before 11g.
We all do know that latch wait is instrumented well in Oracle wait interface. Oracle 11.2 has 32 specific latch wait events and one general ‘latch free’. But all these events are only for latch sleeps. Oracle Wait Interface don’t know anything about latch gets and spins.
It occurs that Oracle had instrumented the latch acquisition also, and even documented it. I do not know why it is not popular enough. This instrumentation resides in process array v$process. The fixed table behind v$process view is x$ksupr.
Of course, my post is about v$process.latchwait and v$process.latchspin. (more…)