Instance Architecture   «Prev  Next»

Lesson 12 Limiting the number of dirty buffers
Objective How to limit the number of dirty buffers

Limiting Dirty Buffers Safely: MTTR Policy, Checkpoints, and DBWn

Dirty buffers are cached blocks whose contents differ from what’s on disk. Limiting how many dirty buffers can accumulate helps bound crash-recovery time and keeps the buffer cache healthy. In modern Oracle (11g+), you control this primarily with an MTTR policy rather than a hard cap parameter.

The modern way: target recovery time, not a block count

What about DB_BLOCK_MAX_DIRTY_TARGET?

DB_BLOCK_MAX_DIRTY_TARGET is a legacy concept from pre-MTTR-policy tuning. In current releases, rely on MTTR targeting; do not set legacy or hidden parameters unless directed by Oracle Support for your exact version and case.

How Oracle actually limits dirty buffers

Practical configuration

  1. Pick an RTO and set an MTTR target.
  2. Ensure asynchronous I/O is enabled so DBWn can write efficiently.
  3. Consider multiple writers (DB_WRITER_PROCESSES) only if you observe sustained dirty-buffer pressure and your storage can benefit.
  4. Size redo logs for a steady switch cadence; wild log thrashing can force frequent checkpoint work.

Drop-in snippets

-- Set an MTTR policy (example only; choose a value that fits your RTO)
ALTER SYSTEM SET fast_start_mttr_target = 120 SCOPE=BOTH;

-- Force a one-time checkpoint (rarely needed; let MTTR policy drive it)
ALTER SYSTEM CHECKPOINT;

-- Multiple DB writers (only when proven useful)
ALTER SYSTEM SET db_writer_processes = 4 SCOPE=SPFILE;
-- (Bounce required; validate storage can handle the extra write concurrency.)

Monitoring and verification

-- MTTR target and current estimate
SHOW PARAMETER fast_start_mttr_target;
SELECT estimated_mttr FROM v$instance_recovery;

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

-- Log switch cadence (to spot thrash or oversizing)
SELECT sequence#, first_time, next_time
FROM   v$log_history
ORDER  BY first_time DESC
FETCH FIRST 20 ROWS ONLY;

Recovery time vs. runtime performance

More aggressive checkpointing reduces recovery time but increases background write I/O. Use workload evidence to pick a balanced MTTR. If runtime stalls appear (e.g., free buffer waits), confirm storage latency/throughput, hot segments, and log sizing before adding more writers.

Usefulness and Modernization notes


DB_WRITER_PROCESSES is useful for systems that modify data heavily. It specifies the initial number of database writer processes for an instance.

DBwriter Process -Quiz

Click the Quiz link below to test what you have learned about the DBWR and database buffers.
DBwriter Process - Quiz

SEMrush Software 12 SEMrush Banner 12