Question: What are redo log buffer
latches? I understand that Oracle must manage concurrency in the
redo logs, but I want to understand how redo log buffer latches are
used in the log_buffer of the SGA.
Answer: Redo log buffer latches can be broken down into two main types of
latches: redo allocation latches and redo copy latches.
Redo allocation latches serve the critical purpose of providing a
method to allocate space within the redo log buffer within Oracle
. This latch must be acquired first before entries can be made in
the redo log buffer.
Also of note is that if a new redo log entry is
to be made that is larger than the value provided by the database
initialization parameter for Oracle of log_small_entry_max_size,
the session making the request will acquire a redo allocation latch
so that it may copy the entry into the redo log buffer immediately
while maintaining this latch.
On the other hand, if the log entry in question is smaller than
the value for the log_small_entry_max_size database initialization
parameter for, then the session will drop the redo allocation
latch and instead it will acquire the second type of redo latch, the
redo copy latch, so that it may copy the data into the redo log
buffer. Another purpose of the redo allocation latch is that it
manages the allocation of space for redo within the redo log buffer.
One redo allocation latch is granted per Oracle instance. The
redo copy latch writes redo log records into the redo log buffer.
|
|
Get the Complete
Oracle SQL Tuning Information
The landmark book
"Advanced Oracle
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
buy it
for 30% off directly from the publisher.
|