01_Architecture_JFV14

Document Sample
01_Architecture_JFV14 Powered By Docstoc
					Architecture and Concepts

Copyright © 2005, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following: • List the various components of Cluster Ready Services (CRS) and Real Application Clusters (RAC) • Describe the various types of files used by a RAC database • Describe the various techniques used to share database files across a cluster • Describe the purpose of using services with RAC

1-2

Copyright © 2005, Oracle. All rights reserved.

Complete Integrated Cluster Ware
9i RAC
Applications System Management

10g RAC
Applications/RAC Services framework Cluster control/Recovery APIs Automatic Storage Management Messaging and Locking Membership Connectivity Hardware/OS kernel Management APIs Event Services

Cluster control

Event Services
1-3

Volume Manager file system
Messaging and Locking Membership Connectivity Hardware/OS kernel

Copyright © 2005, Oracle. All rights reserved.

RAC Software Principles
Node1 Instance1 Cache …
LMON LMD0 LMSx LCK0 DIAG

Cluster

Noden Instancen Cache …
LMON LMD0 LMSx LCK0 DIAG

Global resources

Cluster Ready Services CRSD & RACGIMON
EVMD OCSSD & OPROCD Applications
ASM, DB, Services, OCR VIP, ONS, EMD, Listener

Cluster interface Global management:
SRVCTL, DBCA, EM

Cluster Ready Services CRSD & RACGIMON
EVMD OCSSD & OPROCD Applications
ASM, DB, Services, OCR VIP, ONS, EMD, Listener

1-4

Copyright © 2005, Oracle. All rights reserved.

RAC Software Storage Principles
Node1 Instance1 CRS home Oracle home
Local storage

Noden

Node1 Instance1

Noden

…

Instancen CRS home Oracle home
Local storage

…

Instancen

Local storage

Local storage

Voting file OCR file Shared storage

Voting file OCR file CRS home

Oracle home
Shared storage

Permits online patch upgrades Software not a single point of failure
1-5 Copyright © 2005, Oracle. All rights reserved.

OCR Architecture

Node1 OCR cache

Node2 OCR cache

Node3 OCR cache

OCR process Client process Shared storage

OCR process

OCR process Client process

OCR file

1-6

Copyright © 2005, Oracle. All rights reserved.

RAC Database Storage Principles

Node1
Instance1 Archived log files
Local storage

…

Noden Instancen Archived log files
Local storage

Undo tablespace files for instance1 Online redo log files for instance1

Data files Temp files Control files Flash recovery area files Change tracking file SPFILE Shared storage

Undo tablespace files for instancen Online redo log files for instancen

1-7

Copyright © 2005, Oracle. All rights reserved.

RAC and Shared Storage Technologies
•

Storage is a critical component of grids:
– Sharing storage is fundamental – New technology trends

•

Supported shared storage for Oracle grids:
– Network Attached Storage – Storage Area Network

•

Supported file systems for Oracle grids:
– Raw volumes – Cluster file system – ASM

1-8

Copyright © 2005, Oracle. All rights reserved.

Oracle Cluster File System
• • • •

Is a shared disk cluster file system for Linux and Windows Improves management of data for RAC by eliminating the need to manage raw devices Provides open solution on the operating system side (Linux) free and open source Can be downloaded from OTN:
http://oss.oracle.com/software

1-10

Copyright © 2005, Oracle. All rights reserved.

Automatic Storage Management
• • • • •

Portable and high-performance cluster file system Manages Oracle database files Data spread across disks to balance load Integrated mirroring across disks Solves many storage management challenges

Application Database File system Volume manager

ASM

Operating system

1-11

Copyright © 2005, Oracle. All rights reserved.

Raw or CFS?
•

Using CFS:
– – – – Simpler management Use of OMF with RAC Single Oracle software installation Autoextend

•

Using raw:
– Performance – Use when CFS not available – Cannot be used for archivelog files (on UNIX)

1-12

Copyright © 2005, Oracle. All rights reserved.

Typical Cluster Stack with RAC
Servers Interconnect
High-speed Interconnect: Gigabit Ethernet UDP Oracle CRS RAC Linux, UNIX, Windows ASM RAC Linux Windows OCFS RAC Linux Windows RAW Proprietary Proprietary OS C/W

RAC AIX, HP-UX, Solaris ASM RAW CFS OS CVM

Database shared storage
1-13 Copyright © 2005, Oracle. All rights reserved.

RAC Certification Matrix

1. Connect and log in to http://metalink.oracle.com 2. Click the Certify and Availability button on the menu frame 3. Click the View Certifications by Product link 4. Select Real Application Clusters 5. Select the correct platform

1-14

Copyright © 2005, Oracle. All rights reserved.

The Necessity of Global Resources
SGA1 SGA2 SGA1 1008 SGA2

1008
1

1008
2

SGA1 1009

SGA2 1008

SGA1 1009

SGA2

Lost updates!
1008
4

1008
3

1-15

Copyright © 2005, Oracle. All rights reserved.

Global Resources Coordination
Node1 Instance1 GRD Master …
LMON LMD0 LMSx LCK0 DIAG

Cluster
Cache
GES GCS

Noden Instancen GRD Master …
GES GCS

Global resources Interconnect

Cache

LMON LMD0 LMSx LCK0 DIAG

Global Resource Directory (GRD) Global Cache Service (GCS) Global Enqueue Service (GES)

1-16

Copyright © 2005, Oracle. All rights reserved.

Global Cache Coordination: Example
Node1 Instance1 Cache …
LMON LMD0 LMSx LCK0 DIAG 2
Block mastered by instance one

Cluster

Node2 Instance2

1009

3

1009 Cache …
LMON LMD0 LMSx LCK0 DIAG 1
Which instance masters the block?

4

Instance two has the current version of the block

GCS

1008

No disk I/O

1-17

Copyright © 2005, Oracle. All rights reserved.

Write to Disk Coordination: Example
Node1 Instance1 Cache …
LMON LMD0 LMSx LCK0 DIAG 1
Need to make room in my cache. Who has the current version of that block?

Cluster

Node2 Instance2 1010 Cache …
LMON LMD0 LMSx LCK0 DIAG 2
Instance two owns it. Instance two, flush the block to disk

1009

3

5

4

Block flushed, make room

GCS

1010

Only one disk I/O

1-18

Copyright © 2005, Oracle. All rights reserved.

RAC and Instance/Crash Recovery
Use information for other caches

Remaster enqueue resources
1

Remaster cache resources
2

LMON recovers GRD

SMON recovers the database

Build recovery set
3 Merge failed redo threads

Resource claim
4

Roll forward recovery set
5

Recovery time
1-19 Copyright © 2005, Oracle. All rights reserved.

Instance Recovery and Database Availability
Full
A 5 G H

Partial

B 2 4 1 2 D 3 E

F

None

C

Elapsed time

1-21

Copyright © 2005, Oracle. All rights reserved.

Efficient Inter-Node Row-Level Locking
UPDATE UPDATE

1

2

Node1 Instance1

Node2 Instance2

Node1 Instance1

Node2 Instance2

COMMIT

No block-level lock
Node2 Instance2 Node1 Instance1

UPDATE

Node1 Instance1
4

Node2 Instance2
3

1-22

Copyright © 2005, Oracle. All rights reserved.

Additional Memory Requirement for RAC
•

Heuristics for scalability cases:
– 15% more shared pool – 10% more buffer cache

•

•

Smaller buffer cache per instance in the case of single-instance workload distributed across multiple instances Current values:

SELECT resource_name, current_utilization,max_utilization FROM v$resource_limit WHERE resource_name like 'g%s_%';

1-23

Copyright © 2005, Oracle. All rights reserved.

Parallel Execution with RAC

Execution slaves have node affinity with the execution coordinator, but will expand if needed.

Node 1

Node 2

Node 3

Node 4

Execution coordinator

Shared disks

Parallel execution server

1-24

Copyright © 2005, Oracle. All rights reserved.

Global Dynamic Performance Views
• • • • Store information about all started instances One global view for each local view Use one parallel slave on each instance Make sure that PARALLEL_MAX_SERVERS is big enough
Cluster
Node1 Instance1

GV$INSTANCE

Noden Instancen

V$INSTANCE

V$INSTANCE

1-25

Copyright © 2005, Oracle. All rights reserved.

RAC and Services
Application server
ERP
Run-time load balancing Service location transparency

CRM Modify service to instance mapping

Service connections

Listeners
Connection load balancing Service availability aware

RAC Instances ERP CRM ERP CRM
Backup Priority Alerts Tuning

ERP CRM

ERP CRM

CRS
Up and down events notification engine Restart failed components

1-26

Copyright © 2005, Oracle. All rights reserved.

Virtual IP Addresses and RAC
clnode-1 clnode-2 clnode-1vip

clnode-2vip
2

Clients

2

ERP=(DESCRIPTION= 4 1 ((HOST=clusnode-1)) ((HOST=clusnode-2)) 6 (SERVICE_NAME=ERP)) Timeout 5 wait
7

ERP=(DESCRIPTION= 5 1 ((HOST=clusnode-1vip)) ((HOST=clusnode-2vip)) 6 (SERVICE_NAME=ERP))
7

3

3

clnode-1 clnode-2

clnode-2vip
4 clnode-1vip

1-27

Copyright © 2005, Oracle. All rights reserved.

Database Control and RAC
Cluster Cluster Home

DB Control
Node1

Cluster Performance
Cluster Targets

Instance1
OC4J
Agent

EM App

Cluster Database Cluster Database Home Cluster Database Performance Cluster Database Administration Cluster Database Maintenance
Node2

DB & Rep

Instance2
OC4J
Agent

EM App

1-28

Copyright © 2005, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to: • Recognize the various components of CRS and RAC • Use the various types of files in a RAC database • Share database files across a cluster • Use services with RAC

1-29

Copyright © 2005, Oracle. All rights reserved.


				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:50
posted:8/29/2009
language:English
pages:27