Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
,, Let someone k n o w ”
Plamen Zyumbyulev
Presentation Goals
Non-Goals
Explain RAC concepts and fundamentals
Show ALL aspects of RAC
Agenda
Introduction
RAC Installation
Problems
Solutions
Problems
Why not?
Key Points
No need of “fencing” configuration
No need of using clustered file system or raw devices
No need of multiple oracle homes (ORACLE_HOME)
RAC on Single Node (cont’d)
zyumix:/# su - oracle
oracle@zyumix:~$ . rac1
oracle@zyumix:~$ echo $ORACLE_SID
rac1
zyumix:/# su - oracle
oracle@zyumix:~$ . rac2
oracle@zyumix:~$ echo $ORACLE_SID
rac2
RAC on Single Node (cont’d)
Disadvantages
RAC on Single Node (cont’d)
Client side
load balancing
Listener Listener
‘A’ ‘B’
Server side
load balancing
Server A Server B
Instance ‘A’ Instance ‘B’
Database
RAC on Single VMware Node
Disadvantages
RAC on Multiple VMware Nodes
Disadvantages
RAC and Network Block Device
With this thing compiled into the kernel, Linux can use a
remote server as one of its block devices. Every time the
client computer wants to read /dev/nd0, it will send a request
to the server via TCP, which will reply with the data
requested.
Installation
Both client and server machines are with RHEL3
Download source from http://nbd.sourceforge.net/
As root do
bunzip2 nbd-2.7.3.tar.bz2
tar -xvf nbd-2.7.3.tar
cd nbd-2.7.3
./configure
make
make install
RAC and Network Block Device
(cont’d)
NBD client
NBD client must be run as root (because of kernel parts of
NBD). Before starting NBD client you would have to install
Linux kernel NBD module
Installing ndb module – RHEL3
[root@rac3 root]# rpm -Uvh kernel-unsupported-2.4.21-
4.EL.i686.rpm
warning: kernel-unsupported-2.4.21-4.EL.i686.rpm: V3 DSA
signature: NOKEY, key ID db42a60e
Preparing...
########################################### [100%]
1:kernel-unsupported
########################################### [100%]
[root@rac3 root]#
RAC and Network Block Device
(cont’d)
Caching
NET
Database
HA System
Maximum Availability
Architecture
Application Server Application Server
Dedicated Network
Data Guard
RAC
Dedicated Network
ACTIVE_INSTANCE_COUNT
*.active_instance_count = 1
*.cluster_database_instances = 2
Testing and Tuning RAC
Introduction
RAC testing steps
Functional Application Tests
RAC High Availability tests
Scalability tests
Scalability tests
RAC testing steps (cont’d)
linear
exponential constrained
r es u e no f o
mr ofr e P
6000
1000
0
# of concurrent users
4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100
RAC testing steps (cont’d)
6000
2 node RAC
3000
2000
na mr ofr e P
1000
0 # of concurrent users
4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100
RAC testing steps (cont’d)
9000
8000
Single node
7000
6000
3000
2000
na mr ofr e P
1000
0 # of concurrent users
4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100
Digging into RAC performance
problems
Interconnect and shared storage are the two most
possible performance problem areas in RAC
Interconnect “speed”
Throughput
Latency
average latency of a consistent block request. AVG CR BLOCK
RECEIVE TIME should typically be about 15 milliseconds
depending -- on your system configuration and volume
Digging into RAC performance
problems (cont’d)
Interconnect types
Measurement SMP Memory Myrinet Sun SCI Gigabit Hyper Fabric Infiniband
BUS Channel Ethernet
Latency (μs) 0.5 3 7 to 9 10 100 20 < 10
GOOD PERFORMANCE
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
--------------------------------------- ------------ ----------- --------
latch free 10,969 666 51.28
buffer busy waits 15,379 159 12.23
CPU time 149 11.47
PL/SQL lock timer 51 105 8.05
db file sequential read 25,163 96 7.36
Digging into RAC performance
problems (cont’d)
Global Cache Service - Workload Characteristics BAD GOOD
-----------------------------------------------
Ave global cache get time (ms): 11.8 2.2
Ave global cache convert time (ms): 51.7 11.2
Ave build time for CR block (ms): 0.7 0.0
Ave flush time for CR block (ms): 0.2 0.2
Ave send time for CR block (ms): 0.0 0.2
Ave time to process CR block request (ms): 0.9 0.4
Ave receive time for CR block (ms): 1.6 0.4
Ave pin time for current block (ms): 0.2 0.2
Ave flush time for current block (ms): 0.0 0.0
Ave send time for current block (ms): 0.1 0.1
Ave time to process current block request (ms): 0.3 0.3
Ave receive time for current block (ms): 33.4 7.5
Global cache hit ratio: 9.5 3.9
Ratio of current block defers: 0.0 0.0
% of messages sent for buffer gets: 6.7 2.5
% of remote buffer gets: 1.8 0.7
Ratio of I/O for coherence: 1.2 1.3
Ratio of local vs remote work: 4.3 4.4
Ratio of fusion vs physical writes: 0.0 0.0
Digging into RAC performance
problems (cont’d)
Global Enqueue Service Statistics BAD GOOD
---------------------------------
Ave global lock get time (ms): 0.2 0.0
Ave global lock convert time (ms): 0.0 0.0
Ratio of global lock gets vs global lock releases: 1.2 1.1
2. cd $ORACLE_HOME/rdbms/lib
If this step did not fail with fatal errors then proceed to step 4.
Metalink Note:211177.1 RAC Survival Kit: Rac On / Rac Off - Relinking the
RAC Option
Metalink Note:183340.1 Frequently Asked Questions About the
CLUSTER_INTERCONNECTS Parameter in 9i.
http://www.fi.muni.cz/~kripac/orac-nbd/
The Oracle-on-Linux VMware Cookbook
http://www.oracle.com/technology/tech/linux/vmware/cookbook/index.html
Build Your Own Oracle RAC 10g Cluster on Linux and FireWire
http://www.oracle.com/technology/pub/articles/hunter_rac10g.html
Note:135714.1 Script to Collect RAC Diagnostic Information (racdiag.sql)
Thank You
zyumbyulev@mobiltel.bg