Oracle Process Structure : Part 2

Oracle Process Structure continued

Checkpoint (CKPT)

The usefulness of this process is that it communicates to the database writer when to write dirty data to the disk from the database buffer. The checkpoint is more of a data structure that defines the system change number (SCN) in the redo thread. These checkpoints are even recorded into the control files. The CKPT process helps update the SCN in the headers of all the data files to record details of the checkpoint, thus ensuring the data prior to the SCN that is being written to the disk. SYSTEM_STATISTICS displays information about the checkpoint. Further the checkpoint process uses
the following procedure:

  1. Flushing the redo log buffer data to the redo log files.
  2. Writing a CKPT record to the redo log file
  3. Signaling the DBW to flush the contents of the database buffer to the datafiles.
  4. After completion of the checkpoint, updating the datafile headers and control files with its information.

Checkpoint
System monitor (SMON)


The system monitor process does a very critical role of instance recovery as and when needed. It frees up all the temporary space that is no longer required by any process. Further if recovery of any transaction is skipped due to files being offline then it does the recovery once the data file or the table space is again available. Other processes can call SMON if required. Any SMON also checks if it is needed by any process. Thus it can be summarized as:

  1. SMON determines if the database is consistent or requires recovery.
  2. It does the task for freeing up space and collecting them so it can be assigned to larger data processing.
  3. It cleans up temporary segments.

SMON
Process Monitor (PMON)
 
It is specific to processes. Whenever it fails, it's the job of PMON to free up the resources held by that process. It also cleans up the database buffer cache thus freeing up the space. It regularly checks for dispatcher and server processes and restarts, for any stopped working. It does tasks like resetting the status of the active transaction table, releasing locks and unregistering the process ID from the list of active processes. In addition to the preceding tasks, the PMON automatically performs dynamic service registration, in other words it eliminates the need to register the new services in the listener.ora file. Whenever a new database instance is created, the PMON registers the instance information into the listener, thus enabling the connection management to the new database.
PMON

Archiver Processes (ARCn)
 
This process can be active only if the ARCHIVELOG mode is set and by default it is enabled. An Archiver process copies redo log files to an assigned storage device after a log switch has occurred.  During a heavy workload, the number of archivers can be increased to a maximum of 30, by setting LOG_ARCHIVE_MAX_PROCESSES, which is a dynamic parameter. The ALTER SYSTEM command can help to change it. Also the default number of archivers is two.
Arrchiver
ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=7;

ASM Processes

If the Automatic Storage Management (ASM) storage system is configured then there are processes related to ASM that will be functioning as below:

Rebalance Master (RBAL):  This process manages disk rebalancing tasks in an ASM based storage.
ASM Rebalance (ARBn):  This process actually performs disk rebalance activity in an ASM instance.
ASM Background (ASMB): This process is a foreground process that facilities communication with the ASM instance by logging into it. The ASMB process acts more like a mediator between our database and the ASM instance.
 
Other Background Processes
 
There are many more background processes running in the Oracle database 11g, here we will explain a few more: 

  1. The Manageability Monitor process performs tasks for manageability. In other words it issues alerts whenever a given metrics violates its threshold value. Secondly, takes snapshots by spawning additional processes (MMON slaves), these help generate the AWR reports that form the basis of performance diagnostics and lastly captures statistics values for SQL objects that are recently modified.
  2. The Light Manageability Monitor (MMNL) process flushes the data from the active session history to the disk whenever the buffer is full. It also captures session history, computes database metrics and it can be seen by querying the V$BGPROCESS view.
  3. The memory manager (MMAN) process helps coordinate the sizing of the memory components.
  4. Job Queue (CJQO) coordination process schedules and runs the jobs. It can spawn job queue slaves to perform the user jobs. It`s used for batch processing.
  5. The Queue Monitor process (QMNx) is an optional background process used for Oracle streams advanced queuing. It monitors the message queues and we can configure a maximum of 10 such queue monitors.
  6. The Change Tracking Writer (CTWR) process is a new Oracle background process that helps write change information to the change-tracking file. Oracle tracks the physical location of the database changes in the file. It also makes incremental backup fast, since it provides the exact information where the changes are made.
  7. The Recoverer (RECO) process helps coordinate distributed database and other specialized processes.
  8. The Flash Back Data Archiver (FBDA) process works for the table with flashback enabled, it writes changes into the history tables.
  9. The result cache background process is in charge of the result cache management.

Previous article: Oracle Process Structure : Part 1