Oracle RAC Background processes

RAC Background Processes:
1. Lock Monitor Processes ( LMON)
2. Lock Monitor Services (LMS)
3. Lock Monitor Daemon Process ( LMD)
4. LCKn ( Lock Process)
5. DIAG (Diagnostic Daemon)
1. Lock Monitor Processes ( LMON)
It Maintains GCS memory structures.
Handles the abnormal termination of processes and instances.
Reconfiguration of locks & resources when an instance joins or leaves the cluster are handled by LMON ( During reconfiguration LMON generate the trace files)
It responsible for executing dynamic lock remastering every 10 mins ( Only in 10g R2 & later versions).
LMON Processes manages the global locks & resources.
It monitors all instances in cluster, primary for dictionary cache locks,library cache locks & deadlocks on deadlock sensitive on enqueue & resources.
LMON also provides cluster group services.
Also called Global enqueue service monitor.
2. Lock Monitor Services (LMS)
LMS is most very active background processes.
Consuming significant amount of CPU time. ( 10g R2 - ensure that LMS process does not encounter the CPU starvation).
Its primary job is to transport blocks across the nodes for cache-fusion requests.
If there is a consistent-read request, the LMS process rolls back the block, makes a Consistent-Read image of the block and then ship this block across the HSI (High Speed Interconnect) to the process requesting from a remote node.
LMS must also check constantly with the LMD background process (or our GES process) to get the lock requests placed by the LMD process.
Each node have 2 or more LMS processes.
GCS_SERVER_PROCESSES --> no of LMS processes specified in init. ora parameter.
Above parameter value set based on number of cpu's ( MIN(CPU_COUNT/2,2))
10gR2, single CPU instance,only one LMS processes started.
Increasing the parameter value,if global cache activity is very high.
Also called the GCS (Global Cache Services) processes.
Internal View: X$KJMSDP
3. Lock Monitor Daemon Process ( LMDn)
LMD process performs global lock deadlock detection.
Also monitors for lock conversion timeouts.
Also sometimes referred to as the GES (Global Enqueue Service) daemon since its job is to manage the global enqueue and global resource access.
LMD process also handles deadlock detection and remote enqueue requests.
Remote resource requests are the requests originating from another instance.
Internal View: X$KJMDDP
4. LCKn ( Lock Process)
Manages instance resource requests & cross instance calls for shared resources.
During instance recovery,it builds a list of invalid lock elements and validates lock elements.
5. DIAG (Diagnostic Daemon)
Oracle 10g - this one new background processes ( New enhanced diagnosability framework).
Regularly monitors the health of the instance.
Also checks instance hangs & deadlocks.
It captures the vital diagnostics data for instance & process failures.
I Hope this article helped to you. Suggestions are welcome.
Regards
Rajabaskar Thangaraj
WWW.dbarajabaskar.blogspot.com
- rajabaskar's blog
- Login to post comments

Checking RAC instance status - RAC or not RAC.
I use the following at the OS level to check to see if an instance is a RAC instance:
ps -ef|grep $ORACLE_SID |grep lms|wc -l
or
crs_statw|grep $ORACLE_SID|wc -l
Do you know of a better way to check from the OS if an instance is a RAC instance?
Regards,
Mike
==============
crs_statw is as follows:
$ cat crs_statw #!/usr/bin/ksh # # Sample 10g CRS resource status query script # Modified for Solaris 5.10 # # Description: # - Returns formatted version of crs_stat -t, in tabular # format, with the complete rsc names and filtering keywords # - The argument, $RSC_KEY, is optional and if passed to the script, will # limit the output to HA resources whose names match $RSC_KEY. # Requirements: # - $ORA_CRS_HOME will be set by this script by detecting in inittab. # # Detect and set the CRS home if it exist. export ORACLE_VER=`echo $ORACLE_HOME|cut -d\/ -f6|sort -u|sed 's/\.//g'` crs_init=`grep init.cssd /etc/inittab|cut -d: -f4|cut -d" " -f1` if [ -n "$crs_init" ] ; then crs_home=`grep ORA_CRS_HOME= $crs_init|cut -d= -f2` CRS_HOME=$crs_home ; ORA_CRS_HOME=$CRS_HOME ; export CRS_HOME ORA_CRS_HOME unset crs_init crs_home else unset CRS_HOME ORA_CRS_HOME crs_init crs_home fi if [ ! -f $ORA_CRS_HOME/bin/crs_stat ] ; then echo "CRS Home detected as the ASM home. However, most RAC srvctl related commands are not supported." $ORA_CRS_HOME/bin/crsctl check cssd result=$? exit $result fi # Get a quick status of CRS and terminate if there is a problem $ORA_CRS_HOME/bin/crs_stat > /dev/null result=$? ; if [ $result -ne 0 ] ; then exit $result ; fi RSC_KEY=$1 QSTAT=-u AWK=/usr/xpg4/bin/awk # if not available use /usr/bin/awk # Table header:echo "" $AWK \ 'BEGIN {printf "%-45s %-10s %-18s\n", "HA Resource", "Target", "State"; printf "%-45s %-10s %-18s\n", "-----------", "------", "-----";}' # Table body: $ORA_CRS_HOME/bin/crs_stat $QSTAT | $AWK \ 'BEGIN { FS="="; state = 0; } $1~/NAME/ && $2~/'$RSC_KEY'/ {appname = $2; state=1}; state == 0 {next;} $1~/TARGET/ && state == 1 {apptarget = $2; state=2;} $1~/STATE/ && state == 2 {appstate = $2; state=3;} state == 3 {printf "%-45s %-10s %-18s\n", appname, apptarget, appstate; state=0;}' exit 0