Background Processes Makeover
It is worth going back to the basics, when you learn a new version of the database. Oracle’s background processes have gotten a make over since I last learned about them. These changes did not happen in 19c, however since these changes are important, they earned their own blog post.
What do I mean about a makeover? In 19c, the background processes are grouped into three categories: mandatory, optional and slave background processes.
Let me explain each category in a few words.
Mandatory Background Processes can be found in all typical database configurations. These processes run by default in a database that is open in read write mode. In a read only database, some of these processes are disabled. If one of these processes fail or is terminated, most likely your database instance will be terminated as well. All of the mandatory background processes are required for the proper functioning of the database.
Optional Background Processes are any other background processes that are not defined as mandatory. Usually these processes are specific to a feature or a task that is enabled in the database. If the feature is not enabled, then the background processes is not running.
Slave Background Processes are processes that perform work on behalf of other processes.
Let’s review below each group and their processes.
Mandatory Background Processes:
Process Monitor Process Group – PMON Group
The PMON process as we know it, evolved into a PMON Process Group, which now contains the following processes:
- Process Monitor or PMON
- Cleanup Main Process or CLMN
- Cleanup Helper Processes or CLnn
The role of these processes is to monitor and perfom cleanup of other processes. What do these processes cleanup? These processes cleanup the memory, more precisely the buffer cache, they cleanup resources used by client processes, they reset the status of the active transaction table, they release locks that are no longer required.
PMON monitors and detects the termination of other background processes.
If a server process terminates abnormally, that is if you kill the process at the OS level, or if you issue an ALTER SYSTEM KILL SESSION command, PMON group is the one that does process recovery. PMON process is the one that monitors and detects the abnormal termination. PMON delegates the cleanup to the Cleanup Main Process – CLMN. The CLMN process is the one that performs the cleanup and delegates work to the Cleanup Helper Processes to assist with the cleanup. The number of helper processes is proportional with the amount of work/cleanup that needs to happen.
On a unix system you will not see the CLnn processes running all the time. These will be visible, only if cleanup work is needed.
If you check, V$CLEANUP_PROCESS view has one line for each cleanup process in the database:
SQL> select name, state from V$CLEANUP_PROCESS;
Process Manager or PMAN
This background process was introduced with 12cR2, and it’s purpose is to monitor other background processes: shared servers, pooled servers, job queue processes, restartable background processes. PMAN can monitor, spawn and stop the above mentioned processes
Listener Registration Process or LREG
LREG is the process that communicates with the Listener, and registers information about the database with the listener. Prior to 12c this job was performed by PMON. At instance startup , LREG contacts the listener to see if it’s running. If yes, then the information about the database is passed to the listener. If the listener is not running, then LREG periodically checks and tries contacting the listener.
The function and purpose of the other mandatory background processes has not changed from previous releases. I wrote about these before, you can check it out here.
These background processes are:
System Monitor Process or SMON
Database Writer Process or DBW
Log Writer Process or LGWR
Checkpoint Process or CKPT
Manageability Monitor Processes or MMON and MMNL
Recoverer Process or RECO
Optional Background Processes
The optional background processes are usually specific for a task or feature. Examples of these processes are:
Archiver Processes or ARCn. This process is optional, because the process only exists if the database is in NOARCHIVELOG MODE.
Job Queue Processes CJQ0 and Jnnn. These are also optional, as these processes run user defined jobs.
Flashback Data Archive Process or FBDA. This process archives historical rows of tracked tables into Flashback Data Archives. This process is running only when you are actually using this specific feature.
Space Management Coordinator Process or SMCO. This process coordinates the execution of space related tasks.
I/O Slave Processes or Innn simulate asynchronous I/O for systems and devices that do not support it.
Parallel Execution (PX) Server Processes. You will see these processes during a parallel execution of a SQL statement.
For a quick reference I’ll give you a mind map to use!
If you enjoyed this article, and would like to learn more about databases, please sign up to my weekly email, and you will receive
The Ultimate 3 Step Guide To Find The Root Cause Of The Slow Running SQL!