In this post, we will discuss Oracle 11g Process Architecture that is background processes of Oracle database 11g in detail.
We will discuss SMON, PMON, DBWn, LGWR, and CKPT in detail.
Oracle background processes
There are different types of processes in oracle server
- User Process: Starts when a database user requests to connect to an Oracle Server.
- Server Process: Establishes the Connection to an Oracle Instance when a User Process requests connection – makes the connection for the User Process.
- Background Processes: These processes start when an Oracle Instance is started up.
As discussed earlier there are different background processes in Oracle server architecture,
we will now discuss background processes in details.
PMON(Process monitor)
PMON continuously monitor all user processes. If any of the user processes get terminated without releasing locks PMON releases the locks by rollbacking the transaction.
In case of shared server architecture, PMON restarts dead dispatchers.
SMON(System Monitor)
In the event of instance failure or crash, SMON performs instance recovery. Instance recovery includes role forward or rollback.
Role back means removing uncommitted data from respective data files.
Role forward means writing completed transaction data from redo log files to respective data files.
In order to perform instance recovery, SMON is going to scan the redo and undo.
SMON also deallocates the temporary segments.
DBWn (Database writer)
The Database Writer writes modified blocks from the database buffer cache to the datafiles.
- One database writer process (DBW0) is sufficient for most systems.
- A DBA can configure up to 20 DBWn processes (DBW0 through DBW9 and DBWa through DBWj) in order to improve write performance for a system that modifies data heavily.
- The initialization parameter DB_WRITER_PROCESSES specifies the number of DBWn processes.
DBWn writes the data to the respective data files under the following conditions.
- when there are no free buffers.
- when the no. of dirty buffers reaches a threshold value
- when a timeout occurs
- when we drop a table
- when we truncate a table.
- when we make the tablespace offline.
- when we keep the tablespace in begin backup mode.
- whenever log switch occurs.
LGWR (log writer)
LGWR writes the data from redo buffer to redo log file.
Log writer writes the data into online redo log files under the following circumstances.
1.If one-third of the redo buffer cache is filled
2.if the data reaches 1 MB
3.If user commits
4.For every 3 secs
5.Before the DB writer writes the data to the respective data files.
CKPT (Checkpoint)
whenever log switch occurs checkpoint occurs, which will be caused by the CKPT process.
During a checkpoint, CKPT signals DBWR to write the dirty buffers to the respective data files.
During a checkpoint, CKPT updates the checkpoint change number to the control file as well as the datafile headers.
In case of an update, Oracle keeps the past image in the undo segments
Manageability Monitor Processes (MMON and MMNL):
The manageability monitor process (MMON) performs tasks related to Automatic Workload Repository (AWR). MMON (Manageability Monitor) is a background process that gathers memory statistics (snapshots) and stores this information in the AWR (automatic workload repository). MMON is also responsible for issuing alerts for metrics that exceed their thresholds.
Recoverer Process (RECO):
- RECO is a background process for distributed transactions. The RECO process manager two-phase commits to track and resolve in-doubt transactions.
- In a distributed database, the recoverer process (RECO) automatically resolves failures in distributed transactions.
In the next post, we will discuss the startup and shutdown modes in Oracle Database 11g.
Words from dbapath
Thank you for giving your valuable time to read the above information. I hope the content served your purpose in reaching out the blog.
Suggestions for improvement of the blog are highly appreciable. Please contact us for any information/suggestion/feedback.
If you want to be updated with all our articles
please follow us on Facebook | Twitter
Please subscribe to our newsletter.