Sunday, October 7, 2012

CLUSTER COMPONENTS




OHASD - Oracle High Availability Services Daemon:
-          It is the first and only daemon which is going to start by parent init process and in turn it is responsible for starting some other agents & daemon by reading OLR (oracle local registry file)
-          It needs access to OLR file that contains the startup sequence of other child daemons.

CSRD – Cluster Ready Services Daemon:
-          It is responsible for maintain the cluster configuration and HA (High availability) operations by reading the OCR file (oracle cluster registry)
-          OCR file contains the complete cluster information which is required for CRSD Daemon.

CSSD – Cluster Synchronization Services Daemon:
-          It is responsible for updating node membershIP of all the nodes within the cluster into VD (Voting Disk)
-          In Non-RAC environment, CSSD daemon is responsible for maintaining the communication between ASM instance and ASM Clients database instances.

VD – Voting Disk:
-          It consist the updated information of all the cluster nodes.
-          Both OCR & VD requires 280 MB of space

EVMP – Event Manager Daemon:
It is responsible for publishing & subscribing the events which are generated by CRSD Daemon to the other nodes


OCTSSD – Oracle Cluster Time Synchronization Services Daemon:
-          It is responsible for maintaining the consistency in time
-          It has two modes
o    Observer : if NTP (network time protocol) is enabled
o    Active : if NTP is disabled

GMNPD

GSD: From 10g it is duplicated, it is responsible for performing the administrative tasks whenever GUI application like NETCA or DBCA invoked.

ONS – Oracle Notification Server: It is responsible for publishing the notification events thru FAN (Fast Application Notifications)

VIP – Virtual IP:
-          It is registered as a resource into OCR and maintained the status into OCR.
-          For Release 2 onwards, we require every node specific one private IP in one subnet mask and one public IP & VIP on other subnet mask and 3 unused scan VIP’s on the same subnet mask of public.


Saturday, October 6, 2012

RAC Architecture




Non RAC Specific
Parameters
RAC Specific
Parameters
MMON
LMSN – Global cache service process
SMON
LMON – Global Enqueue Server Monitor
PMON
LMD – Global Enqueue service Daemon
CKPT
LCK – Lock Process
LGWR
DIAG - Diagnostic
DBWR

RECO

ARCH

MMAN

MMNL


Private Interconnect: It is a high bandwidth & low latency communication setup used for transferring cluster specific heartbeat messages.
In RAC environment, cluster Interconnect can also be used for some high level operations like:
1.       Used for indentifying the health, status and message synchronization between all the nodes of the cluster.
2.       Used for maintaining the global resource lock request within the cluster.
3.       Heavily used for transferring the oracle data blocks from one instance buffer cache to other instance buffer cache.
4.       The more the inter instance update will increase more traffic on the network, that’s why is it recommended to have high bandwidth for the cluster interconnect and that could be vendor specific

Global Resource Directory- GRD:
1.       It is new memory component and is a part of shared pool and we can find only in RAC specific instances.
2.       Oracle automatically maintains GRD consistency among all the nodes of the cluster
3.       GRD maintains metadata information of the blocks which are present in database buffer cache(DBBC)
4.       GRD Information like:
a.        SCN #
b.       DBA- Data Block Address/ Data Block Identifier
                                                               i.      It is a combination of file id + block id
c.        Location of the most recent version of the block.
d.       Mode of the block:
                                                               i.      NULL(N) : It indicates that no access rights are available and the block can be accessed locally
                                                              ii.      SHARED (S): it indicates that access rights are available and block can be accessible by multiple instances.
                                                            iii.      EXCLUSIVE(X): It indicates that block can be accessible by only one instance exclusively, basically during DML operations.
e.       Role of the block:
                                                               i.      LOCAL(L): It indicates that the block image is present in only one instance
                                                              ii.      GLOBAL (G): it indicates that the block image is present in multiple instances.
f.         Type of the block image:
                                                               i.      Current (CURR)
                                                              ii.      Consistent read (CR)
                                                            iii.      Past image (PI)


GRD Example:

SCN#
DBA
Location
Mod of the block
Role of the block
Type of the image
U1 (user1 : Select statement from instance 1) N1 (node1)
125
1521
(fileid:15, block id:21)
N1 – Node1
Null (N)
Local (L)
CURR
U1 (User1: issued an update statement)
128
1521
N1
N à X
Null to exclusive mode
L
PI-Past image

CURR à CR

Cache fusion
U2(user2: update statement on same table form node2)
135
1521
N2
XàSàX
G
CURRà CR
               
GRD internally maintains by coordinating GES & GCS.

 Global Enqueue Service – GES: It coordinates with global resource lock request and non cache (other the DBBC) fusion by using LMC & LCK background processes

 Global Cache Services – GCS: It coordinates with cache fusion operations with the help of LSMn background process

Cache Fusion:
-          It is the process of transferring the available data blocks from one instance to buffer cache to another instance buffer cache
-          It is to avoid more costly hardware intensive disk I/O.
o    Disk read à millisecond
o    Cache read à nanosecond
-          It has two phases:
o    Cache fusion phase1 was supported with oracle8i, OPS for only read operations, still I/O has to happen for DML operations
o    From 9i, RAC onwards cache fusion phase2 was introduced for both data read & DML operations.

LMSn – Global Cache Service Process:
-          It is responsible for transferring the data blocks from 1 instance to another instance buffer cache.
-          This process can be controlled by the parameter “GCS_SERVER_PROCESSES”
GCS_SERVER_PROCESSES   = 1 (Default)
                                                = 10 (9.2)
                                                = 20 (10.1)
                                                = 36 (10.2) [0-9 & a-z]
               
Note: Cache fusion operations we can call It as cache coherent technique or soft ping where as disk read we can call as hard ping.

LMON - Global Enqueue Server Monitor:
-          It is responsible for maintaining the consistency for GRD among all the instance of a database
-          It is also responsible for GRD recovery for the failed instance.

LMD – Global Enqueue Service Daemon:
-          It is responsible for maintaining global resource lock requests i.e... Requests for the resource which are coming from the other instances. It will process them and maintain a queue

LCK – Lock Process: It is responsible for non cache fusion operations

DIAG: It is responsible for updating the diagnostic information in alert log files & trace files whenever server process or any other background processes need diagnosis.

Hardware / Software Requirement for RAC



Hardware Req. for RAC Setup: Requirement for RHEL 5.3
1.       Minimum P-IV processor
2.       Minimum 1.5 GB RAM for cluster on each node
3.       2 NIC Cards (1st – private network, 2nd – Public network)
4.       Shared Storage (SAN/NAS/ISCSI)
5.       Secondary Storage (Internal HDD)

Mount Point
Min Requirement
Recommended
/
1 GB
2-3 GB
/var
300 MB
1 GB
/tmp
1 GB
2-3 GB
/boot
100 MB
512 MB
/usr
3 GB
5-6 GB
/swap
Double the RAM
Double the RAM
/grid (To store Grid infrastructure)
2-4 GB
5-6 GB
/oraeng (To store RDBMS s/w)
4 GB
6-8 GB
/opt
-
-
/disk1 (optional)
-
-
/disk2(optional)
-
-
/disk3(optional)
-
-

Software Requirements:
1.       Same version & bit architecture (32-bit/64-bit) of o/s on all the nodes
a.        64-bit à 32 bit/64 bit
b.       32-bit à32 bit
2.       Same version of Clusterware s/w on all the nodes
3.       Same or lower version of RDBMS software on all the nodes


Types of Storage:


Types of Storage:

NAS: Network Attached Storage: It supports file level I/O


SAN – Storage Area Network


NAS
SAN
S à Ö
S à Ö
P à ´
P à Ö
Aà Ö
Aà Ö
Mà Ö
Mà Ö





ISCSI – Internal Small Computer System Interface


I/O performance: NAS < ISCSI < SAN