Database Reference
In-Depth Information
Load balancing can be configured on the database service using Server Control (SRVCTL), Enterprise Manager
(EM), or Oracle provided Procedural Language (PL)/SQL packages. Load balancing is based on number of sessions
or the number of resources available on the various instances. The following illustrates the current load balancing
definition for database service RAPTEST :
[oracle@prddb1 ~]$ srvctl config service -d PRDDB -s RAPTEST
Service name: RAPTEST
Service is enabled
Server pool: prddbpool1
Cardinality: UNIFORM
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: true
Failover type: SELECT
Failover method: BASIC
TAF failover retries: 135
TAF failover delay: 25
Connection Load Balancing Goal: SHORT
Runtime Load Balancing Goal: THROUGHPUT
TAF policy specification: NONE
Unlike the previous releases of RAC, starting with Oracle Database 11g Release 2, load balancing occurs out of the
box when SCAN is implemented, provided the connections are initiated from an Oracle Database 11g Release 2 client.
How do you verify if the load-balancing feature is working? The Manageability Monitor (MMON) background process
generates load advices. The advices are stored in GV$SERVICEMETRIC view and is used to communicate with the
SCAN listeners regarding the current load average. For example, the following query displays the load characteristics
as updated by MMON in GV$SERVICEMETRIC view. The view is joined with GV$INSTANCE and GV$ACTIVE_
SERVICES to obtain additional information:
Script Name: MVRACPDnTap_svcloadstats.sql
Service Time
Elapsed CPU Time DB Time
Service Instance mSec/Call mSec/Call mSec/Call Calls/sec
---------------- ---------- ------------ ---------- ---------- ---------
PRDDB PRDDB_1 0 0 0 .00
PRDDB_2 0 0 0 .00
RAPTEST PRDDB_1 18800 2829 18800 134.93
PRDDB_2 19143 2929 19143 164.47
SYS$USERS PRDDB_1 1212 1100 1212 5.99
PRDDB_2 3959 4761 3959 4.19
In the preceding output, database service RAPTESTs are balanced across both the instances in the cluster. When
a message is received by the SCAN listener regarding the current state of the instance, it redirects connections to the
local listener on the node where the least loaded instance is running.
GV$SERVICEMETRIC
GV$SERVICEMETRIC contains metric values measured for all the services defined in the database. These values are
updated by the MMON process as it captures load and other service-related information from the system global area
(SGA). Updates to this view happen in 5-second and 1-minute intervals.
 
Search WWH ::




Custom Search