Lesson 5 | The redo log buffer |
Objective | Explain the Function of the Redo Log Buffer |
Function of Oracle Redo Log Buffer
The redo log buffer is an area of memory set aside to hold redo log entries long enough for the Log Writer process to write them to the redo log files. Ideally, the log writer would write the redo log as fast as new entries were generated. Then you would not need a buffer. In reality, that's simply not feasible. This SlideShow shows conceptually how the redo log buffer is used:
Server Process RedoLog File
Redo log buffer
The redo log buffer caches redo information until it is written to the physical redo log files stored on a disk. This buffer also improves performance. Oracle caches the redo until it can be written to a disk at a more optimal time, which avoids the overhead of constantly writing the redo logs to disk.
The redo log buffer holds the most recent changes to the data blocks in the datafiles. When the redo log buffer is one-third full, or every three seconds, Oracle writes redo log records to the redo log files. As of Oracle 10g, the LGWR process will write the redo log records to the redo log files when 1MB of redo is stored in the redo log buffer. The entries in the redo log buffer, once written to the redo log files, are critical to database recovery if the instance crashes before the changed data blocks are written from the buffer cache to the datafiles. A user's committed transaction is not considered complete until the redo log entries have been successfully written to the redo log files.
SGA - Memory Structures - Quiz