How is a checkpoint related to the cache recovery phase of a recovery process?
How is a checkpoint related to the cache recovery phase of a recovery process?
Rating:
At certain time intervals, the database writer (DBWn) writes all modified (dirty) buffers from the database buffer cache to the data files on disk. This event is called a checkpoint. Whenever a checkpoint occurs, the checkpoint process (CKPT) updates the headers of data files and control files with the highest system change number (SCN) to indicate the most recent checkpoint. All data blocks containing changes at SCNs less than or equal to the SCN defined by the most recent checkpoint are considered to be written to the data files. Before dirty buffers are written to data files, the corresponding redo entries generated in the redo log buffer are written to online redo log files. In this way, Oracle guarantees that all redo blocks containing changes at SCNs less than or equal to the SCN defined by the most recent checkpoint are written to the data files on disk. Therefore, in case of an instance failure, only redo blocks containing changes at SCNs higher than the SCN defined by the most recent checkpoint need to be applied during the cache recovery phase of the instance recovery.
The duration of cache recovery (roll forward) phase of an instance recovery is determined by the number of data blocks containing changes at SCNs higher than the SCN defined by the most recent checkpoint and number of redo blocks that need to be read to find those changes.
If checkpoints occur frequently, dirty buffers from the database buffer cache are written to data files more often. This reduces the cache recovery time in the event of an instance failure. This is because if checkpoints occur frequently, the number of data blocks containing changes at SCNs higher than the SCN defined by the most recent checkpoint is low. Therefore, the number of redo blocks to be applied during the instance recovery is low.
However, frequent checkpoints can reduce run-time performance, as they cause the database writer process (DBWn) to write dirty buffers from the database buffer cache to the data files on disk more often.
Rating:
Other articles
- What is an open backup?
- What is a tnsnames.ora file?
- How is a tablespace taken offline and online?
- What are the different types of data loading methods used by SQL*Loader?
- What is a listener?