Instance Architecture   «Prev  Next»

Lesson 11 Advancing the checkpoint
Objective Explain why checkpointing causes data to be written from buffer.
Lesson 11

Advancing the Checkpoint: How Oracle Reduces Recovery Time

Checkpointing is Oracle’s way to bound crash-recovery work. A checkpoint records a target SCN and ensures that all data blocks dirtied up to that SCN are written from the buffer cache to datafiles. During instance recovery, Oracle can then start redoing from that checkpoint position instead of scanning the entire redo stream.

What a checkpoint really is

Why checkpointing writes from the buffer cache

Hot blocks tend to stick around in memory. Without checkpoints, frequently updated blocks could remain dirty for a long time, widening the gap between datafiles and the end of redo. Checkpoints “pull” the datafiles forward so recovery only needs to apply recent redo.

Events that advance the checkpoint

What gets written

Monitoring and diagnostics

-- Target MTTR (seconds) and current estimate
SHOW PARAMETER fast_start_mttr_target;
SELECT estimated_mttr FROM v$instance_recovery;

-- Current database SCN vs. checkpoint SCN in headers
SELECT d.current_scn,
       dh.file#, dh.checkpoint_change#
FROM   v$database d
JOIN   v$datafile_header dh ON 1=1
ORDER  BY dh.file#;

-- Checkpoint and write activity since startup
SELECT name, value
FROM   v$sysstat
WHERE  name IN ('background checkpoints completed',
                'DBWR checkpoints', 'physical writes');

-- Log switch cadence (sizing/frequency)
SELECT sequence#, first_time, next_time
FROM   v$log_history
ORDER  BY first_time DESC
FETCH FIRST 20 ROWS ONLY;

Tuning checklist (23c-friendly)

  1. Set MTTR by policy: Choose a realistic FAST_START_MTTR_TARGET; let incremental checkpointing do the work.
  2. Size redo logs: Avoid thrashing (very frequent switches) and very large logs that delay checkpoints. Aim for a steady, workload-appropriate switch interval.
  3. Ensure async I/O: DBWn benefits from asynchronous writes; confirm at the OS/storage layer.
  4. Add DBWn only if needed: Increase DB_WRITER_PROCESSES after confirming sustained dirty-buffer pressure and storage headroom.

Common misconceptions

Usefulness and modernization notes


SEMrush Software 11 SEMrush Banner 11