Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 
 

Oracle redo allocation latch misses

Oracle Database Tips by Donald Burleson


 

Question: 

 

In my STATSPACK report I see high miss values for redo allocation latch.  What do I do to relieve the misses on the redo allocation latch?

 

Answer:

 

In the latch section of a STRATSPACK or AWR report you should look for the redo allocation line where ?pct get miss? > 0.1 OR ?pct nowait miss? > 1.0.

 

The redo allocation latch controls the allocation of space for redo entries in the redo log buffer (as defined by the log_buffer parameter).  The redo allocation latch is a serialization latch that enforces the sequence of entries in the log buffer.  A process can only write a redo entry after the redo allocation latch, which is why it's a will-to-wait latch.

 

Redo allocation latches are a willing-to-wait latch, and the traditional remedy was to increase the size of the log_small_entry_max_size parameter, but this parameter was removed in Oracle8i.

 

You can measure redo allocation latch misses with this query:

 

select
round(
   greatest(
     (sum(decode(ln.name,'redo allocation',misses,0))
/greatest(sum(decode(ln.name,'redo allocation',gets,0)),1)),
(sum(decode(ln.name,'redo allocation',immediate_misses,0))
/greatest(sum(decode(ln.name,'redo allocation',immediate_gets,0))
+sum(decode(ln.name,'redo allocation',immediate_misses,0)),1))
)*100,2)
from
   v$latch l,
   v$latchname ln
where
   l.latch#=ln.latch#;

 

Oracle consultant Steve Adams notes on on redo allocation latch tuning:

"The redo latches are not only taken in connection with redo generation and log file sync waits. They are taken by LGWR as well in connection with writing redo from the log buffer to the log files.

When LGWR wakes up, it first takes the redo writing latch to update the SGA variable that shows whether it is active. This prevents other processes from posting LGWR needlessly. Then, if it was not posted, LGWR then takes the redo allocation latch to determine whether there is any redo to write. If not, it takes the redo writing latch again to record that it is no longer active, before starting another rdbms ipc message wait.

If there is any redo to write, LGWR then inspects the latch recovery areas for the redo copy latches (without taking the latches) to determine whether there are any incomplete copies into the redo buffers that it intends to write. If so, LGWR sleeps on a LGWR wait for redo copy wait event, and is posted when the required copy latches have been released. The time taken by LGWR to take the redo writing latch, the redo allocation latch and to wait for the redo copy latches is accumulated in the redo writer latching time statistic."
 

 

 

If you like Oracle tuning, you may enjoy the new book "Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.