Oracle Database Architecture -3 SMON, PMON, DBWR,CKPT and LGWR Processes

Hi,

I will continue to explain Oracle database architecture in this article. I’m adding the following image to be memorable. If you didn’t read the previous articles, I suggest you read these articles.

Oracle Database Architecture

 

Read previous article before this.

Oracle Database Architecture -2 Buffer Cache, Redolog Buffer, Onlinelog and Archivelog

 

 

SMON (System Monitor): It is an important process responsible for recovering Oracle Instance. If this process does not work, the database is down.

This process ensures that the instance to open consistently, during the database opening using the online redo log files when the Oracle database is closed inconsistently. This process also allows the recovery of suddenly killed transactions.

We can see this process via the operating system as follows.

bash-4.1$ ps -ef | grep smon
oracle    9055     1  0 13:38 ?        00:00:00 ora_smon_TESTDB
oracle    9250  8803  0 14:24 pts/0    00:00:00 grep smon
bash-4.1$

 

When we kill this process through the operating system, the database will shut down suddenly as follows.

bash-4.1$ ps -ef | grep smon
oracle    9055     1  0 13:38 ?        00:00:00 ora_smon_TESTDB
oracle    9258  8803  0 14:28 pts/0    00:00:00 grep smon
bash-4.1$ kill -9 9055
bash-4.1$ ps -ef | grep smon
oracle    9260  8803  0 14:29 pts/0    00:00:00 grep smon
bash-4.1$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri Oct 4 14:29:08 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to an idle instance.
SQL>

 

 

PMON (Process Monitor): This process frees up system resources that are used by processes that have failed or are suddenly terminated, and will give back this resources to the server.

It also allows Oracle instance to communicate with the listener.

We can see this process on the operating system as follows.

 

bash-4.1$ ps -ef | grep pmon
oracle    9423     1  0 14:37 ?        00:00:00 ora_pmon_TESTDB
oracle    9559  8803  0 14:37 pts/0    00:00:00 grep pmon
bash-4.1$

RECO (Recoverer Process): This process enables the completion of unfinished operations.

DBWn (Database Writer): The DBW process is a process that shuttles between Datafiles and Database Buffer Cache. That is, when a transaction starts, if the corresponding blocks are not in the buffer cache, DBW move these blocks from the datafiles to the Buffer cache. In the same way, it writes the dirty blocks that should be written to the Datafiles to the Datafiles from the Buffer cache.

bash-4.1$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri Oct 4 13:39:44 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved. 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter db_writer_process

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_writer_processes                  integer     1
SQL>

 

These processes work when the following events occur, and the changing blocks in Buffer Cache are written to the datafiles.

  • When the memory space in the database buffer cache is full, these blocks are written to the datafiles starting from the oldest blocks in this memory area.
  • If the Checkpoint process is triggered.
  • When a tablespace is set to read-only mode.
  • When a tablespace is taken offline.
  • When any table is dropped or truncated.

The following code can be used to manually write the data in the buffer cache to the datafiles.

 

SQL> Alter system checkpoint;

LGWR (Log Writer Process): This process is a process that writes the data in the buffer memory to physical files like DBW process. This process runs between the Redo log buffer and the Online Redo log files. Writes transaction information in Redo log buffer to Online redo log files respectively. The LGWR process writes the data in the Redo log buffer to the Online Redo log files when the following conditions occur.

  • When a commit operation occurs
  • When a log switch occurs
  • Every 3 seconds
  • Average, when the redo log size is 1 mb.
  • When 1/3 of the Redo log buffer area is full

 

CKPT (Checkpoint Process): When this process is triggered, the Database Writer (DBW) process writes dirty blocks in the database buffer cache to datafiles. It also updates the header information of Datafiles.

If this process is triggered at very frequent intervals, the database will slow down because disk I / O will increase.

If it is rarely triggered, it will take some time to recover instance when the Oracle database instance crashes suddenly. Because changing blocks are not written to datafiles and the number of changing blocks is accumulated. Therefore, during the recovery process, the number of blocks to be written from the online redo log to the data files will be more.

 

Determining the frequency of triggering of this process is important for the above reasons.

 

ARCn ( archiver process ): This is a process that is activated when the database is in archive mode. This process copies a copy of the redo log file to the archive file during the log switch operation when the online redo log groups are full. Another task of this process is send Redo log files to the “disaster/standby” server in the disaster recovery scenario.

So, I am completing the article series of the Oracle database architecture with this article.

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

11 comments

  1. I believe everything said made a great deal of sense. However, think about this, what if you were to create a awesome headline? I am not saying your information isn’t solid, however what if you added something that grabbed people’s attention? I mean BLOG_TITLE is kinda boring. You ought to peek at Yahoo’s home page and see how they create news headlines to get people to open the links. You might add a related video or a related picture or two to get readers interested about what you’ve written. In my opinion, it could bring your website a little livelier.|

  2. It’s really a cool and helpful piece of info. I am satisfied that you just shared this useful information with us. Please stay us informed like this. Thank you for sharing.|

  3. I do not know if it’s just me or if everybody else experiencing issues with your website. It appears like some of the text in your posts are running off the screen. Can somebody else please comment and let me know if this is happening to them too? This could be a problem with my browser because I’ve had this happen before. Cheers|

  4. When some one searches for his essential thing, so he/she needs to be available that in detail, so that thing is maintained over here.|

  5. First off I want to say wonderful blog! I had a quick question in which I’d like to ask if you don’t mind. I was curious to know how you center yourself and clear your head prior to writing. I have had difficulty clearing my mind in getting my thoughts out there. I do enjoy writing but it just seems like the first 10 to 15 minutes are usually wasted just trying to figure out how to begin. Any suggestions or tips? Appreciate it!|

Leave a Reply

Your email address will not be published. Required fields are marked *