The LGWR
process is responsible for flushing to disk the contents of the redo log buffer
located in the SGA. It does this when one of the following is true:
- Every three seconds
- Whenever a commit is issued by any transaction
- When the redo log buffer is one-third full or contains 1MB of buffered data
For these
reasons, having an enormous (hundred and thousand megabytes) of redo log buffer
is not practical; Oracle will never be able to use it all since it pretty much
continuously flushes it.
What is
the need of redo log files or LGWR?
The logs
are written to with sequential writes as compared to the scattered I/O DBWn
must perform .Doing large batch writes like this is much more efficient than
doing many scattered writes to various parts of a file. This is one of the main
reasons for having a LGWR and redo logs in the first place. The efficiency in
just writing out the changed bytes using sequential Input-output outweighs the
additional input-output incurred. Oracle could just write database blocks
directly to disk when you commit, but that would entail a lot of scattered
input-output of full blocks, and this would be significant slower than letting
LGWR write the changes out sequentially.
No comments:
Post a Comment