First page Back Continue Last page Graphics

Database Block Writer


Notes:

The DBWn process writes dirty (i.e. updated) data blocks from the data block buffer cache to database files. DBWn will write out the Oracle blocks at various times - when the instance is shutdown, when the database buffer pool does not have any free blocks to load new database blocks and when a checkpoint occurs. A checkpoint signals DBWn to write all modified blocks to the datafiles, and updates all datafiles and control files to indicate that the checkpoint has been taken.
DBWn uses a Least Recently Used algorithm to help keep recently accessed blocks remain in the buffer cache. That is, the least recently used block will be flushed from the buffer cache first, leaving recently accessed blocks in the cache. Oracle also supports a separate RECYCLYE cache, which is an area that does not adhere to this; i.e. recently accessed blocks in the recycle pool can be flushed right away.
To eliminate waiting* when writing large numbers of dirty blocks to multiple datafiles, more than one DBWn process can be started via the DB_WRITER_PROCESSES parameter. In this case, the processes will be DBW0, DBW1, DBW2, etc., not just DBW0 .
* Waiting can occur if a redo log file is needed before the checkpoint operation completes. If starting multiple DBWn processes, be sure to adjust the DB_BLOCK_LRU_LATCHES parameter. See the Tom Kyte text, expert one-to-one Oracle, page 93, for a complete description.