Oracle Internals Notes

Redo Wastage

LGWR commonly writes up to and including the current log buffer block, which is normally only partially full. The SGA variable containing the index into the log buffer for redo generation is then advanced to the beginning of the next log buffer block before LGWR releases the redo allocation latch prior to writing. In this way, some space is left unused in the last log block of most redo writes. The number of bytes skipped is accumulated in the redo wastage statistic. The following diagram illustrates redo wastage within the first few blocks of a sample Oracle redo log file.

Redo log block space usage

Redo wastage is not a problem. Indeed, it benefits performance by preserving LGWR's sequential I/O pattern. However, high redo wastage is a symptom of a very active LGWR, and that might be a problem. LGWR is expected to be highly active in many instances, but it can be overactive if the log buffer (more correctly, the _log_io_size) is too small, or if the commit rate is too high. If LGWR is overactive, it will place unnecessary load on the redo latches, and on the I/O subsystem. The operating system may also degrade LGWR's execution priority.

Ixora Pty Ltd.   All rights reserved.
12-Oct-2007 22:22
Search   Questions   Feedback   Up   Home