No great genius has ever existed without some touch of madness.

Tuesday 18 June 2013

RAC

IMPORTANT FACTS OF RAC

GRD(Global Resource Directory) : to record information about how resources are used within a cluster database. Lock Mastering is handled by GRD .

GCS(Global Cache Services) : implements Cache coherency .

GES(Global Enqueue Services)  : controls dictionary cache locks and library cache locks.


When 1 instance departs the cluster, the GRD portion of that instance needs to be redistributed to surviving nodes.
Similarly, when a new instance enters the cluster , the GRD portions of the existing instances must be redistributed to create the GRD portion of the new instance .
All this is done through an algorithm called LAZY REMASTERING.


Normally , when requesting a block information , oracle first check it’s own local cache , should the block not be there then it will request the RESOURCE MASTER for shared access to that block . If the blocks are in the remote node’s buffer cache then the blocks are copied via the HIS (Hgh Speed Interconnect)

  
It is strongly recommended that NETWORK TIME PROTOCOL (NTP) be configured on all cluster nodes before you install RAC but now in 11gR2 , you have Cluster Time Synchronization Service(CTSS) as part of GRID and for it to be functional you have to stop ntpd.


The ability to use ASM diskgroups for Clusterware OCR and Voting Disks is a new feature in oracle database 11gR2 GRID INFRASTRUCTURE .
The Clusterware and ASM share the same home , thus we call it GRID INFRASTRUCTURE HOME.


srvctl – manage instances and services

crsctl – manage nodes and cluster  

ocrconfig – manage ocr and voting disk


SCAN is required for oracle 11gR2 GRID INFRASTRUCTURE installation and OUI can’t complete install unless scan is defined .

SCAN can be defined in following ways
Using DNS : a single name that resolves to 3 IP addresses must be created in DNS (static)
Using GNS : instead of listening SCAN static addresses in DNS , a sub domain must be created in DNS for GNS to run i.e we will create a static virtual ip address in DNS for GNS (The node VIP and the SCAN VIP are obtained from the DHCP server when using GNS)

If u have more than 3 nodes , regardless of the number of nodes you have, there will be atmost 3 SCAN listeners .

SCAN automatically provides both FAILOVER and LOAD BALANCING .



NODE EVICTION also called as REBOOTLESS RESTART generally happens due to communication failure between the instances when the instance is not able to send heartbeat information to the control file and various other reasons.
During failure , to avoid data corruption , the failing instance evicts itself from the cluster group.The error is reported as ORA – 29740 in alert.log .

NETWORK HEARTBEAT – Each node in a cluster is pinged every second . Nodes must respond in css_misscount time (defaults to 30 sec) .  Network heartbeat failure will lead to node eviction .

DISK HEARTBEAT – Each node in a cluster “pings” (r/w) the voting disk(s) every second . Nodes must receive a response in diskTimeout time . Disk heartbeat failure will lead to node eviction .



CLUSTER INTEGRITY  and CLUSTER MEMBERSHIP is governed by  OCSSD (oracle cluster synchronization daemon)


CSS (Cluster Synchronization Services) manages cluster configuration by controlling which nodes are members and notifying members when a node joins or leaves the cluster . It has 3 separate processes :  cssdagent , cssdmonitor , ocssd



Change of CLUSTERNAME require deconfigure and reconfigure of entire cluster.



The OCR is backed up automatically every 4 hrs to <GRID_HOME> / cdata / <clustername> /  and can be restored via ocrconfig .

The Voting file is backed up into the OCR at every configuration change and can be restored via crsctl .


Ensure that UDP buffers are sized appropriately .It is applicable to all platforms except windows . Without proper buffer space allocated for UDP send and receive buffers, the performance of interconnect will suffer .(Refer ID 181489.1)



Implement OS Watcher and/or Cluster Health Monitor . It is applicable to all platforms . OS Watcher is a very simple and lightweight tool that gathers basic OS information every 30 sec. (Refer ID 301137.1)



If using NTP then implement NTP with slewing option . It is highly recommended that NTP be configured to slew time(speed up or slow down) the clock to synchronize the time to prevent node evictions.



Identify read only tables and move them to read only tablespaces .In a read only tablespace, reading from disk doesn’t involve any global cache operation , so , interconnect traffic can be reduced.