The Jonathan Lewis Pages

FAQ - Redo copy latch misses seems to be high.


Question:

When I look at v$latch (perhaps using the utlbstat/utlestat reports) the ratio of misses to gets on the Redo Copy Latch is very high. Is this a problem ?

Answer:

The quick answer to the question is that you are probably looking at the half of the latch report that lists 'Willing to Wait' latches which means that you don't have a problem.

It is important to remember that there are two sets of 'gets' and 'misses' recorded by the V$LATCH dynamic performance view. Two columns are simply named 'gets' and 'waits', the other two are named 'immediate_gets' and 'immediate_waits'. If you look at the complete set of latch statistics for your system, you will notice that there are two high usage latches on 7.3 and 8.0 - Redo Allocation and Redo Copy. Oracle 8.1 introduces a third latch, the Redo Writing latch.

It is worth looking at just the redo latches, and the gets/misses on those latches - with the following SQL, for example:

column name format a15

select
	name, 
	gets, misses, 
	immediate_gets, immediate_misses
from	v$latch
where	name like '%redo%'
;


NAME                 GETS    MISSES IMMEDIATE_GETS IMMEDIATE_MISSES 
--------------- --------- --------- -------------- ---------------- 
redo allocation   1937729         1              0                0 
redo copy              13         3        1814906                6 
redo writing       645563         1              0                0 

It takes only a moment, when presented with the results in this form, to realise that the Redo Copy latch is almost invariable acquired on an 'immediate get', and rarely accessed on a 'willing to wait get'. The fact that the ratio of misses to gets (3 to 13) is rather high is totally irrelevant. In fact it is actually the expected behaviour as Oracle only acquires the redo copy latch in this fashion when it is trying to suspend redo activity temporarily.

(For a detailed description of the actvity associated with redo, the best reference site is probably Steve Adams' site http://www.ixora.com.au)

Back to FAQ Index