You are on page 1of 21

B

Miscellaneous Topics

Copyright 2007, Oracle. All rights reserved.

Contents

Additions to Lesson 8
Additions to Lesson 10

B-2

Copyright 2007, Oracle. All rights reserved.

Load Balancing Advisory Workflow in RAC


ODP.NET/
OCI pools

JDBC
Connection Pool
Manager

6
7

ONS

Deal work
per instance

Instances for
aging

JDBC Connection Pool


5

Runtime
Connection
Load
Balancing

Connection
load
balancing
Listener
CLB_GOAL=SHORT

GOAL NONE

ONS

RACG
IMON

3
EMON

MMON
Master

AQ

Advisory
messages

MMNL

PMON

2a

AWR service metrics

Oracle RAC Database

B-3

3a

Local

Copyright 2007, Oracle. All rights reserved.

Closed Workload
BATCH work requests

Service with
a set maximum of
work requests
allowed

Set connections in pool:


#max_workers x #nodes
(Lots of spares)

Connection Cache

33%

?
33%

33%

RAC
Inst1

B-4

RAC
BATCH is
fine.

BATCH is
fine.

Inst2

Copyright 2007, Oracle. All rights reserved.

RAC
BATCH is
fine.

Inst3

Closed Workload: Steady State


BATCH work requests

Set connection load


balancing:
CLB_GOAL = LONG

Set Load Balancing


Advisory goal:
GOAL NONE
Connection Cache

33%

?
33%

33%

RAC
Inst1

B-5

RAC
BATCH is
fine.

BATCH is
fine.

Inst2

Copyright 2007, Oracle. All rights reserved.

RAC
BATCH is
fine.

Inst3

Closed Workload: More Work


CLB_GOAL = LONG

GOAL NONE

BATCH work requests


Max reached
(in this case)

Non-BATCH
work requests

Non-BATCH
work requests

Connection Cache

33%

?
33%

33%

RAC
Inst1

B-6

RAC
BATCH is
very busy.

BATCH is
fine.

Inst2

Copyright 2007, Oracle. All rights reserved.

RAC
BATCH is
busy.

Inst3

Closed Workload: Reaction


CLB_GOAL = LONG

BATCH work requests

GOAL NONE

Use Load Balancing


Advisory only to distribute
work in the pool.

Connection Cache

10%

?
30%

60%

RAC
Inst1

B-7

RAC
BATCH is
very busy.

BATCH is
fine.

Inst2

Copyright 2007, Oracle. All rights reserved.

RAC
BATCH is
busy.

Inst3

Open Workload
CLB_GOAL = LONG

CRM work requests

GOAL NONE
Set connections in pool:
reasonable
(based on RAC capacity)

Service with
NO set maximum of
work requests

Connection Cache

33%

?
33%

33%

RAC
Inst1

B-8

RAC
CRM is
fine.

CRM is
fine.

Inst2

Copyright 2007, Oracle. All rights reserved.

RAC
CRM is
fine.

Inst3

Open Workload: Steady State


CRM work requests

Set connection load


balancing:
CLB_GOAL = SHORT

Set Load Balancing


Advisory goal:
GOAL NONE
Connection Cache

33%

?
33%

33%

RAC
Inst1

B-9

RAC
CRM is
fine.

CRM is
fine.

Inst2

Copyright 2007, Oracle. All rights reserved.

RAC
CRM is
fine.

Inst3

Open Workload: More Work


CLB_GOAL = SHORT

CRM work requests

GOAL NONE

Non-CRM
work requests

Non-CRM
work requests

Connection Cache

33%

?
33%

33%

RAC
Inst1

B - 10

RAC
CRM is
very busy.

CRM is
fine.

Inst2

Copyright 2007, Oracle. All rights reserved.

RAC
CRM is
busy.

Inst3

Open Workload: Reaction


CLB_GOAL = SHORT

CRM work requests

GOAL NONE

Use Load Balancing


Advisory at two levels.

Connection Cache

10%

?
30%

60%

Gravitation

RAC
Inst1

B - 11

RAC
CRM is
very busy.

CRM is
fine.

Inst2

Copyright 2007, Oracle. All rights reserved.

RAC
CRM is
busy.

Inst3

OCR-Related Tools Debugging

OCR tools:

ocrdump
ocrconfig
ocrcheck
srvctl

Logs generated in
$ORA_CRS_HOME/log/<hostname>/client/

Debugging control through


$ORA_CRS_HOME/srvm/admin/ocrlog.ini
mesg_logging_level = 5
comploglvl="OCRAPI:5 ; OCRSRV:5; OCRCAC:5; OCRMAS:5; OCRCONF:5; OCRRAW:5"
comptrclvl="OCRAPI:5 ; OCRSRV:5; OCRCAC:5; OCRMAS:5; OCRCONF:5; OCRRAW:5"

B - 12

Copyright 2007, Oracle. All rights reserved.

Enable Resource Debugging

Change USR_ORA_DEBUG resource attribute to 1 for


specific resources:
# crsctl debug log res "ora.atlhp8.vip:1"

Set the environment variable _USR_ORA_DEBUG to 1 in


racgwrap scripts to debug for all resources:
# Set _USR_ORA_DEBUG to enable more tracing
#_USR_ORA_DEBUG=1 && export _USR_ORA_DEBUG
_USR_ORA_DEBUG=1
export _USR_ORA_DEBUG
$ORACLE_HOME/bin/racgmain "$@
status=$?
exit $status
B - 13

Copyright 2007, Oracle. All rights reserved.

Enable Oracle Clusterware Modules Debugging


crsctl
lsmodule

debug

log
crs

css

trace

statedump

evm

$ crsctl lsmodules crs


The following are the CRS modules :
CRSUI
CRSCOMM CRSRTI
CRSMAIN
CRSCOMM CRSOCR
CRSTIMER CRSEVT
COMMCRS COMMNS

CRSPLACE
CRSD

CRSAPP
CLUCLS

CRSRES
CSSCLNT

# crsctl debug log crs CRSEVT:5,CRSAPP:5,CRSTIMER:5,CRSRES:5

B - 14

Copyright 2007, Oracle. All rights reserved.

Enable Tracing for Java-Based Tools


To enable tracing for:
cluvfy
netca
vipca

srvctl
gsdctl

Set SRVM_TRACE to TRUE:


$ export SRVM_TRACE=TRUE
$ srvctl config database d xwkE > /tmp/srvctl.trc
$ cat /tmp/srvctl.trc
/u01/app/oracle/product/Crs/jdk/jre/bin/java -classpath
/u01/app/oracle/product/Crs/jlib/netcfg.jar:
srvctl.jar -DTRACING.ENABLED=true -DTRACING.LEVEL=2
oracle.ops.opsctl.OPSCTLDriver config database -d xwkE
[main] [9:47:27:454] [OPSCTLDriver.setInternalDebugLevel:165]
tracing is true at level 2 to file null
[main] [9:47:27:496] [OPSCTLDriver.<init>:95] Security manager
is set

B - 15

Copyright 2007, Oracle. All rights reserved.

RAC Diagnostic Infrastructure: Overview


Node2
SGA
Trace buffer Pi
Pi
Trace buffer Pj
Pj
DIAG

Online tools

x$trace
x$trace_events
oradebug
alter tracing
alter system set

Node1

Node2

Node3

SGA

SGA

SGA

DIAG

DIAG

DIAG
Offline tools

Trace navigation
Trace loader

B - 16

Copyright 2007, Oracle. All rights reserved.

DIAG Trace Control Interfaces

Initialization parameter TRACE_ENABLED


SQL:
X$TRACE_EVENTS and X$TRACE
ALTER TRACING ON|OFF|ENABLE|DISABLE|FLUSH
ALTER SYSTEM SET

oradebug:
RAC aware
Clusterwide hang analyzer
System and process state dumps

B - 17

Copyright 2007, Oracle. All rights reserved.

DIAG Crash Dumps

Crash dump (clusterwide) by DIAG processes when


detecting the death of a fatal Oracle process:
Local system state dump
Remote SGA buffers dump

If a RAC instance crashes:


Second last process to terminate
Allowed to dump trace

Local DIAG coordinates dumping of trace buffers on


remote nodes.
Dumps in the cdmp_<timestamp> directory under
background dump destination

B - 18

Copyright 2007, Oracle. All rights reserved.

DIAG Trace Control Interface: Examples


SQL> alter tracing enable "10425:10:135";

SQL> SELECT trclevel,status,procs FROM x$trace_events


2> WHERE event=10425;

SQL> alter tracing disable "ALL";

SQL> alter tracing flush;

SQL> oradebug setmypid


Statement processed.
SQL> oradebug setinst all
Statement processed.
SQL> oradebug -g def hanganalyze 3
Hang Analysis in

/u01/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_diag_11347.trc

SQL>

B - 19

Copyright 2007, Oracle. All rights reserved.

Hang Analysis with 11gR1: Example


$ sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Nov 2 22:51:24 2007
Copyright (c) 1982, 2007, Oracle.

All rights reserved.

SQL> set _prelim on


SQL> connect / as sysdba
Prelim connection established
SQL> oradebug setorapname reco
Oracle pid: 19, Unix process pid: 11381, image:
oracle@edcdr12p1.us.oracle.com (RECO)
SQL> oradebug dump hanganalyze_global 1
Statement processed.
SQL> oradebug dump systemstate_global 267
Statement processed.
SQL> oradebug setorapname diag
Oracle pid: 4, Unix process pid: 11347, image:
oracle@edcdr12p1.us.oracle.com (DIAG)
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/racdb1/racdb11/trace/racdb11_diag_11347.trc
SQL>

B - 20

Copyright 2007, Oracle. All rights reserved.

New 11gR1 Background Processes


Background
Process Name

Short Description

ACMS

Ensure distributed SGA memory updates

DBRM

DataBase Resource Manager

DIAG

Performs diagnostic dumps

DIA0

Hang detection and deadlock resolution

EMNC

Event management and notifications coordination

GTXn

Provides XA support in RAC

KATE

ASM metafile proxy

MARK

Mark AU as stale when disk goes offline

PING

Measure interconnect latency

VKTM

Provides clock information in RAC

B - 21

Copyright 2007, Oracle. All rights reserved.

You might also like