High Throughput Computing and Protein Structure Stephen E. Hamby.
Donna C. Hamby Sr. Principal Instructor Oracle University Oracle Corporation.
-
Upload
megan-farmer -
Category
Documents
-
view
219 -
download
0
Transcript of Donna C. Hamby Sr. Principal Instructor Oracle University Oracle Corporation.
Donna C. HambySr. Principal InstructorOracle UniversityOracle Corporation
Oracle9i Real Application Clusters
What Is a Cluster?
– Interconnectednodes
– Cluster software hides thestructure
– Disks availablefor read andwrite by nodeor nodesrequiring the data theycontain
Node
Disks
Interconnect
What Is Oracle9i Real Application Clusters?– Database with
instances onseparate nodes
– Physical orlogical accessto each database file
– Software controls access todata
Database files
Instance on each node
Cluster Hardware Components
– Nodes– Interconnect– Shared disk subsystem
Interprocess Communication Software
– Is the second main subcomponent of the OSD clusterware
– Controls messages across the interconnect
– Transfers messages and data blocks for Real Application Clusters
OSDClusterware
ClusterManager
Nodemonitor
IPC
OSDClusterware
ClusterManager
Nodemonitor
IPC
Disk Access
Shared disk access is required for
– Control files– Data files– Online redo log
files– A quorum (or
voting) disk on some systems
– Configuration data– Optionally, a
server parameter file (SPFILE)
Instance
OSDClusterware
Connectionsto othernodes
Disk Access
Optional features requiring shared disk access include:
– Configuration information for management tools
– Server parameter file
– Separate undo tablespace for each instance if using automatic undo management
Connectionsto othernodes
Instance
OSDClusterware
Global Services Daemon
– Coordinates with other utilities and tools to manage Real Application Clusters databases and instances
– One GSD supports all databases on a node
– Requires no configuration
OSDClusterware
Instance
GSD
Background Processes
Additional background processes for a Real Application Clusters database consist of
– LMON– LMD– LMSn– LCK– DIAG
InstanceLMS0LMON
LCK
LMD
DIAG
OSDClusterware
Global Enqueue Service Monitor
– Monitors global enqueues and resources across the cluster
– Performs recovery operations for cluster enqueues
InstanceLMS0LMON
LCK
LMD
DIAG
OSDClusterware
Global Enqueue Service Daemon
– Manages access to global enqueues and resources
– Handles resource requests from other instances
InstanceLMS0LMON
LCK
LMD
DIAG
OSDClusterware
Global Cache Service Processes
– Manage access to data blocks across the cluster
– Ship block images between the buffer caches of different instances (Cache Fusion)
InstanceLMS0LMON
LCK
LMD
DIAG
OSDClusterware
LCK Process– Assists LMSn
processes with requests for resources between instances
– Handles cache resource request that do not involve Cache Fusion: dictionary and row cache
InstanceLMS0LMON
LCK
LMD
DIAG
OSDClusterware
Diagnosability Daemon
– Captures diagnostic information related to instance process failures
– Logs information to the directory specified by BACKGROUND_DUMP_DEST
– Process cannot be configured and should not be stopped
InstanceLMS0LMON
LCK
LMD
DIAG
OSDClusterware
GSD Management– Start a GSD on all the
nodes in your Real Applications Clusters database for use by the management tools includingSRVCTLthe DBCAOEM
– Run only one GSD on each node
gsdservice -install
gsdservice -start
gsdservice -remove
gsd
Successfully started the daemon on the local node.
UNIX
Windows
Server Control Utility The Server Control Utility
(SRVCTL) – Is the preferred tool to
administer your Real Application Clusters database environment
– Manages cluster database configuration information used by several Oracle tools
– Provides cluster database management commands
– Requires the GSD to be running
Node 2
GSD
SRVCTL
Agent
Node 1
GSD
SRVCTL
Agent
SRVCTL Command Syntax
srvctl
Usage: srvctl {start|stop|status|config|add|delete|rename|move|get|set|unset} [options]
srvctl config -h
Usage: srvctl config [-p <db_name> [-n <node>]][-D <dbglvl>] [-h] [-V] -p <db_name> Show configuration for specified cluster database . . . -n <node> Only show services on named node -D <debuglvl> Debug level -h Print usage -V Show version
SRVCTL Cluster DatabaseConfiguration Tasks Modify database configuration
information– Add and delete cluster databases – Add instances to and delete instances from a
cluster database– Rename instances – Move instances– Set and unset the environment for an entire
cluster database– Set and unset instance environments
Add and Delete Databases Add database configuration information
Remove database configuration information
srvctl add db –p T2 –o $ORACLE_HOME
srvctl delete db –p T1
Add and Delete Instances
Add instance configuration information
Remove instance configuration information
srvctl add instance –p T2 –i T2N3 –n raclust3
srvctl delete instance –p T2 –i T2N1
Move and Rename Instances Move instance to new node in the static
configuration
Rename instance in the repository
srvctl move instance -p T2 -i T2N2 -n raclust1
srvctl rename instance -p T2 -i T2N2 -e T2N1
Store and Remove Environment Data
Store database-wide environment setting
Store instance-specific environment setting
Remove environment setting from single instance
srvctl set env -p T2 -t LANG=gb -i T2N1
srvctl set env -p T2 -t LANG=us
srvctl unset env -p T2 -t LANG -i T2N3
SRVCTL Cluster Database Tasks Manage cluster database components
– Start cluster databases and instances– Stop cluster databases and instances– Start and stop listeners associated with a
cluster database– Start and stop listeners associated with a
cluster database instance– Obtain the status of a cluster database
instance
Starting Databases and Instances
Start all instances and listeners
Start two named instances with their listeners
Start listener only on one node
srvctl start -p T2 –i T2N1,T2N2
srvctl start -p T2
srvctl start –p T2 –n raclust3 –s lsnr
Starting Databases and Instances Start all instances with nondefault
connect string
Start listeners and open instances with special parameter file on two nodessrvctl start -p T2 –n raclust1,raclust2 \ –o pfile=/ora/admin/initADMIN.ora
srvctl start -p T2 –c 'admin/adm1n as sysdba'
Stopping Databases and Instances Stop an instance only, not the listener
Shut down instances and listeners on three nodes using a nondefault connect stringsrvctl stop -p T2 \–n raclust2,raclust3,raclust4 \–c admin/adm1n as sysdba
srvctl stop –p T2 –i T2N3 –x lsnr
SRVCTL Cluster Database Tasks Manage cluster database components
– Start cluster databases and instances– Stop cluster databases and instances– Start and stop listeners associated with a
cluster database– Start and stop listeners associated with a
cluster database instance– Obtain the status of a cluster database
instance
Starting Databases and Instances
Start all instances and listeners
Start two named instances with their listeners
Start listener only on one nodesrvctl start -p T2 –i T2N1,T2N2
srvctl start -p T2
srvctl start –p T2 –n raclust3 –s lsnr
Starting Databases and Instances Start all instances with nondefault
connect string
Start listeners and open instances with special parameter file on two nodessrvctl start -p T2 –n raclust1,raclust2 \ –o pfile=/ora/admin/initADMIN.ora
srvctl start -p T2 –c 'admin/adm1n as sysdba'
Stopping Databases and Instances Stop an instance only, not the listener
Shut down instances and listeners on three nodes using a nondefault connect stringsrvctl stop -p T2 \–n raclust2,raclust3,raclust4 \–c admin/adm1n as sysdba
srvctl stop –p T2 –i T2N3 –x lsnr
Inspect Status of Cluster Database
List the active instances
Show the status of two instances
Display the status of the listener on one nodesrvctl status -p T2 –i T2N1,T2N4 –s inst
srvctl status -p T2
srvctl status –p T2 –n raclust2 –s lsnr
Inspect Database Configuration Information
List the instances defined for a database
List environment information for a database
List environment information for an instancesrvctl get env -p T2
srvctl config -p T2
srvctl get env -p T2 –i T2N4
Cache Fusion.
• Cache Fusion helps provide transparent scalability in a Real Application Clusters database
• The algorithms enable transportation of block images between instances
• The algorithms enable transportation of block images between instances
• Cache Fusion services track the current location and status of resources
• Directory structures within the SGA of each instance store the resource information
Cache Fusion Block Transfers:Example OverviewInstance A
1008
Instance D
Resourcemaster
Instance C
Instance B
Example 1: Read with No Transfer
Instance D
Resourcemaster
Instance CRequest toobtain a shared resource on C
N
1
1008
Instance BInstance A
Example 1: Read with No Transfer
Instance D
Resourcemaster
Instance C
N
1
1008
Instance BInstance A
2 The request is granted and the requesting instance is informed
N–>S
Example 1: Read with No Transfer
Instance A
Instance D
Resourcemaster
Instance B
Instance C
S
Read request
1
3
2 1008
Example 1: Read with No Transfer
Instance A
Instance D
Resourcemaster
Instance B
Block imagedelivered
Instance C
S
10081
2
3
4
1008
Example 2: Read to Write Transfer
Instance A
Instance D
Resourcemaster
Request to obtain an exclusive resource on B
Instance C
S
1008
Instance B
N
1
1008
Example 2: Read to Write Transfer
Instance A
Instance D
Resourcemaster
Instance C
Instruction to transferthe block to B for exclusive access
S
1008
Instance B
N
2
1
1008
Example 2: Read to Write Transfer
Instance A
Instance D
Resourcemaster
Instance CBlock and resource status (including C’s plan to close its resource)
S–>N
1008
Instance B
N
1008
2
1
3
1008
Example 2: Read to Write Transfer
Resource assumptionand status messageInstance A
Instance D
Resourcemaster
Instance C
N
1008
Instance B
N–>X
1009
2
1
3
4
1008
Example 3: Write to Write Transfer
Instance D
Resourcemaster
Instance C
Instance A
N
Instance B
X
1009
Request to obtain resource inexclusive mode
1
1008
Example 3: Write to Write Transfer
Instance C
Instance A
N
Instance B
X
1009
Instruction to transferexclusive resource to B
1
2
Instance D
Resourcemaster
1008
Example 3: Write to Write Transfer
Instance D
Resourcemaster
Instance C
Instance B
X–>N
1009
Instance A
N
1009
Exclusive-keep copy of buffer
1
2
3
1008
Example 3: Write to Write Transfer
Instance D
Resourcemaster
Instance C
Instance A
N–>X
1013
Instance B
1009
N
1
2
3
4
1008
Example 4: Write to Read Transfer
Instance A
Instance D
Resourcemaster
X
1013
Instance B
1009
N
Instance C
NRequest to obtainresource in shared mode 1
1008
Example 4: Write to Read Transfer
Instance D
Resourcemaster
Instance A
X
1013
Instance B
1009
N
Instance C
NInstruction to transfer shared resource to C
1
2
1008
Example 4: Write to Read Transfer
Instance D
Resourcemaster
Instance A
X–>S
1013
Instance B
1009
N
Instance C
N
1013
Shared-keep copy of buffer
3
2
1
1008
Example 4: Write to Read Transfer
Instance D
Resourcemaster
Instance A
S
1013
Instance B
1009
N
Resource assumptioninformation
Instance C
N–>S
1013
2
3
4
1
1008
Block Transfers in Real Application Clusters
InstanceA
Node 1
InstanceB
Node 2
Cache Fusion block transfer
Block transfer with forced disk write
Notes on Using Multiblock Locks Use only for query intensive or
already-partitioned databases GC_FILES_TO_LOCKS -Assign the same
value to for every instance in a cluster database
Leave no white space in the parameter value between the double quotes: separate the entries for each set of file IDs with a colon
Notes on Using Multiblock Locks Configure Cache Fusion, instead of
multiblock locks, for selected files by– Not including their IDs in
GC_FILES_TO_LOCKS– Setting their LOCK_COUNT to zero and
not assigning a grouping factor
Real Application Clusters Guard Architecture
Monitors
VendorCMS
IP addresses
Listeners
Oracle instance
DGM
Application ormiddleware
Monitors
VendorCMS
IP addresses
Listeners
Oracle instance
DGM
IP (A) IP (B)
NodeB
(Secondary)
NodeA
(Primary)
Pack Pack
Disk group manager, only needed on some platforms
Real Application Clusters Guard Failover
VendorCMS
IP addresses
Listeners
Oracle instance
DGM
Monitors
VendorCMS
IP addresses
Listeners
Oracle instance
DGM
Heartbeat monitor
Listener monitor
Instance monitor
NodeA
NodeB
(New primary)
Pack Pack
Application ormiddleware
IP (A) IP (B)
Failover
Monitors
Listeners
Multiple listeners enable
– Client load balancing– Connect-time
failover– Transparent
Application Failover (TAF)
Clients Cluster nodes
Listeners
TNS Connect Descriptorsrac1= (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=aaacme1) (PORT=1630)) (CONNECT_DATA= (SERVICE_NAME=rac.us.aaacme.com)))
$ sqlplus qualassur1@rac1SQL*Plus: – Production(c) Copyright 2000 Oracle Corporation. All rights reserved.Enter password:
Host-Based Failover
Detect failure by monitoring the heartbeat Reorganize cluster membership in the
Cluster Manager Transfer disk ownership from the primary
node to a secondary node Restart application and database binaries Perform application and database recovery Reestablish client connections to the
failover node
Real Application Clusters Failover Detect failure by monitoring the
heartbeat Reorganize instance membership Perform instance recovery Reestablish failed client connections
TAF in Real Application Clusters Can be used with spare nodes or with
primary/secondary instance configurations
Designed for this environment, but can be used for
– Real Application Clusters Guard– Replicated systems– Data Guard
TAF Failover Mode Options
Must add failover options manually to TNS configuration files
They are part of the CONNECT_DATA section of a connect descriptor
TAF Failover Mode Options Failover options include
– TYPE: Identify the nature of TAF, if any– METHOD: Configure how quickly failover
can occur– BACKUP: Identify an alternate net service
name– RETRIES: Limit the number of times a
reconnection will be attempted– DELAY: Specify how long to wait between
reconnection attempts
TAF Implementation
The recommended configurations for TAF include:
– Connect-time failover with client load balancing
– Retrying connections– Pre-establishing connections
Connect-Time Failover with Client Load Balancingrac.us.aaacme.com=
(DESCRIPTION= (LOAD_BALANCE=on) (FAILOVER=on) (ADDRESS= (PROTOCOL=tcp) (HOST=aaacme1) (PORT=1521)) (ADDRESS= (PROTOCOL=tcp) (HOST=aaacme2) (PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=rac.us.aaacme.com) (FAILOVER_MODE= (TYPE=select)(METHOD=basic))))
Retrying Failover Connections
rac1= (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=aaacme1) (PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=rac1.us.aaacme.com) (FAILOVER_MODE= (TYPE=select)(METHOD=basic) (BACKUP=rac2) (RETRIES=20) (DELAY=15))))
rac2= (DESCRIPTION= . . .
Preestablishing a Connection for TAF
rac1= (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=aaacme1) (PORT=1521)) (CONNECT_DATA= (SERVICE_NAME= rac.us.acme.com) (INSTANCE_NAME=rac1) (FAILOVER_MODE= (BACKUP=rac2) (TYPE=select) (METHOD=preconnect))))
rac2= (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=aaacme2) (PORT=1521)) (CONNECT_DATA= (SERVICE_NAME= rac.us.acme.com) (INSTANCE_NAME=rac2) (FAILOVER_MODE= (BACKUP=rac1) (TYPE=select) (METHOD=preconnect))))
AQ&Q U E S T I O N SQ U E S T I O N SA N S W E R SA N S W E R S