01_Architecture_JFV14_01_Architecture_JFV14.ppt

MahmoudGad93 16 views 27 slides Sep 14, 2024
Slide 1
Slide 1 of 27
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27

About This Presentation

01_Architecture_JFV14


Slide Content

1
Copyright © 2005, Oracle. All rights reserved.
Architecture and Concepts

Copyright © 2005, Oracle. All rights reserved.1-2
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

Copyright © 2005, Oracle. All rights reserved.1-3
Complete Integrated Cluster Ware
M
a
n
a
g
e
m
e
n
t

A
P
I
s
Hardware/OS kernelHardware/OS kernel
Connectivity
Membership
Messaging and Locking
Volume Manager
file system
Applications
Cluster control E
v
e
n
t

S
e
r
v
i
c
e
s
S
y
s
t
e
m

M
a
n
a
g
e
m
e
n
t
Applications/RAC
Services framework
Cluster control/Recovery APIs
Automatic Storage Management
Messaging and Locking
Membership
Connectivity
E
v
e
n
t

S
e
r
v
i
c
e
s
9i RAC 10g RAC

Copyright © 2005, Oracle. All rights reserved.1-4
RAC Software Principles
Node1
Instance1
Cluster Ready Services
CRSD & RACGIMON
OCSSD & OPROCD
EVMD
LMON
LMD0
LMSx
DIAG

Cache
Noden
Instancen
Cluster
Applications
VIP, ONS, EMD, Listener
Cluster Ready Services
CRSD & RACGIMON
OCSSD & OPROCD
EVMD
ASM, DB, Services, OCR
Applications
VIP, ONS, EMD, Listener
ASM, DB, Services, OCR
Global
management:
SRVCTL, DBCA, EM
Cluster
interface
LCK0
LMON
LMD0
LMSx
DIAG

Cache
LCK0
Global
resources

Copyright © 2005, Oracle. All rights reserved.1-5
RAC Software Storage Principles
Node1
Instance1
CRS home
Local storage
Oracle home
Noden
Instancen
CRS home
Local storage
Oracle home

Voting file
OCR file
Node1
Instance1
Local storage
Noden
Instancen
Local storage

Shared storage
Voting file
OCR file
CRS home
Oracle home
Permits online patch upgrades
Software not a single
point of failure
Shared storage

Copyright © 2005, Oracle. All rights reserved.1-6
OCR Architecture
Node1
OCR cache
OCR
process
Client
process
Node2
OCR cache
OCR
process
Node3
OCR cache
OCR
process
Client
process
OCR
file
Shared storage

Copyright © 2005, Oracle. All rights reserved.1-7
RAC Database Storage Principles
Node1
Instance1
Shared storage

Noden
Instancen
Online
redo log files
for instance1
Online
redo log files
for instancen
Data files
Undo tablespace
files for
instance1
Undo tablespace
files for
instancen
Flash recovery area files
Change tracking file
SPFILE
Control files
Temp files
Archived
log files
Local storage
Archived
log files
Local storage

Copyright © 2005, Oracle. All rights reserved.1-8
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

Copyright © 2005, Oracle. All rights reserved.1-10
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

Copyright © 2005, Oracle. All rights reserved.1-11
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
ASM
File
system
Volume
manager
Operating system
Application
Database

Copyright © 2005, Oracle. All rights reserved.1-12
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)

Copyright © 2005, Oracle. All rights reserved.1-13
Typical Cluster Stack with RAC
High-speed Interconnect: Gigabit Ethernet
UDP Proprietary
Proprietary
Database shared storage
Interconnect
Servers
Oracle CRS
RAC
Linux, UNIX,
Windows
ASM
RAC
Linux
Windows
RAW
RAC
Linux
Windows
OCFS
RAC
AIX, HP-UX, Solaris
ASM
OS C/W
RAW
OS CVM
CFS

Copyright © 2005, Oracle. All rights reserved.1-14
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

Copyright © 2005, Oracle. All rights reserved.1-15
The Necessity of Global Resources
1008
SGA1 SGA2
1008
SGA1 SGA2
1008
1008
SGA1 SGA2
1008
SGA1 SGA2
1009 1008 1009
Lost
updates!
1 2
34

Copyright © 2005, Oracle. All rights reserved.1-16
LMON
LMD0
LMSx
DIAG

LCK0
CacheGRD Master
GES
GCS
LMON
LMD0
LMSx
DIAG

Cache
LCK0
GRD Master
GES
GCS
Global Resources Coordination
Node1
Instance1
Noden
Instancen
Cluster
Interconnect
Global
resources
Global Enqueue Service (GES)Global Cache Service (GCS)
Global Resource Directory (GRD)

Copyright © 2005, Oracle. All rights reserved.1-17
Global Cache Coordination: Example
Node1
Instance1
Node2
Instance2

Cache
Cluster
1009
1008
12
3
GCS
4
No disk I/O
LMON
LMD0
LMSx

LCK0
Cache
1009
DIAG
LMON
LMD0
LMSx
LCK0
DIAG
Block mastered
by instance one
Which instance
masters the block?
Instance two has
the current version of the block

Copyright © 2005, Oracle. All rights reserved.1-18
Write to Disk Coordination: Example
Node1
Instance1
Node2
Instance2
Cache
Cluster
1010
1010
1
3
2
GCS
45
Only one
disk I/O
LMON
LMD0
LMSx
LCK0
DIAG
LMON
LMD0
LMSx
LCK0
DIAG
……
Cache
1009
Need to make room
in my cache.
Who has the current version
of that block?
Instance two owns it.
Instance two, flush the block
to disk
Block flushed, make room

Copyright © 2005, Oracle. All rights reserved.1-19
RAC and Instance/Crash Recovery
Recovery time
SMON
recovers
the
database
Remaster
enqueue
resources
Remaster
cache
resources
Build re-
covery set
LMON
recovers
GRD
Merge failed
redo threads
1
2
3
5
Resource
claim
4 Roll forward
recovery set
Use information
for other caches

Copyright © 2005, Oracle. All rights reserved.1-21
Instance Recovery and Database
Availability
Elapsed time
D
a
t
a
b
a
s
e

a
v
a
i
l
a
b
i
l
i
t
y
None
Partial
Full A
B
C D E
G H
F
1 23
4
5
2

Copyright © 2005, Oracle. All rights reserved.1-22
Efficient Inter-Node Row-Level Locking
Node1
Instance1
Node2
Instance2
UPDATE
Node1
Instance1
Node2
Instance2
UPDATE
Node1
Instance1
Node2
Instance2
UPDATE
Node1
Instance1
Node2
Instance2
COMMIT
No block-level
lock
1 2
3
4

Copyright © 2005, Oracle. All rights reserved.1-23
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_%';

Copyright © 2005, Oracle. All rights reserved.1-24
Parallel Execution with RAC
Execution slaves have node affinity with the execution
coordinator, but will expand if needed.
Execution
coordinator
Parallel
execution
server
Shared disks
Node 4Node 1 Node 2 Node 3

Copyright © 2005, Oracle. All rights reserved.1-25
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
Node1
Instance1
Noden
Instancen
Cluster
V$INSTANCE V$INSTANCE
GV$INSTANCE

Copyright © 2005, Oracle. All rights reserved.1-26
RAC and Services
Up and down events notification engine
Listeners
RAC Instances
Application server
ERP CRM
ERP ERP ERP ERP
CRM CRM CRM CRM
S
t
o
p
/
S
t
a
r
t

s
e
r
v
i
c
e

c
o
n
n
e
c
t
i
o
n
s M
o
d
i
f
y

s
e
r
v
i
c
e

t
o

i
n
s
t
a
n
c
e

m
a
p
p
i
n
g
Service connections
Backup
Priority
Alerts
Tuning
Connection load balancing Service availability aware
CRS
Run-time load balancing
Service location transparency
Restart failed components

Copyright © 2005, Oracle. All rights reserved.1-27
Virtual IP Addresses and RAC
ERP=(DESCRIPTION=
((HOST=clusnode-1vip))
((HOST=clusnode-2vip))
(SERVICE_NAME=ERP))
clnode-1
ERP=(DESCRIPTION=
((HOST=clusnode-1))
((HOST=clusnode-2))
(SERVICE_NAME=ERP))
Timeout
wait
clnode-2
clnode-1clnode-2
2
5
3
7
clnode-1vip
clnode-2vip
2
clnode-1vip
clnode-2vip
3
4
7
Clients
14
6
15
6

Copyright © 2005, Oracle. All rights reserved.1-28
Database Control and RAC
Cluster
Cluster Database Home
Cluster Database Performance
Cluster Database Administration
Cluster Database
Cluster Home
Cluster Performance
Cluster Targets
Cluster Database Maintenance
Node1
Instance1
DB Control
Agent
OC4J
EM App
Node2
Instance2
Agent
OC4J
EM App
DB
&
Rep

Copyright © 2005, Oracle. All rights reserved.1-29
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
Tags