bauer m. - oracle 9i real application clusters. deployment and performance (part no. a89870-02)...
TRANSCRIPT
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
1/244
Oracle9iReal Application Clusters
Deployment and Performance
Release 1 (9.0.1)
July 2001
Part No. A89870-02
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
2/244
Oracle9i Real Application Clusters Deployment and Performance, Release 1 (9.0.1)
Part No. A89870-02
Copyright 1996, 2001, Oracle Corporat ion. All rights reserved .
Primary Au thor: Mark Bauer.
Primary Contributors: David Austin, Mitch Flatland, Bill Kehoe, Kotaro Ono, Stefan Pommerenk, JimRawles, Joao Rimoli, and Michael Zoll.
Contributors: Lance Ashdown, Cathy Baird, Bill Bridge, Wilson Chan, Gang Chen, Carol Colrain, SohanDeMel, Merrill Holt, John Kennedy, Raj Kumar, Tirthankar Lahiri, Neil MacNaughton, Vinay Srihari,
Bob Thome, Alex Tsukerm an, and Tak Wang.
Grap hic Designer: Valarie Moore.
The Programs (which includ e both the software and docum entation) contain prop rietary information ofOracle Corporation; they are p rovided u nd er a license agreement containing restrictions on u se anddisclosure and are also protected by copyright, patent, and other intellectual and ind ustrial propertylaws. Reverse engineering, disassembly, or d ecompilation of th e Programs is prohibited.
The information contained in this document is subject to change without notice. If you find any problemsin the docum entation, please report them to u s in writing. Oracle Corporation does not warran t that this
docum ent is error free. Except as ma y be expressly permitted in your license agreement for thesePrograms, no part of these Programs m ay be reprodu ced or transmitted in any form or by any m eans,electronic or mechanical, for any pu rpose, without the express written p ermission of Oracle Corporation.
If the Programs are delivered to the U.S. Government or anyone licensing or u sing the p rograms onbehalf of the U.S. Government, the following notice is applicable:
Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercialcompu ter software" and u se, dup lication, and d isclosure of the Programs, including d ocumentation,shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement.Otherwise, Programs delivered subject to the Federal Acqu isition Regulations are "restricted compu ter
software" and use, du plication, and disclosure of the Program s shall be su bject to the restrictions in FAR52.227-19, Commercial Comp uter Softwa re - Restricted Rights (Jun e, 1987). Oracle Corp oration , 500Oracle Park way, Redw ood City, CA 94065.
The Programs are not intended for use in any nu clear, aviation, mass transit, medical, or other inherentlydan gerous ap plications. It shall be th e licensee's responsibility to take all app ropriate fail-safe, backup,redun dan cy, and other m easures to ensure the safe use of such app lications if the Programs are u sed forsuch pu rposes, and O racle Corporation d isclaims liability for any dam ages caused by su ch use of thePrograms.
Oracle is a registered t rad emar k, and SQL*Loader , Secure N etwork Services, SQL*Plus, Real App lication
Cluster s, Oracle Call Interface, Oracle9i, Oracle8i, Oracle8, Oracle Parallel Server, Oracle Forms, OracleTRACE, Oracle Expert, Oracle Enterp rise Manager, Oracle Server Mana ger, Oracle Net, N et8, PL/ SQL,and Pro*C are tradem arks or registered trad emarks of Oracle Corporation. Other nam es may betradem arks of their respective owners.
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
3/244
iii
Contents
List of FiguresList of Tables
Send Us Your Comments ................................................................................................................ xvii
Preface.......................................................................................................................................................... xix
Whats New in Cluster Software Deployment and Performance?......................... xxix
Part I Introduction to Deployment in Real Application Clusters
1 Introduction to Application Deployment for Real Application Clusters
Taking Full Advantage of Oracle9i Features ................................................................................. 1-2Implementing Oracle9i Features w ith Real Application Clusters ............................................ 1-2
High Availability an d Failover in Real Application Cluster s ................................................ 1-2
Prim ary/ Second ary and Active/ Active Instan ce Configura tions ................................. 1-3
Oracle N et in Real Ap plication Clusters ................................................................................... 1-3
The Shared Server in Real Application Clusters...................................................................... 1-4
Con nection Load Balancin g ........................................................................................................ 1-4
Transparent Application Failover in Real Application Clusters ........................................... 1-4
PL/ SQL in Real Ap plication Clu sters ....................................................................................... 1-5
Recovery Manager (RMAN ) in Real Ap plication Cluster s .................................................... 1-6
Cluster File Systems in Real Application Clusters .................................................................. 1-6
Deployment Phases for Real Appl ication Clus ters...................................................................... 1-7
http://comments_template.pdf/http://comments_template.pdf/ -
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
4/244
iv
2 Online E-Commerce and Data Warehousing Application Deployment in Real
Application ClustersCache Fusion and E-Commerce Applications for Real Appl ication Clusters ......................... 2-2
Flexible Implementation w ith Cache Fusion ................................................................................ 2-2
Deployment Strategies for Real Application Clusters-Based Appl ications ........................... 2-3
Transition to N-tier Architectu res .............................................................................................. 2-3
Benefits of N -Tier Architectu res with Real Ap plication Clusters.......................................... 2-5
Monitoring and Tuning Performance in N-Tier Environments ..................................... 2-5Deploying D ata Warehousing Appl ications for Real Application Clusters ........................... 2-6
Speed-Up for Data Wareh ousing Ap plications on Real App lication Clu sters .................... 2-6
Flexible Pa rallelism within Real Ap plication Clusters Environ men ts .......................... 2-6
Dynamic Parallel-Aware Query Optimization......................................................................... 2-7
Load Balancing for Multiple Concurrent Parallel Operations........................................ 2-8
Using Para llel In stance Groups ........................................................................................... 2-8
Disk Affinity ........................................................................................................................... 2-9Deployment and Tuning of Real Application Clusters Applications .................................... 2-10
Configuring and Tun ing Applications on Real Ap plication Cluster s ................................ 2-11
Ad min istrative Aspects of System Scaling for Real Ap plication Clusters ......................... 2-11
Part II Scaling Applications and Designing Databases for Real ApplicationClusters
3 Scaling Applications for Real Application Clusters
Overview of D evelopment Techniques in Real Application Clusters ..................................... 3-2
Begin with an Analysis ................................................................................................................ 3-2
SQL Statement Execution in Real Application Clusters ............................................................. 3-3
Block Accesses During INSERT Statement Execution ............................................................ 3-3
Block Accesses During UPDATE Statement Execution .......................................................... 3-5Block Accesses During DELETE Statement Execution............................................................ 3-6
Block Accesses During SELECT Statement Execution ............................................................ 3-6
Workload D istribution Concepts in Real Appl ication Clusters ................................................ 3-7
Function al Part itioning ................................................................................................................ 3-7
Separatin g E-Com merce and Data Warehousing Processing ................................................ 3-8
Departmental and User Partitioning.......................................................................................... 3-8
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
5/244
v
Physical Table Part itioning ......................................................................................................... 3-9
Transaction Part itioning .............................................................................................................. 3-9Workload Characterization in Real Application Clusters ........................................................ 3-11
Step 1: Define Your Systems Major Functional Areas.......................................................... 3-11
Step 2: Estima te Each Functiona l Areas System Resource Consu mpt ion ......................... 3-11
Step 3: Analyze Each Fun ctional Areas Data Access Pat tern.............................................. 3-13
Step 3.1: Ident ify Table Access Requ irem ents and Define Overlaps ........................... 3-13
Step 3.2: Defin e the Access Type for Each Overlap ........................................................ 3-14
Step 3.3: Ident ify Tran saction Volu mes............................................................................ 3-14
Step 3.4: Classify Overlap s ................................................................................................. 3-15
Scaling-Up and Partitioning in Real Application Clusters ...................................................... 3-16
4 Database Design Techniques for Real Application Clusters
Principles of D atabase Design for Real Application Clusters ................................................... 4-2
Using Free List Groups For Concurrent Inserts from Multiple Nodes .................................... 4-3Deciding Whether to Create Database Objects w ith Free List Grou ps ................................. 4-3
Iden tifying Cr itical Tables Before Migrating to Real Ap plication Clusters .................. 4-4
Determining FREELIST GROUPS Reorganization Needs...................................................... 4-4
Creating Tables, Clusters, and Indexes with FREELISTS and FREELIST GROUPS ......... 4-5
FREELISTS Parameter .......................................................................................................... 4-5
FREELIST GROUPS Parameter ........................................................................................... 4-5
Crea ting FREELISTS and FREELIST GROUPS for Cluster ed Tables ............................ 4-6Creating FREELISTS for Indexes......................................................................................... 4-7
Associating Instances and User Sessions with Free List Groups........................................... 4-7
Associating Instances with Free List Groups .................................................................... 4-8
Associating User Processes with Free List Groups .......................................................... 4-8
Preallocating Extents.................................................................................................................... 4-9
Preallocat ing Extents w ith The ALLOCATE EXTENT Clause ....................................... 4-9
Preallocating Extents by Setting MAXEXTENTS, MINEXTENTS, and INITIAL
Parameters 4-10
Preallocating Extents by Setting the INSTANCE_NUMBER Parameter .................... 4-11
Exten t Preallocation Exam ples .......................................................................................... 4-11
Using Sequence Numbers in Real Ap plication Clusters .......................................................... 4-13
Detecting Global Conflicts for Sequ ences ............................................................................... 4-13
Using Database Tables to Genera te Sequ ence N umbers ...................................................... 4-13
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
6/244
vi
Tablespace Design in Real Application Clusters........................................................................ 4-14
Extent Man agement and Locally Managed Tablesp aces ...................................................... 4-15Identifying Extent Management Issues............................................................................ 4-15
Minimizing Extent Managem ent Op era tions .................................................................. 4-15
Using Locally Managed Tablesp aces ................................................................................ 4-15
Index Issues for Real Appl ication Clusters Design ................................................................... 4-16
Redu cing Inter-Instance Con curren t Changes To Index Blocks .......................................... 4-17
Using Reverse Key Ind exes to Distr ibu te Ind ex Access ................................................ 4-17
Assigning Different Subsequ ences to Each Instance to Reduce Ind ex Contention ... 4-17
Using INSTANCE_NUMBER to Generate Index Keys.................................................. 4-17
Reducing Index Contention by Partitioning Tables by Range...................................... 4-17
Minimizing Table Locks to Optimize Performance ................................................................... 4-19
Disabling Table Locks for Ind ivid ual Tables .......................................................................... 4-19
Setting DML_LOCKS to Zero ................................................................................................... 4-19
Object Creation and Performance in Real Application Clusters ............................................. 4-20
Conclusions and a Summary of Guidelines ................................................................................ 4-21
Part III Real Application Clusters Performance Monitoring and Tuning
5 General Tuning Recommendations for Real Application Clusters
Overview of Tuning Real Application Clusters ............................................................................ 5-2
Statistics for Monitoring Real Application Clusters Performance ........................................... 5-2
The Con ten t of Real Application Clu sters Stat istics ................................................................ 5-2
Record ing Stat istics for Tuning ................................................................................................... 5-3
Tracing Execution History with the TRACE_ENABLED Parameter............................. 5-3
Significant Real Application Clusters Statistics........................................................................ 5-4
Using View s to Evaluate Real Appl ication Clusters Performance ............................................ 5-5
Using V$SYSSTAT for Real Application Clu sters Statistics ................................................... 5-5
Using V$SYSTEM_EVENT for Real Ap plication Clusters Statist ics..................................... 5-7
Using Oth er Views to Obtain Real Ap plication Clu sters Stat istics ....................................... 5-8
Measuring Workload Performance in Real Application Clusters ............................................. 5-9
General Tuning Recommendations for Workload Performance ............................................. 5-10
Measuring Workload Performance.......................................................................................... 5-10
Using V$CLASS_CACHE_TRANSFER and V$FILE_CACHE_TRANSFER for Real
Application Clusters Statistics 5-10
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
7/244
vii
Iden tifying Conten ded O bjects with V$CACH E, V$CACH E_TRAN SFER, V$BH, and
V$FILE_CACHE_TRANSFER 5-11Estim ating I/ O Syn chroniza tion Costs ................................................................................... 5-11
Determining the Costs of Synchronization In Real Appl ication Clusters ............................ 5-12
Calculating CPU Service Tim e Requ ired ................................................................................ 5-12
Measuring Global Cache Coheren cy and Conten tion ........................................................... 5-13
Maintaining App lication Profiles per Transaction p er Unit of Time........................... 5-15
Measuring Global and Local Work Ratios in Real Application Clusters .............................. 5-16
Calculating the Global Cache Synchronization Costs Due to Contention in Real Appl icationClusters ............................................................................................................................................... 5-18
Con tent ion for the Sam e Data Blocks ...................................................................................... 5-18
Iden tifying Con tend ed Objects with V$CACH E, V$CACHE_TRAN SFER, and V$BH ......
5-19
Conten tion for Segment Head ers and Free List Blocks ........................................................ 5-19
Conten tion for Resou rces other than Database Blocks ......................................................... 5-20
Contention for the Data Dictionary Cache and The Row Cache.................................. 5-20Con ten tion for the Library Cache ..................................................................................... 5-21
Contention Problems Specific to App lications Runn ing on Real Application Clusters .. 5-21
Using Sequence Number Multip liers ............................................................................... 5-21
Usin g the CACH E Clause When Creating Oracle Sequences ...................................... 5-21
Resolving Performance Problems in Real Appl ication Clusters-Based Applications ........ 5-22
Query Tuning Tips ..................................................................................................................... 5-22
Using Large Block Sizes...................................................................................................... 5-22
Increasing the Value for DB_FILE_MULTIBLOCK_READ_COUNT ......................... 5-22
Ap plication Tuning Tips ........................................................................................................... 5-23
Diagnosin g Per formance Problem s ......................................................................................... 5-23
GCS Stat istics for Monitoring Con ten tion and CPU Usage .......................................... 5-24
Advanced Queuing and Real Application Clusters ................................................................... 5-24
Qu eue Table Instance Affin ity .................................................................................................. 5-24
Global Cache Service Resou rce Acquisition ........................................................................... 5-25
Ad vanced Qu euing and Qu eue Table Cache Transfers ....................................................... 5-25
6 Tuning Real Application Clusters and Inter-Instance Performance
How Cache Fusion Produces Current and Consistent Read Blocks ......................................... 6-2
Improved Scalability with Cache Fusion .................................................................................. 6-4
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
8/244
viii
Block Transfers Using High Speed Interconnects.................................................................... 6-5
Elimination of I/ O for Forced Disk Writes of Blocks .............................................................. 6-5Partitioning Data To Further Reduce Hot Spots Du e to Blocks Mod ified by Mu ltiple
Instances 6-6
The Interconnect and Interconnect Protocols for Real Application Clusters ......................... 6-6
Influ encing Interconnect Processing .......................................................................................... 6-6
Performance Expectations of Cache Fusion ................................................................................... 6-6
Monitoring Cache Fusion and Inter-Instance Performance ....................................................... 6-7
Cache Fusion and Performance Monitoring Goals ...................................................................... 6-7Statistics for Monitoring Real Application Clusters and Cache Fusion .................................. 6-8
Creating Real Application Clusters Data Dictionary Views w ith CATCLUST.SQL .......... 6-9
Global Dynam ic Perform an ce View s ....................................................................................... 6-10
Analyzing Global Cache and Cache Fusion Statist ics ........................................................... 6-11
Procedures for Mon itor ing Global Cache Statist ics........................................................ 6-11
Analyzing Global Enqueu e Statistics ....................................................................................... 6-16
Procedures for Analyzing Globa l Enqu eue Statist ics..................................................... 6-16
Analyzing GES Resou rce, Message, and Mem ory Resou rce Stat istics ............................... 6-18
How GES Workloads Affect Performance....................................................................... 6-19
Procedures for Analyzing GES Resource Statistics ........................................................ 6-19
GES Message Stat istics Processing ........................................................................................... 6-21
Proced ure for Ana lyzing GES Message Statistics ........................................................... 6-22
Analyzing Block Mode Conversions by Type ........................................................................ 6-23
Using the V$LOCK_ACTIVITY View to Analyze Block Mode Con versions ............. 6-24
Using the V$CLASS_CACHE_TRAN SFER View to Id entify Block Mode Conversions by
Block Class 6-24
Using the V$CACH E_TRANSFER View to Id entify H ot O bjects ................................ 6-24
Analyzing Latch Statist ics in Real Ap plication Clusters....................................................... 6-25
Procedures for Analyzing Latch Statistics ....................................................................... 6-25
Using the V$SYSTEM_EVENT View to Identify Performance Problems ............................. 6-27
Real Application Clusters Events in V$SYSTEM_EVENT.................................................... 6-28
Events Related to Server Coordination Resources ......................................................... 6-29
General Observations for Tuning Inter-Instance Performance............................................ 6-29
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
9/244
ix
Part IV Using Oracle Enterprise Manager to Monitor and Tune Real Application
Clusters Databases
7 Monitoring Performance with Oracle Performance Manager
Oracle Performance Manager Overview ........................................................................................ 7-2
Starting Oracle Performance Manager ........................................................................................... 7-5
Displaying Charts ............................................................................................................................... 7-5
Using the Stat istics Char ts ........................................................................................................... 7-7Total Ping Chart..................................................................................................................... 7-7
Global Cache Timeou ts Char t.............................................................................................. 7-7
Global Cache CR Requ est Chart.......................................................................................... 7-7
Global Cache Lock Con vert Char t ...................................................................................... 7-8
Instance Ping Char t ............................................................................................................... 7-8
Global Cache CR Timeou ts by Instance Chart .................................................................. 7-8
Globa l Cache Conver t Timeou ts by Instance Ch art ......................................................... 7-8Global Cache Freelist Waits by Instan ce Char t ................................................................. 7-9
Global Cache CR Request by Instance Chart .................................................................... 7-9
Global Cache Lock Convert by Instance Chart ................................................................. 7-9
Ping by File Char t .................................................................................................................. 7-9
File Pin g by Instance Char t .................................................................................................. 7-9
Pin g by Block Class Chart .................................................................................................. 7-10
Pin g by Object Char t ........................................................................................................... 7-10
Object Ping by Instance Chart ........................................................................................... 7-10
Maximum Pin g by Block Chart ......................................................................................... 7-10
Library Cache Lock Char t .................................................................................................. 7-10
Library Cache Lock by Instance Char t ............................................................................. 7-11
Row Cache Lock Chart ....................................................................................................... 7-11
Row Cache Lock by Instance Ch ar t .................................................................................. 7-11
Global Cache Current Block Request Chart .................................................................... 7-11
Globa l Cache Current Block Request by Instance Ch art ............................................... 7-12
Globa l Cache Current Block Instance Activity Chart .................................................... 7-12
File I/ O Rate Defau lt Char t ............................................................................................... 7-12
File I/ O Rate by Object Defau lt Char t.............................................................................. 7-12
File I/ O Rate by Instance Defau lt Chart .......................................................................... 7-12
Lock Activity Defau lt Chart ............................................................................................... 7-12
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
10/244
x
Sessions Defau lt Char t ........................................................................................................ 7-12
Users Default Char t ............................................................................................................. 7-13Users Per Instance Defau lt Char t ...................................................................................... 7-13
Active Users Chart............................................................................................................... 7-13
Active Users by Instance Char t ......................................................................................... 7-13
Clu sters Da ta Block Ping by Instance Char t .................................................................... 7-13
Part V Real Application Clusters Reference
A Configuring Multi-Block Lock Assignments (Optional)
Before You Override the Global Cache and Global Enqueue Service Resource Control
Mechanisms ......................................................................................................................................... A-2
Deciding Whether to Override Global Cache Service and Global Enqueue Service Processing
A-2
When to Use Locks ....................................................................................................................... A-3Setting GC_FILES_TO_LOCKS ....................................................................................................... A-4
GC_FILES_TO_LOCKS Syntax................................................................................................... A-4
Lock Assignment Exam ples ........................................................................................................ A-5
Blocking Factor , Extent Allocation, and Free List Groups................................................... A-10
Dynamic Allocation of Blocks on Lock Boundaries ...................................................... A-10
Moving a Segments High Water Mark........................................................................... A-11
Additional Considerations for Setting GC_FILES_TO_LOCKS ............................................ A-14Expanding or Ad ding Datafiles ............................................................................................... A-14
Files To Avoid Including in GC_FILES_TO_LOCKS Settings ............................................ A-14
Database Design Cons iderations and Free List Groups .......................................................... A-15
Associa ting Locks with Free Lists ........................................................................................... A-15
Tun ing Parallel Execution on Real Ap plication Cluster s..................................................... A-16
Analyzing Real Appl ication Clusters I/O Statistics .................................................................. A-17
Analyzing Real Ap plication Clusters I/ O Statist ics Using V$SYSSTAT........................... A-17Monitoring Multi-Block Lock Usage by Detecting False Forced Writes .............................. A-19
Lock N ames and Lock Formats...................................................................................................... A-21
Lock Names and Lock Name Formats.................................................................................... A-21
Lock Names ................................................................................................................................ A-22
Lock Types and Nam es ............................................................................................................. A-22
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
11/244
xi
B A Case Study in Real Application Clusters Database Design
Case Study Overview ......................................................................................................................... B-2
Case Study: From Initial D atabase Design to Real Appl ication Clusters ............................... B-3
Eddie Bean Catalog Sales ............................................................................................................ B-3
Eddie Bean Database Tables ....................................................................................................... B-3
Eddie Bean Users .......................................................................................................................... B-4
The Eddie Bean Ap plication Profile........................................................................................... B-4
Analyzing Access to Tables ............................................................................................................... B-5
Table Access An alysis Worksheet .............................................................................................. B-5
Estim ating Volu me of Operations ...................................................................................... B-5
Calculating I/ Os for Each Op eration ................................................................................. B-6
I/ Os for Each Op eration for Sam ple Tables ...................................................................... B-8
Case Study: Table Access An alysis ............................................................................................ B-9
Analyzing Transaction Volume by Users ..................................................................................... B-10
Transaction Volume Analysis Worksheet............................................................................... B-10Case Study: Transaction Volume Analysis ............................................................................. B-11
ORDER_H EADER Table .................................................................................................... B-11
ORDER_ITEM Table ........................................................................................................... B-12
ACCOUNTS_PAYABLE Table.......................................................................................... B-13
Case Study: Initial Partitioning Plan ............................................................................................ B-14
Case Study: Further Part itioning Plans ................................................................................... B-15
Design Option 1................................................................................................................... B-16Design Option 2................................................................................................................... B-16
Partitioning Indexes ......................................................................................................................... B-17
Implement and Tune Your Design ................................................................................................ B-17
Glossary
Index
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
12/244
xii
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
13/244
xiii
List of Figures
21 N-tier Architecture Middlew are Com pon ents an d Real App lication Clusters............ 2-422 Disk Affinity Example ........................................................................................................ 2-1041 Node Affinity for Transactions Against Tables Par titioned by Range ........................ 4-1861 Cache Fusion Ships Blocks from Cache to Cache Across the Interconnect .................. 6-371 Expanding Charts.................................................................................................................. 7-6A1 Mapping Locks to Data Blocks ............................................................................................ A-6A2 GC_FILES_TO_LOCKS Example 5..................................................................................... A-8A3 GC_FILES_TO_LOCKS Example 6..................................................................................... A-8A4 GC_FILES_TO_LOCKS Example 7..................................................................................... A-9A5 GC_FILES_TO_LOCKS Example 8..................................................................................... A-9A6 A File with a High Water Mark That Moves as Oracle Allocates Blocks.................... A-11A7 Allocating Blocks with in An Exten t.................................................................................. A-13A8 Exten ts and Free List Grou ps............................................................................................. A-15B1 Number of I/ Os for Each SELECT or INSERT Operation .............................................. B-6B2 Case Study: Partitioning Users and Data......................................................................... B-14B3 Case Study: Partitioning Users and Data: Design Option 1.......................................... B-15B4 Case Study: Partitioning Users and Data: Design Option 2.......................................... B-16
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
14/244
xiv
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
15/244
xv
List of Tables
31 Exam ple of Overlap ping Tables ........................................................................................ 3-1332 Exam ple of Table Access Typ es ........................................................................................ 3-1433 Exam ple of Table Transaction Volu mes........................................................................... 3-1451 Memory Trace Files and Their Locations........................................................................... 5-452 Statistics and their Classes in V$SYSSTAT ........................................................................ 5-553 Global Cache Coh erency and Contention Views and Their Statistics......................... 5-1371 Performance Charts............................................................................................................... 7-3
A1 When to Use Locks................................................................................................................ A-3A2 Interpretin g th e Forced Write Rate ................................................................................... A-19A3 Locks Typ es and Nam es..................................................................................................... A-22B1 Eddie Bean Sample Tables ................................................................................................... B-3B2 Table Access An alysis Worksheet ....................................................................................... B-5B3 Num ber of I/ Os for each Op eration : Sam ple ORDER_HEADER Table....................... B-8B4 Number of I/ Os for each Op era tion : Other Sample Tables ............................................ B-8B5 Case Study: Table Access Analysis Worksheet................................................................. B-9
B6 Transaction Volume Analysis Worksheet ....................................................................... B-10B7 Case Study: Transaction Volume Analysis: ORDER_HEADER Table........................ B-11B8 Case Stud y: Transaction Volum e Analysis: ORDER_ITEM Table ............................... B-12B9 Case Study: Transaction Volume Analysis: ACCOUN TS_PAYABLE Table ............. B-13
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
16/244
xvi
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
17/244
xvii
Send Us Your Comments
Oracle9iReal Application Clusters Deployment and Performance, Release 1 (9.0.1)
Part No. A89870-02
Oracle Corporation w elcomes your comm ents and su ggestions on the quality and u sefulness of this
docum ent. Your inp ut is an imp ortant p art of the information u sed for revision.
s Did you find any errors?
s Is the information clearly presented ?
s Do you n eed m ore information? If so, wh ere?
s Are the examp les correct? Do you n eed m ore examples?
s What features did you like most?
If you find any errors or have any other suggestions for improvem ent, please indicate the document
title and p art nu mber, and the chap ter, section, and page n um ber (if available). You can send com-
ments to u s in the following ways:
s Electronic mail: infod [email protected]
s FAX: (650) 506-7227 Attn: Server Technologies Documentation Manager
s Postal service:
Oracle Corporation
Server Technologies Documentation
500 Oracle Parkw ay, Mailstop 4op11
Redw ood Shores, CA 94065USA
If you w ould like a reply, please give your name, address, telephone num ber, and (optionally) elec-
tronic ma il address.
If you h ave p roblems with the software, please contact your local Oracle Sup port Services.
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
18/244
xviii
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
19/244
xix
Preface
Oracle9i Real A pplication Clusters Deployment and Performance explains the
dep loyment issues for applications that u se an Oracle9i Real Ap plication Clusters
database. This man ual also provides p ost-deployment information about tuning
Real App lication Clusters environm ents for optimal performance.
Information in this man ual ap plies to Real App lication Clusters as it runs on alloperating systems. Where necessary, this man ual refers to p latform-specific
documentation.
This preface contains these top ics:
s Audience
s Organization
s Related Docum entation
s Conventions
s Documen tation Accessibility
See Also: The Oracle9i Real Application Clusters Documentation
Online Roadmap to help you u se the online Oracle9i Real
App lication Clusters Documen tation set
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
20/244
xx
AudienceOracle9i Real A pplication Clusters Deployment and Performance is written for databaseadministrators and application developers working with Real Application Clusters.
To use this d ocum ent you should h ave a conceptual u nd erstanding of Real
App lication Clusters p rocessing an d its software and hardw are comp onents as
described in Oracle9i Real A pplication Clusters Concepts and you should have
installed Real Application Clusters using the docum ent Oracle9i Real Application
Clusters Installation and Configuration and related platform-specific documentation.
OrganizationThe five parts of this book and their contents are:
Part I: Introduction to Real Application Clusters Deployment
Part On e introdu ces the high-level aspects of dep loying app lications in Real
App lication Cluster by describing how to take ad vantage of Oracle9i features. It
also describes dep loyment of internet-based ap plications in e-commerce and d atawarehousing environments.
Chapter 1, "Introduction to Application Deployment for Real ApplicationClusters"
This chap ter provid es an overview of deploymen t issues for Real App lication
Clusters environments.
Chapter 2, "Online E-Commerce and Data Warehousing ApplicationDeployment in Real Application Clusters"
This chap ter briefly describes the d eploymen t of online e-commerce-based and da ta
warehousing app lications for Real App lication Clusters.
Part II: Scaling and Designing Applications for Oracle9iReal Application
ClustersPart Two describes technical issues and database design techniques for deploying
scalable app lications w ith Real App lication Clusters.
Chapter 3, "Scaling Applications for Real Application Clusters"
This chap ter describes how to optim ize the scalability of your ap plications for
dep loyment in Real Application Clusters environmen ts.
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
21/244
xxi
Chapter 4, "Database Design Techniques for Real Application Clusters"
This chap ter describes Real App lication Clusters da tabase design issues such asblock and extent operations, contention redu ction, and resource control strategies.
Part III: Oracle9iReal Application Clusters Performance Monitoring andTuning
Part Three describes procedures for monitoring and tun ing performan ce in Real
App lication Clusters.
Chapter 5, "General Tuning Recommendations for Real ApplicationClusters"
This chap ter presents genera l tuning recomm end ations for Real App lication
Clusters.
Chapter 6, "Tuning Real Application Clusters and Inter-InstancePerformance"
This chapter d escribes how to monitor and tun e inter-instance performance in Real
App lication Clusters.
Part IV: Monitoring and Tuning Real Application Clusters Databases withOracle Enterprise Manager
Part Four d escribes mon itoring the p erformance of Real App lication Clusters
databases using Oracle Enterp rise Manager.
Chapter 7, "Monitoring Performance with Oracle Performance Manager"
This chapter explains how m onitor and tu ne Real Application Clusters databases
with O racle Enterprise Manager.
Part V: Oracle Real Application Clusters Reference
Part Five contains reference information for Real Application Clusters dep loyment
and performan ce.
Appendix A, "Configuring Multi-Block Lock Assignments (Optional)"
This appendix explains how to overr ide the Real Applications default resource
control mechan isms.
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
22/244
xxii
Appendix B, "A Case Study in Real Application Clusters Database
Design"This appendix describes a case stud y for deploying Real Application Clusters.
Glossary
The glossary d efines terms used in this book as well as terms relevant to the su bject
ma tter of this book.
Related DocumentationFor more information, see these Oracle resources:
s Oracle9i Real Application Clusters Documentation Online Roadmap
s Oracle9i Real A pplication Clusters Concepts
s Oracle9i Real Application Clusters Installation and Configuration
s Oracle9i Real Application Clusters Administrations Oracle Real Application Clusters Guard Administration and Reference Guide
s Your platform-specific Oracle Real Ap plication Clusters Gu ard installation
guide
Installation Guides
s Your platform-specific Oracle Real Ap plication Clusters Gu ard installation
guide
s Oracle9i Installation Guide for Compaq Tru64, Hew lett-Packard HPUX, IBM-AIX,
Linu x, and Sun Solaris-based systems
s Oracle9i Database Installation Guide for Windows
s Oracle Diagnostics Pack Installation
Operating System-Specific Administrative Guidess Oracle9i A dministrators Reference for Comp aq Tru64, Hewlett-Packard H PUX,
IBM-AIX, Linux, and Sun Solaris-based system s
s Oracle9i Database Administrators Guide for Windows
Oracle9iReal Application Clusters Management
s Oracle9i Real Application Clusters Administration
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
23/244
xxiii
s Oracle Enterprise Manager Administrators Guide
s Getting Started with the Oracle Diagnostics Pack
Generic Documentation
s Oracle9i Database Concepts
s Oracle Net Services Administrators Guide
s Oracle9i Database Reference
s Oracle9i Database New Features
Many of the examp les in this book use the samp le schemas of the seed database,
wh ich is installed by d efault when you install Oracle. Refer to Oracle9i Sample
Schemas for information about how these schemas w ere created and how to use
them.
In North America, printed docum entation is available for sale in the Oracle Store at
http://oraclestore.oracle.com/
Custom ers in Europe, the Mid dle East, and Africa (EMEA) can p urchase
documentation from
http://www.oraclebookshop.com/
Other custom ers can contact their Oracle representative to purchase p rinted
documentation.
To dow nload free release notes, installation docum entation, wh ite papers, or other
collateral, please visit the Oracle Technology Network (OTN). You must register
online before using OTN; registration is free and can be done at
http://technet.oracle.com/membership/index.htm
If you already have a u sername and password for OTN, then you can go directly to
the d ocumen tation section of the OTN Web site at
http://technet.oracle.com/docs/index.htm
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
24/244
xxiv
ConventionsThis section describes the conventions u sed in the text and code examples of thisdocum entation set. It describes:
s Convention s in Text
s Conventions in Code Examples
Conventions in Text
We use va rious conventions in text to help you m ore quickly iden tify special terms.The following t able describes those conventions and provid es examples of their u se.
Convention Meaning Example
Bold Bold typ eface indicates terms tha t aredefined in the text or terms that app ear ina glossary, or both .
When you specify this clause, you create anindex-organized table .
Italics Italic typeface ind icates book titles oremphasis. Oracle9i Database ConceptsEnsure that the recovery catalog and targetdatabase do notreside on the same d isk.
UPPERCASE
monospace
(fixed-width
font)
Uppercase monospace typeface indicateselements supplied by the system. Suchelements include parameters, privileges,datatypes, RMAN keywords, SQLkeywords, SQL*Plus or u tility comm and s,packages and m ethods, as well assystem-supp lied column names, databaseobjects and structu res, usern ames, androles.
You can specify this clause only for a NUMBERcolumn.
You can back up the database by using theBACKUP command.
Query the TABLE_NAME column in the USER_TABLES data dictionary view.
Use the DBMS_STATS.GENERATE_STATSprocedure.
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
25/244
xxv
Conventions in Code Examples
Code examp les illust rate SQL, PL/ SQL, SQL*Plus , or other comm and-line
statemen ts. They are disp layed in a monosp ace (fixed-width) font and separated
from normal text as shown in this example:
SELECT username FROM dba_users WHERE username = MIGRATE;
The following table describes typograph ic conventions used in code examples and
provides examp les of their use.
lowercasemonospace
(fixed-width
font)
Lowercase monospace typeface ind icatesexecutab les, filenames, d irectory n ames,and sample u ser-supp lied elements. Suchelements include compu ter and d atabasenam es, net service nam es, and connectidentifiers, as well as user-supp lieddatabase objects and structu res, colum nnames, packages and classes, usernamesand roles, program units, and par ameter
values.Note: Some p rogrammatic elements u se amixture of UPPERCASE and lowercase.Enter these elements as shown.
Enter sqlplus to op en SQL*Plus.
The password is specified in the orapwd file.
Back up th e datafiles and control files in the/disk1/oracle/dbs directory.
The department_id, department_name,and location_id column s are in thehr.departments table.
Set the QUERY_REWRITE_ENABLEDinitialization parameter to true.
Connect as oe user.
The JRepUtil class implemen ts thesemethods.
lowercase
monospace
(fixed-width
font) italic
Lowercase monosp ace italic fontrepresents p laceholders or variables.
You can sp ecify the parallel_clause.
Run Uold_release.SQL where old_release
refers to the release you installedprior to up grading.
Convention Meaning Example
[ ] Brackets en close on e or m ore op tion alitems. Do not enter the brackets.
DECIMAL (digits [ , precision ])
{ } Braces enclose two or m ore items, one ofwhich is required. Do n ot enter thebraces.
{ENABLE | DISABLE}
| A vertical bar represents a choice of twoor more op tions within brackets or braces.Enter one of the options. Do not enter thevertical bar.
{ENABLE | DISABLE}
[COMPRESS | NOCOMPRESS]
Convention Meaning Example
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
26/244
xxvi
... Hor izontal ellipsis points ind icate either:
s That we have omitted p arts of thecode that are not d irectly related tothe example
s That you can repeat a portion of thecode
CREATE TABLE ... AS subquery;
SELECT col1, col2, ... , coln FROM
employees;
.
..
Vertical ellipsis points indicate tha t w ehave om itted several lines of code notdirectly related to the example.
Other notation You must enter symbols other thanbrackets, braces, vertical bars, an d ellipsispoints as shown .
acctbal NUMBER(11,2);
acct CONSTANT NUMBER(4) := 3;
Italics Italicized text indicates placeholders orvariables for wh ich you m ust sup plyparticular values.
CONNECT SYSTEM/system_password
DB_NAME = database_name
UPPERCASE Upp ercase typeface indicates elementssupp lied by the system. We show theseterms in up percase in order to distingu ishthem from term s you define. Unless termsapp ear in brackets, enter them in theorder and with the spelling shown.How ever, because these terms are notcase sensitive, you can enter them inlowercase.
SELECT last_name, employee_id FROM
employees;
SELECT * FROM USER_TABLES;
DROP TABLE hr.employees;
lowercase Lowercase typeface ind icatesprogramm atic elements that you su pp ly.For example, lowercase ind icates nam esof tables, columns, or files.
Note: Some programmatic elements use amixture of UPPERCASE and lowercase.Enter these elements as shown.
SELECT last_name, employee_id FROM
employees;
sqlplus hr/hr
CREATE USER mjones IDENTIFIED BY ty3MU9;
Convention Meaning Example
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
27/244
xxvii
Documentation AccessibilityOracle's goal is to make our prod ucts, services, and sup porting d ocumen tationaccessible to the d isabled commun ity with good usability. To that en d, ou r
docum entation includes features that make information available to users of
assistive technology. This documentation is available in HTML format, and contains
markup to facilitate access by the d isabled commu nity. Stand ards will continu e to
evolve over time, and Oracle is actively engaged w ith other m arket-leading
technology vendors to address technical obstacles so that our docum entation can be
accessible to a ll of our custom ers. For ad ditional information, visit the Oracle
Accessibility Program Web site at:
http://www.oracle.com/accessibility/
JAWS, a Wind ows screen read er, may not alw ays correctly read the code examples
in this documen t. The conventions for w riting code require that closing braces
shou ld appear on an otherw ise emp ty line; how ever, JAWS may n ot always read a
line of text tha t consists solely of a bracket or brace.
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
28/244
xxviii
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
29/244
xxix
Whats New in Cluster Software
Deployment and Performance?
This section describes the features of Oracle9i release 1 (9.0.1) as they pertain to
app lication d eploymen t and tun ing in Real App lication Clusters. This section
contains the following topic:
s Oracle9i Release 1 (9.0.1) New Features for Application Deployment and
Tun ing in Real Ap plication Clusters
See Also: Oracle9i Real A pplication Clusters Concepts for a more
complete explanation of new features for Real App lication Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
30/244
xxx
Oracle9iRelease 1 (9.0.1) New Features for Application Deployment and
Tuning in Real Application ClustersThe Oracle9i release 1 (9.0.1) Real Ap plication Clusters features an d enhan cements
described in th is section are pa rt of an effort to simp lify app lication d eploymen t.
Real Application Clusters is a n ew architecture offering scalability an d high
availability features tha t exceed the capabilities of previous O racle cluster software
releases.
s Cache Fusions breakthrough technology simplifies the deployment for many
types of online e-commerce and decision support (DSS) applications
You can d eploy a w ide variety of app lication types on Real Application
Clusters withou t significant code mod ifications.
s
Cache Fusion automatically controls resource assignments for files accessedby applications in Real Application Clusters environments
You n o longer have to assign locks to d atafiles or par tition your ap plication
wh en launching app lications on Oracle cluster software. In ad dition, Real
App lication Clusters introdu ces direct cache-to-cache b lock transfers to
improve performance.
s Three new v iew s allow you to examine how Oracle is mastering resources:
V$GCSHVMASTER_INFO for Global Cache Service resources except those
belonging to files mapp ed to a p articular m aster
V$GCSPFMASTER_INFO for Global Cache Service resources belonging to
files map ped to instances
V$HVMASTER_INFO for Global Enqueue Service resources
These views track the current and previous master instances and the nu mber of
global cache (V$GCSHVMASTER_INFO) and global cache resources belonging to
a file accessed frequently by a single instance (V$GCSPFMASTER_INFO), as w ell
as the number of re-masterings of enqueu e (V$HVMASTER_INFO) resources.
See Also: Part One, "Introdu ction to Dep loyment in Real
App lication Clusters"
See Also: Part Two, "Scaling Ap plications and Designing
Databases for Real App lication Clusters"
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
31/244
xxxi
s Automatic undo management:
Oracle Corpora tion recomm ends that you d eploy Real App lication Clustersapp lications using automatic undo m anagement. Automatic undo
managem ent minimizes the adm inistrative overhead of managing un do
tablespaces.
See Also: Oracle9i Real Application Clusters Administration for more
information on using automatic undo m anagement
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
32/244
xxxii
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
33/244
Part IIntroduction to Deployment in Real
Application Clusters
Part One introdu ces the top ic of application d evelopmen t for Real App lication
Clusters. Part One explains how to take ad vantage of Oracles high availability and
scalability features in Real App lication Clusters environmen ts. The chap ters in Par t
One are:
s Chap ter 1, "Introdu ction to App lication Dep loyment for Real App lication
Clusters"
s Chap ter 2, "Online E-Comm erce and Data Warehousing Ap plication
Deployment in Real App lication Clusters"
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
34/244
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
35/244
Introduction to Application Deployment for Real Application Clusters 1-1
1Introduction to Application Deployment for
Real Application Clusters
This chap ter d escribes Oracle Real Application Clusters app lication d eployment
issues. This chapter first explains considerations for taking ad vantage of the
scalability features of Real Application Clusters. It then exp lains some of the general
issues of app lication d eploymen t in Real Application Clusters environm ents.
This chap ter includes th e following top ics:
s Taking Full Advantage of Oracle9i Features
s Implementing Oracle9i Features with Real App lication Clusters
s Deployment Phases for Real App lication Clusters
Taking Full Advantage of Oracle9i Features
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
36/244
1-2 Oracle9i Real Application Clusters Deployment and Performance
Taking Full Advantage of Oracle9iFeatures
To optimally deploy ap plications w ithin Oracle9i Real Application Clustersenvironm ents, consider th e issues for the Oracle features d escribed in th is chap ter.
Proper implementation of these features minimizes deployment and integration
problems. It also ensures that you r system takes full advantage of the breakthrou gh
technology ofCache Fusion and the high -performance features of Real App lication
Clusters.
The feature d escriptions in this chapter p rovide a starting p oint for Real
App lication Clusters app lication deploymen t. For additional information aboutthese features, refer to other Oracle docum entation as noted .
Implementing Oracle9iFeatures with Real Application ClustersYou should consider several app lication dep loyment issues to op timize Oracle9i
Real Application Clusters performance. These issues relate to features tha t are
un ique to Oracle and that enh ance the performan ce of Real App lication Clusters.
The features d iscussed in this section are:
s High Availability and Failover in Real App lication Clusters
s Oracle Net in Real App lication Clusters
s The Shared Server in Real Ap plication Clusters
s Connection Load Balancing
s
Transp arent App lication Failover in Real App lication Clusterss PL/ SQL in Real App lication Clusters
s Recovery Manager (RMAN) in Real App lication Clusters
s Cluster File Systems in Real Application Clusters
High Availability and Failover in Real Application Clusters
High availability systems are systems that have redu nd ant hard ware and softwarethat m aintains opera tions desp ite failures. Well designed h igh availability systems
avoid having single points-of-failure. When failures occur, failover moves the
processing performed by th e failed comp onent to the backup compon ent. Oracles
failover p rocess qu ickly re-masters resou rces, recovers p artial or failed tr ansactions,
and rapidly restores the system.
Implementing Oracle9i Features with Real Application Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
37/244
Introduction to Application Deployment for Real Application Clusters 1-3
You can combine m any Oracle produ cts and features to create highly reliable
comp uting environments. Doing th is requires capacity and redun dancy p lanning.
You m ust also set expectations an d examine you r service level agreements. In
add ition, consider your overall system costs and you r return on investm ent. There
are also other pr actical considerations such as selecting the ap prop riate hardw are
and deciding w hether to u se idle machines that simultaneously serve as part of
your h igh availability configu ration.
Primary/Secondary and Active/Active Instance Configurations
Primary/ Second ary configurations are the least comp licated type of highavailability configuration to set up . These are also the easiest type of configurations
to adm inister. For example, the administrative overhead for a primary d atabase in
this configuration is the sam e as the overhead of a single instanceconfiguration.
In Primary/ Second ary configura tions, the second instance does not have to remain
idle. For examp le, you can u se the second instan ce for read -only operations.
You d o not have significant scalability w ith Primary/ Second ary configu rations, but
you do have high av ailability. Active/ active instance configura tions, on the oth erhand, are more comp lex to configure. In Active/ Active configu rations, performance
is the critical factor.
Oracle Real App lication Clusters Guard, which is an enhan ced configurat ion of Real
App lication Clusters, offers yet another h igh availability solution. Real App lication
Clusters Guard tightly integrates Oracles enhan ced recovery features within th e
clusterframew ork of your platform. Real App lication Clusters Guard is only
available on sp ecific UN IX configurations.
Oracle Net in Real Application Clusters
Oracle N et enables services and their app lications to reside on d ifferent comp utersand allows them to comm un icate with each other. Oracle Net establishes netw ork
sessions and transfers data betw een clients and servers or between two servers.
Real Application Clusters requ ires Oracle Net to enable connectivity; you mu st
install Oracle Net on each machine in your netw ork.
See Also: Oracle9i Real A pplication Clusters Concepts for moreinformation abou t Real Application Clusters and high ava ilabilityand for more conceptual information abou t Real App lication Clus-ters Guard
See Also: The Oracle Net Services Administrators Guide for more
information about Oracle Net
Implementing Oracle9i Features with Real Application Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
38/244
1-4 Oracle9i Real Application Clusters Deployment and Performance
The Shared Server in Real Application Clusters
Real App lication Clusters w ith the functionality of the shared server can p rocessthou sand s of concurrently connected d atabase u sers. Shared server is extremely
efficient at managing the connection load for many u sers; shared server operates
similarly to the w ay that transaction monitors work.
Real App lication Clusters with shared server significantly enhances the
performance of app lications running on tw o or more smaller comp uters. You d o
not need to rewrite you r applications to use shared server. In fact, some
app lications perform better w ith shared server than without.
With sha red server configurations, u ser processes connect to a dispatcher. The
dispatcher then directs multiple incoming netw ork session requests to a comm on
queu e. When a server process becomes available, the d ispatcher connects the
incoming request to the idle dispatcher. When th e connection is no longer needed ,
the server process is available for another request. Thus, a sm all set of server
processes can serve a large nu mber of clients.
Connection Load BalancingThe connection load balancing feature autom atically distributes connections
among active instances. Connection load ba lancing d oes this based on the work load
of the d ifferent nodes and instances in a cluster. You can u se connection load
balancing, in both sha red server and dedicated server environments. Real
App lication Clusters and Cache Fusion combined w ith connection load balancing
allow you to ru n m any types of app lications without ap plication or data
partitioning.
Transparent Application Failover in Real Application Clusters
The transparent appl ication failover (TAF) feature au tomatically reconnectsapplications to the database if the connection fails. Because the re-connection
hap pens autom atically within the OCI library, you d o not need to change the client
application to use TAF.
Because m ost TAF functionality is imp lemented in the client-side netw ork libraries
(OCI), the client m ust u se the Oracle Net OCI libraries to take advantage of TAF
Note: You m ust install Oracle Net to u se shared server an d its
load balancing features.
Implementing Oracle9i Features with Real Application Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
39/244
Introduction to Application Deployment for Real Application Clusters 1-5
functionality. Therefore, to implement TAF in Real Application Clusters, make sure
you use JDBC OCI instead of PL/ SQL packages.
You can also use TAF in Primary/ Second ary Instance configu rations. If you do this,
then use the INSTANCE_ROLE parameter in the Connect Data portion of the connect
descriptor to configure explicit secondary instance connections.
To use TAF, you m ust have a license for the Oracle9i Enterprise Edition . BecauseTAF was designed for Real App lication Clusters, it is mu ch easier to configure TAF
for that env ironmen t. How ever, TAF is not restricted for use w ith Real App lication
Cluster s environments. You can a lso use TAF for single instance Oracle. In addition,
you can u se TAF for the following system typ es:
s Oracle Real App lication Clusters Guard
s Replicated Systems
s Data Guard
PL/SQL in Real Application ClustersPL/ SQL is Oracle's proced ural extension of SQL. PL/ SQL is an ad van ced
fourth-generation program ming langu age that offers features such as da ta
Note: Although Real App lication Clusters supp orts both thin
JDBC and JDBC OCI, TAF is only su pp orted with JDBC OCI.
See Also: Oracle9i Real Application Clusters Administration for
information about u sing the INSTANCE_ROLE parameter in Real
App lication Clusters and the Oracle Net Services Administrators
Guide for more detailed information and examp les on this
parameter
See Also:
s Oracle9i Real A pplication Clusters Concepts for more conceptu al
information on Oracle Real Application Clusters Guard and
TAF in Real Ap plication Clusters
s Oracle Net Services Administrators Guide and the Oracle Call
Interface Programmers Guide for more information on TAF
s Oracle9i Replication for more information on Oracle replication
Implementing Oracle9i Features with Real Application Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
40/244
1-6 Oracle9i Real Application Clusters Deployment and Performance
encapsu lation, overload ing, collection typ es, exception han dling, and information
hid ing. PL/ SQL also offers seamless SQL access, tight integrat ion with the Oracle
server, as well as tools, port ability, and security.
Recovery Manager (RMAN) in Real Application ClustersRecovery Manager (RMAN ) is an Oracle tool that you can use to backup, copy,
restore, and recover datafiles, control files, and archived red o logs. You can invokeRMAN as a comm and line utility or use it through the Oracle Enterprise Managers.
RMAN au tomates many backup and recovery tasks. For example, RMAN
automatically locates the app ropriate backup s for each datafile and copies them to
the correct destinations. This eliminates the manu al, error-prone effort of using
operating system comm ands to accomplish the same task.
You mu st accurately configure RMAN so that all instances can access all the archive
logs through out the cluster. When one instan ce fails, the su rviving instance thatperforms recovery mu st access the archive logs of the failed instance.
Cluster File Systems in Real Application ClustersOracle9i sup ports cluster file systems on a limited num ber of platforms. Cluster file
systems simp lify Real App lication Clusters installation and m anagem ent. Using
cluster file systems elimina tes the need to manage raw devices. Cluster file systems
also offers scalable, low latency, highly resilient file systems that sign ificantly red uce
storage costs. For details on how to imp lement cluster file systems, refer to you r
vendor cluster file system d ocum entation.
See Also: The PL/SQL Users Guide and Reference for more
information abou t PL/ SQL
See Also: Oracle9i Real Application Clusters Administration for
details on configur ing RMAN for use w ith Real App lication
Clusters and Oracle9i Recovery Manager Users Guide and Reference
for detailed information on RMAN
Deployment Phases for Real Application Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
41/244
Introduction to Application Deployment for Real Application Clusters 1-7
Deployment Phases for Real Application Clusters
The next chapter in Part On e examines app lication developm ent for onlinee-commerce and d ecision support system s. The remainder of this book examines
the design and p erformance phases of dep loyment for Real Application Clusters.
1. Design your ap plication considering the issues d escribed in Chapter 3, "Scaling
App lications for Real App lication Clusters"an d Chapter 4, "Database Design
Techniques for Real Application Clusters".
2. Install your ap plication, popu late your database, and launch the application.
3. Monitor your Real App lication Clusters environm ent, examine p erformance,
and tun e your Real App lication Clusters database and ap plication as described
in and Part III and Part IV.
Deployment Phases for Real Application Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
42/244
1-8 Oracle9i Real Application Clusters Deployment and Performance
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
43/244
Online E-Commerce and Data Warehousing Application Deployment in Real Application Clusters 2-1
2Online E-Commerce and Data Warehousing
Application Deployment in Real ApplicationClusters
This chap ter d iscusses the d eploymen t of online e-comm erce (OLTP) and da ta
warehousing applications inOracle Real Application Clusters
environments. Thischapter also briefly describes app lication performance tuning.
This chap ter includes th e following top ics:
s Cache Fusion and E-Comm erce Applications for Real App lication Clusters
s Flexible Implemen tation w ith Cache Fusion
s Deployment Strategies for Real App lication Clusters-Based App lications
s Deploying Data Warehousing Ap plications for Real App lication Clusters
s Deployment and Tun ing of Real App lication Clusters App lications
Cache Fusion and E-Commerce Applications for Real Application Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
44/244
2-2 Oracle9i Real Application Clusters Deployment and Performance
Cache Fusion and E-Commerce Applications for Real Application
ClustersCache Fusion processing m akes the Real App lication Clusters database the optimal
dep loyment server for online e-comm erce applications. This is because these types
of app lications requ ire:
s High availability
s Scalability
s Load balancing according to demand fluctuationsTo accommodate high availability, Cache Fusion offers multi-instance processing
capabilities to re-distribute w orkloads to surviving instances withou t interrup ting
processing. Real App lication Clusters also au tomatically re-masters resou rces to
give the instancew ith the most activity on a particular datafi le, for example, a
greater share of control over the resources for that datafile.
Cache Fusion also provid es excellent scalability so that if you ad d or replace nodes,
Oracle automatically re-masters resources and even ly distributes processing loadswithout reconfiguration or ap plication re-partitioning. Real App lication Clusters
also takes advan tage of Oracle load balancing features.
Real App lication Clusters app lication w orkload m anagem ent is dynamic. Real
App lication Clusters can alter workloads in real-time based on changing bu siness
requiremen ts. This occurs in a man ageable environm ent with m inimal
administrative overhead . The d ynam ic resource allocation capabilities of the Cache
Fusion architecture p rovide optim al performan ce for online app lications w ith great
dep loyment flexibility.
Flexible Implementation with Cache FusionE-commerce requirements, especially the requ irements of online tr ansaction
processing systems, have w orkloads th at change frequent ly. To accomm odate this,
Real App lication Clusters dep loyments remain flexible and d ynam ic. They prov ide
a w ide range of service levels that, for examp le, migh t fluctua te du e to:
s Varying user d emand s
s Peak scalability issues like trading storms (bu rsts of high volum es of
transactions)
s Varying availability of system resources
Deployment Strategies for Real Application Clusters-Based Applications
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
45/244
Online E-Commerce and Data Warehousing Application Deployment in Real Application Clusters 2-3
To address these requirements, it is imp ractical and often too comp lex to pa rtition
packaged e-comm erce applications, du e to the limited access to table partitioning.
Once deployed , such app lications can access hu nd reds, or even thou sand s, oftables. Moreover, app lication par titioning is a d ifficult if not imp ossible task. A
comm on recomm endation is that you u se a larger server or that you segment the
app lication or application modu les across distinct databases.
Segmen ting app lications, however, can fragm ent data and constrain a global
enterp rise-wide view of your information. Cache Fusion eliminates such
requirements by dynamically migrating database resources to adapt to changing
business requirements and workloads.Cache Fusion d ynam ically allocates da tabase resources to nodes based on da ta
access patterns. This makes the d ata available on dem and . In other w ords, if an
instance recently accessed th e data, the d ata is always in a local cache. The Cache
Fusion architecture also m igrates resources to accelerate data access, thus m aking
Real App lication Clusters a h igh performance e-commerce database platform.
Because re-par titioning efforts cannot keep p ace with the rap id changes in system
dem and , Real App lication Clusters also takes advan tage of other features such asthe shared server. Shared server greatly enhances scalability by p roviding
connection p ooling and Connection Load Balancing.
Deployment Strategies for Real Application Clusters-BasedApplications
Tightly integrated , tw o-, three-, and n-tier architectures are rap idly replacingtrad itional, distributed d esigns. These architectures use a compon ent-based
app roach to systems d eployment. This means that in add ition to the design and
front-end developm ent tasks required to laun ch viable web-based ap plications for
Real App lication Clusters, you m ay also need to consider you r middlew are
performance requirements.
Transition to N-tier ArchitecturesExpensive servers residing in mu ltiple locations are being rap idly replaced by
individu al servers connected to m iddleware compon ents. Newer n-tier
architectures are obviously less costly because they eliminate redun dant server
hardw are. They also eliminate redu nd ant d atabase connections and reduce the
amoun t of data that m ust travel through the network.
Deployment Strategies for Real Application Clusters-Based Applications
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
46/244
2-4 Oracle9i Real Application Clusters Deployment and Performance
In addition, trad itional architectures are transitioning from requiring static,
inflexible connections to using full-time, internet-based connectivity. This is
especially true for business-to-business (B2B) models. Real Application Clustersallows seamless integration into the n -tier mod els compon ent-based architecture as
shown in Figure 21.
Figure 21 N-tier Architecture Middleware Components and Real Application Clusters
BrowserClient
Browser
Database
RealApplicationClusters
WebServer ApplicationServer
E-CommerceApplications
LDAPServer
Deployment Strategies for Real Application Clusters-Based Applications
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
47/244
Online E-Commerce and Data Warehousing Application Deployment in Real Application Clusters 2-5
Benefits of N-Tier Architectures with Real Application Clusters
N-tier architectures p rovide enh anced scalability by encapsu lating app licationfunctions within smaller subcompon ents. These comp onents are then linked within
the n-tier framework. This combination:
s Decreases the network load on any one part of the infrastructure
s Minimizes or eliminates single-points-of-failure
s Significantly reduces netw ork traffic
N-tier architectures also imp rove manageability by reducing hard ware andsoftware overhead . In addition, n-tier architectures offer h igh ava ilability and
increased reliability by providing connection pooling and en hanced load balancing.
Monitoring and Tuning Performance in N-Tier Environments
Because n-tier environmen ts have more interrelated, interdepend ent compon ents
than trad itional mod els, you shou ld mon itor and tun e the performance of your Real
App lication Clusters environment at the following levels:
s Application
s Database
s Operating System
See Also: The Oracle9i Database Performance Guide and Reference
and the Oracle9i Data Warehousing Guide for information that is
specific to tuning the Oracle database, and you r vend or sdocumentation for operating system tuning information
Deploying Data Warehousing Applications for Real Application Clusters
-
8/7/2019 Bauer M. - Oracle 9i Real Application Clusters. Deployment and Performance (Part No. A89870-02) (Release 9.0.1) (2001)
48/244
2-6 Oracle9i Real Application Clusters Deployment and Performance
Deploying Data Warehousing Applications for Real Application Clusters
This section d iscusses deploying data w arehousing systems in Real ApplicationClusters environmen ts by briefly describing the data warehousing features
available in sh ared disk architectures. The top ics in th is section are:
s Speed -Up for Data Warehou sing Applications on Real App lication Clusters
s Dynam ic Parallel-Aware Query Optim ization
Speed-Up for Data Warehousing Applications on Real Application ClustersE-businesses strategically use d ata warehousing systems to acquire custom ers and
expand markets. For example, company product promotions gather information
using d ata w arehousing system s to custom ize client lists that best fit the profiles of
the companys target demographics.
Real App lication Clusters is ideal for data w arehousing app lications because it
augmen ts the single instance benefits of Oracle. Real App lication Clusters d oes this
by m aximizing the p rocessing available on all nodes of a clusterto provide
speed-up an d scale-up for data w arehousing systems.
Flexible Parallelism within Real Application Clusters Environments
Oracles parallel execution feature uses m ultiple p rocesses to execute SQLstatemen ts on one or more CPUs. Parallel execution is available on both single
instance and Real App lication Clusters da tabases.
Real App lication Clus