Tuesday, August 12, 2008

Basic Oracle Database Background Processes

To maximize performance and accommodate many users, a multiprocess Oracle Database system uses background processes. Background processes consolidate functions that would otherwise be handled by multiple database programs running for each user process. Background processes asynchronously perform I/O and monitor other Oracle Database processes to provide increased parallelism for better performance and reliability.

The table below describes the basic Oracle Database background processes. The use of additional database server features or options can cause more background processes to be present. For example, when you use Advanced Queuing, the queue monitor (QMNn) background process is present.

Process Name

Description

Database writer (DBWn)

The database writer writes modified blocks from the database buffer cache to the datafiles. Oracle Database allows a maximum of 20 database writer processes (DBW0-DBW9 and DBWa-DBWj). The DB_WRITER_PROCESSES initialization parameter specifies the number of DBWn processes. The database selects an appropriate default setting for this initialization parameter or adjusts a user-specified setting based on the number of CPUs and the number of processor groups.

Log writer (LGWR)

The log writer process writes redo log entries to disk. Redo log entries are generated in the redo log buffer of the system global area (SGA). LGWR writes the redo log entries sequentially into a redo log file. If the database has a multiplexed redo log, then LGWR writes the redo log entries to a group of redo log files.

Checkpoint (CKPT)

At specific times, all modified database buffers in the system global area are written to the datafiles by DBWn. This event is called a checkpoint. The checkpoint process is responsible for signalling DBWn at checkpoints and updating all the datafiles and control files of the database to indicate the most recent checkpoint.

System monitor (SMON)

The system monitor performs recovery when a failed instance starts up again. In an Oracle Real Application Clusters database, the SMON process of one instance can perform instance recovery for other instances that have failed. SMON also cleans up temporary segments that are no longer in use and recovers dead transactions skipped during system failure and instance recovery because of file-read or offline errors. These transactions are eventually recovered by SMON when the tablespace or file is brought back online.

Process monitor (PMON)

The process monitor performs process recovery when a user process fails. PMON is responsible for cleaning up the cache and freeing resources that the process was using. PMON also checks on the dispatcher processes (described later in this table) and server processes and restarts them if they have failed.

Archiver (ARCn)

One or more archiver processes copy the redo log files to archival storage when they are full or a log switch occurs.

Recoverer (RECO)

The recoverer process is used to resolve distributed transactions that are pending because of a network or system failure in a distributed database. At timed intervals, the local RECO attempts to connect to remote databases and automatically complete the commit or rollback of the local portion of any pending distributed transactions.

Dispatcher (Dnnn)

Dispatchers are optional background processes, present only when the shared server configuration is used.

Global Cache Service (LMS)

In an Oracle Real Application Clusters environment, this process manages resources and provides inter-instance resource control.

V$BGPROCESS displays information about the background processes.

select * from V$BGPROCESS; --Oracle 10gR2ee

PADDR

PSERIAL#

NAME

DESCRIPTION

ERROR

00

0

ARB0

ASM Rebalance 0

0

00

0

ARB1

ASM Rebalance 1

0

00000007B772D4D0

1

ARC0

Archival Process 0

0

00000007BE71AC18

1

ARC1

Archival Process 1

0

00

0

ASMB

ASM Background

0

00000007B96EA648

1

CJQ0

Job Queue Coordinator

0

00000007B86F0380

1

CKPT

checkpoint

0

00

0

CTWR

Change Tracking Writer

0

00000007B772BD18

1

DBW0

db writer process 0

0

00000007BE719460

1

DBW1

db writer process 1

0

00

0

DBW2

db writer process 2

0

00

0

DIAG

diagnosibility process

0

00

0

DMON

DG Broker Monitor Process

0

00

0

EMN0

Event Monitor Process 0

0

00

0

FMON

File Mapping Monitor Process

0

00

0

GMON

diskgroup monitor

0

00

0

INSV

Data Guard Broker INstance SlaVe Process

0

00

0

LCK0

Lock Process 0

0

00000007B96E9E60

1

LGWR

Redo etc.

0

00

0

LMD0

global enqueue service daemon 0

0

00

0

LMON

global enqueue service monitor

0

00

0

LMS0

global cache service process 0

0

00

0

LNS0

Network Server 0

0

00

0

LNS1

Network Server 1

0

00

0

LSP0

Logical Standby

0

00

0

LSP1

Dictionary build process for Logical Standby

0

00

0

LSP2

Set Guard Standby Information for Logical Standby

0

00000007B86EFB98

1

MMAN

Memory Manager

0

00000007B772CCE8

1

MMNL

Manageability Monitor Process 2

0

00000007B86F0B68

1

MMON

Manageability Monitor Process

0

00

0

MRP0

Managed Standby Recovery

0

00

0

NSV0

Data Guard Broker NetSlave Process 0

0

00000007BE718C78

1

PMON

process cleanup

0

00000007B96E9678

1

PSP0

process spawner 0

0

00000007B86F2B08

3

QMNC

AQ Coordinator

0

00

0

RBAL

ASM Rebalance master

0

00000007BE719C48

1

RECO

distributed recovery

0

00

0

RSM0

Data Guard Broker Resource Guard Process 0

0

00

0

RSM1

Data Guard Broker Resource Guard Process 1

0

00

0

RVWR

Recovery Writer

0

00000007B772C500

1

SMON

System Monitor Process

0

No comments:

Post a Comment