Lesson 19
Oracle Instance Architecture: Conclusion and Next Steps
This module brought the Oracle instance to life: a coordinated set of background processes working over shared
memory (the SGA) to deliver concurrency, durability, and fast recovery. Across 19 lessons (with 16–17 previously
modernized), you’ve seen how redo, data blocks, and checkpoints flow through the system—and how to observe and tune
that flow safely in modern Oracle.
What you should now be able to do
- Differentiate an instance (processes + memory) from a database (physical files).
- Name the core processes and their roles: LGWR, DBWn, CKPT, SMON, PMON, ARCn (plus common auxiliaries like MMON/MMNL, LREG).
- Explain the write-ahead pipeline: sessions generate redo → LGWR makes commits durable → DBWn writes dirty buffers →
CKPT advances checkpoints → ARCn preserves redo history.
- Monitor and troubleshoot using V$ views for commits, redo, checkpoints, and background health.
The mental model (commit-to-recovery)
- On COMMIT, LGWR flushes redo to the online logs. That is durability; data blocks can be written later.
- DBWn writes dirty buffers to datafiles for cache health and recovery speed—not for commit success.
- CKPT advances checkpoint SCNs and updates headers so instance recovery starts “closer to now.”
- ARCn copies filled online logs to archive destinations (ARCHIVELOG mode) for media recovery and standbys.
- SMON/PMON clean up after failures (instance vs. session) and maintain instance hygiene.
At-a-glance: who does what
| Process | Primary responsibility | Key things to watch |
| LGWR | Flushes redo; guarantees commit durability; multiplexed log writes. | log file sync, log file parallel write, redo switch cadence. |
| DBWn | Writes dirty buffers; driven by free-buffer pressure & checkpoint progress. | Free buffer waits, physical writes, MTTR targeting. |
| CKPT | Advances checkpoints; updates control/datafile headers. | Checkpoint frequency/duration, v$instance_recovery. |
| ARCn | Archives filled redo logs to destinations (local/remote). | Archive lag/errors, destination status, network/IO throughput. |
| SMON | Instance recovery; temp cleanup; space coalescing (legacy DMTs). | Startup recovery messages; temp usage trends. |
| PMON | Session cleanup, resource release; listener/service registration. | Abend cleanup; service registration in LREG/listeners. |
Monitor and verify (drop-in queries)
-- Background processes present
SELECT name, description FROM v$bgprocess WHERE paddr <> HEXTORAW('00');
-- Commit path profile (system since startup)
SELECT event, total_waits, time_waited/100 AS seconds_waited
FROM v$system_event
WHERE event IN ('log file sync','log file parallel write')
ORDER BY seconds_waited DESC;
-- Redo volume and write work
SELECT name, value
FROM v$sysstat
WHERE name IN ('user commits','redo size','redo writes','redo write time');
-- Checkpoint/MTTR health
SHOW PARAMETER fast_start_mttr_target;
SELECT estimated_mttr FROM v$instance_recovery;
-- Log switch cadence (size for steady rhythm)
SELECT sequence#, first_time, next_time
FROM v$log_history
ORDER BY first_time DESC
FETCH FIRST 20 ROWS ONLY;
Common pitfalls (and the correct fixes)
- “DBWn makes commits durable.” No—commits are durable when LGWR flushes redo.
- “Only log switches cause checkpoints.” Modern incremental checkpointing advances continuously to meet MTTR targets.
- “Cap dirty buffers directly.” Prefer setting a realistic
FAST_START_MTTR_TARGET (policy-based control) over legacy hard caps.
- “A bigger log buffer fixes commit stalls.” Commit stalls usually trace to redo device latency or switch thrash; right-size logs and improve redo IO.
Where you go next (Module: Memory Architecture)
The next module dives deeper into the SGA's moving parts and how memory policy shapes performance:
After you are finished with that, we will move on to doing some more interesting things, like creating a database from scratch.
- Buffer Cache (blocks, LRU, dirty/clean lists)
- Redo Log Buffer (flush triggers and sizing context)
- Shared Pool (library cache, parsing, cursor lifetime)
- Advisors & ASMM/AMM (evidence-based sizing)
Self-check before you move on
- Explain, in your own words, why LGWR and DBWn are decoupled and how that affects COMMIT latency.
- Given a spike in log file sync, outline the observations you’d collect and the levers you’d try first.
- Show how checkpoint policy (MTTR) shortens recovery without forcing constant heavy writes.
Usefulness and modernization notes
- Replaced dated OS tooling walkthroughs with portable SQL diagnostics and policy-based tuning (MTTR, async IO).
- Aligned terminology with current releases (Shared Server vs. legacy MTS names; ARCn scaling; listener registration via LREG).
Oracle Instance Architecture - Exercise
