Processes Beneath the Hood


This section begins with an introduction to Oracle processes and discusses the new processes introduced in Oracle Database 10g. Some of the new processes are dedicated to the advanced manageability features of Oracle Database 10g.

Classification of Database Processes

An Oracle database utilizes processes and memory structures to access the database. The memory structures reside in the memory of the machines that host the database. Processes are jobs that operate within the memory.

An Oracle database server has two types of processes:

  • User processes. User processes, also called client processes, are generated to run Oracle tools (like Enterprise Manager) or application programs (like OCI), and manage the communication with the server processes.

  • Oracle processes. To perform their functions and services, some user processes invoke Oracle processes, which can be broken down into server processes and background processes.

Oracle can adjust the number of server processes to support the user processes depending on the server configuration. In a shared server configuration, many user processes share a smaller number of server processes, while in a dedicated server configuration, each user process has its own server process. The user and server processes are separate in shared server configuration and client/server systems running on separate machines.

Each Oracle database instance has its own set of background processes, which performs the functions for the user processes. These background processes monitor other Oracle processes for improving the performance and availability of the database for multiple users.

Background Processes Revisited

More details on the background processes are available in the following Oracle manuals on the Oracle website: Oracle Database Concepts, Oracle Database 2 Day DBA, and Oracle Database Administrator's Guide.


An Oracle database instance can have many background processes, but all of them are not always needed. When the database instance is started, these background processes are automatically created. The important background processes are given next, with brief explanations of each:

  • Database Writer process (DBWn). The database writer process (DBWn) is responsible for writing modified (dirty) buffers in the database buffer cache to disk. Although one process (DBW0) is sufficient for most systems, you can have additional processes up to a maximum of 20 processes (DBW1 through DBW9 and DBWa through DBWj) to improve the write performance on heavy online transaction processing (OLTP) systems. By moving the data in dirty buffers to disk, DBWn improves the performance of finding free buffers for new transactions, while retaining the recently used buffers in the memory.

  • Log Writer process (LGWR). The log writer process (LGWR) manages the redo log buffers by writing the redo log buffer to a redo log file on disk in a circular fashion. After the LGWR moves the redo entries from the redo log buffer to a redo log file, server processes can overwrite new entries in to the redo log buffer. It writes fast enough to disk to have space available in the buffer for new entries.

  • Checkpoint process (CKPT). Checkpoint is the database event to synchronize the modified data blocks in memory with the data files on disk. It helps to establish data consistency and allows faster database recovery. When a checkpoint occurs, Oracle updates the headers of all data files using the CKPT process and records the details of the checkpoint. The dirtied blocks are written to disk by the DBWn process.

  • System Monitor process (SMON). SMON coalesces the contiguous free extents within dictionary managed tablespaces, cleans up the unused temporary segments, and does the database recovery at instance startup (as needed). During the instance recovery, SMON also recovers any skipped transactions. SMON checks periodically to see if the instance or other processes need its service.

  • Process Monitor process (PMON). When a user process fails, the process monitor (PMON) does process recovery by cleaning up the database buffer cache and releasing the resources held by that user process. It also periodically checks the status of dispatcher and server processes, and restarts the stopped process. PMON conveys the status of instance and dispatcher processes to the network listener and is activated (like SMON) whenever its service is needed.

  • Job Queue processes (Jnnn). Job queue processes run user jobs for batch processing like a scheduler service. When a start date and a time interval are assigned, the job queue processes run the job at the next occurrence of the interval. These processes are dynamically managed, allowing the job queue clients to demand more job queue processes (J000J999) when needed. The job queue processes are spawned as required by the coordinator process (CJQ0 or CJQnn) for completion of scheduled jobs.

  • Archiver processes (ARCn). The archiver processes (ARCn) copy the redo log files to an assigned destination after the log switch. These processes are present only in databases in ARCHIVELOG mode. An Oracle instance can have up to 10 ARCn processes (ARC0ARC9). Whenever the current number of ARCn processes becomes insufficient for the workload, the LGWR process invokes additional ARCn processes, which are recorded in the alert file. The number of archiver processes is set with the initialization parameter LOG_ARCHIVE_MAX_PROCESSES and changed with the ALTER SYSTEM command.

  • Queue Monitor processes (QMNn). The queue monitor process is an optional background process that monitors the message queues for Oracle Advanced Queuing in Streams.

  • Memory Monitor process (MMON). MMON is the acronym for Memory Monitor, a new process introduced in Oracle Database 10g associated with the Automatic Workload Repository (AWR). AWR gets the necessary statistics for automatic problem detection and tuning with the help of MMON. MMON writes out the required statistics for AWR to disk on a regularly scheduled basis.

  • Memory Monitor Light process (MMNL). Memory Monitor Light (MMNL) is another new process in Oracle Database 10g; it assists the AWR with writing the full statistics buffers to disk on an as-needed basis.

Other Background Processes

The following background processes are not directly related to the processes in the preceding list, but are given here for an overview:

  • Recovery Writer process (RVWR). Recovery Writer (RVWR) is a new background process introduced in Oracle Database 10g to write flashback logs with pre-images of data blocks to disk. The location for writing the logs can be specified by DB_RECOVERY_FILE_DEST parameter.

  • ASMB process. ASM stands for "Automatic Storage Management." ASMB is the background process used to pass the necessary information to and from the Cluster Synchronization Services to manage the disk resources used by ASM. ASMB also updates statistics and maintains the heartbeat mechanism for storage management. You'll find more details on ASM in Chapter 4.

  • RBAL process. RBAL is an ASM-related process to perform the rebalancing of disks controlled by ASM. You will learn more about rebalancing operations in Chapter 4.

  • ORBn process. ORBn processes are used by the RBAL process to do the actual rebalancing operations on ASM-controlled disk recources. The total number of ARBx processes started is controlled by the ASM_POWER_LIMIT parameter, also explained in Chapter 4.

  • Change Tracking Writer process (CTWR). Change Tracking Writer (CTWR) is a new process that works with the new block changed tracking features in Oracle Database 10g. CTWR assists in fast RMAN incremental backups.

Now that you have learned about the background processes, we will go over the memory architecture.



    Oracle Database 10g Insider Solutions
    SUSE LINUX Enterprise Server 9 Administrators Handbook
    ISBN: 672327910
    EAN: 2147483647
    Year: 2006
    Pages: 214

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net