Académique Documents
Professionnel Documents
Culture Documents
Goals
• Overview of RAC & RAC Tuning
• Target RAC tips that are most
useful
Non-Goals
• Learn ALL aspects of RAC
A TUSC Presentation 2
Overview
• RAC Overview
• Tuning the RAC Cluster
Interconnect
• Monitoring the RAC
Workload
• Monitoring RAC specific
contention
• What’s new in 10g
• Summary A TUSC Presentation 3
Overview of Oracle9i RAC
Server 1 Server 2
Instance ‘A’ Instance ‘A’
Database
‘A’
SERVER failure
Protect- from
your database
SERVER failures
remains available
A TUSC Presentation 6
E-Business Suite Scalability
with Oracle9i RAC
84%
Oracle11i E-Business Suite Benchmark Scalability
7,000
6,000 6,496
5,000 5,433
# Users 4,000
4,368*
3,000
2,000 2,296*
1,000 1,288
0
1 Node 2 Nodes 4 Nodes 5 Nodes 6 Nodes
A TUSC Presentation 8
Normal Database Tuning and Monitoring
– APPLICATION Tuning
– DATABASE Tuning
– OS Tuning
You can begin tuning RAC
A TUSC Presentation 9
Tuning the RAC Cluster Interconnect
A TUSC Presentation 10
Tuning the RAC Cluster Interconnect
How:
1) Query V$SESSION_WAIT to determine
whether or not any sessions are
experiencing RAC related waits.
SELECT inst_id,
event,
p1 FILE_NUMBER,
p2 BLOCK_NUMBER,
WAIT_TIME
FROM v$session_wait
WHERE event in ('buffer busy global cr',
'global cache busy',
'buffer busy global cache');
A TUSC Presentation 13
Tuning the RAC Cluster Interconnect
A TUSC Presentation 14
Tuning the RAC Cluster Interconnect
SELECT owner,
segment_name,
segment_type
FROM dba_extents
WHERE file_id = 9
AND 150 between block_id AND block_id+blocks-1;
A TUSC Presentation 15
Tuning the RAC Cluster Interconnect
A TUSC Presentation 16
Tuning the RAC Cluster Interconnect
A TUSC Presentation 17
Tuning the RAC Cluster Interconnect
CR Block Transfer Time
A TUSC Presentation 18
Tuning the RAC Cluster Interconnect
CR Block Transfer Time
• Problem Indicators:
– High Transfer Time
– One node showing excessive transfer
time
A TUSC Presentation 20
Tuning the RAC Cluster Interconnect
CR Block Service Time
• Result:
Instance 1 is on a
faster node and serves
Instance LMS Service Time blocks faster.
--------- ----------------
1 1.07933923
The service time
2 .636687318
TO Instance 2 is
shorter!
Instance 2 is on the
slower node.
A TUSC Presentation 23
Tuning the RAC Cluster Interconnect
CR Block Service Time
$ netstat –l
$ netstat –s
$ sar –c
$ sar –q
$ vmstat
A TUSC Presentation 26
Tuning the RAC Cluster Interconnect
Global Performance Views for RAC
• GV$SYSSTAT, GV$DML_MISC,
GV$SYSTEM_EVENT, GV$SESSION_WAIT,
GV$SYSTEM_EVENT contain numerous
statistics that are of interest to the DBA
when tuning RAC.
A TUSC Presentation 29
Tuning the RAC Cluster Interconnect
Undesirable Statistics
0 0 652 0
Instance 2 is
experiencing some lost
blocks.
A TUSC Presentation 30
Tuning the RAC Cluster Interconnect
Undesirable Statistics
A TUSC Presentation 33
Tuning the RAC Cluster Interconnect
Current Block Transfer Statistics
A TUSC Presentation 34
Tuning the RAC Cluster Interconnect
Current Block Service Time Statistics
A TUSC Presentation 36
Tuning the RAC Cluster Interconnect
Current Block Service Time Statistics
A TUSC Presentation 37
Tuning the RAC Cluster Interconnect
Current Block Service Time Statistics
A TUSC Presentation 39
Tuning the RAC Cluster Interconnect
Global Cache Convert and Get Times
A TUSC Presentation 41
Tuning the RAC Cluster Interconnect
Global Cache Convert and Get Times
Description:
Event:
•A session has to wait for receiving
global cache open permission for shared(s) or
s exclusive(x) access to the requested
resource
global cache open
•Wait duration should be short.
x
•Wait followed by a read from disk.
•Blocks requested are not cached in
any instance.
on:
t much can be done
en associated with high totals or high per-transaction wait time
ocks are not cached.
l cause sub-optimal buffer cache hit ratios
nsider preloading heavily used tables
A TUSC Presentation 44
Tuning the RAC Cluster Interconnect
Other Wait Events
Event: Description:
global cache null • Happens when two instances
to s exchange the same block back
and forth over the network.
global cache null
to x •These events will consume a
greater proportion of total wait
time if one instance requests
cached data blocks from other
instances.
ction:
Reduce the number of rows per block to eliminate the need for b
wapping between instances.
A TUSC Presentation 45
Tuning the RAC Cluster Interconnect
Other Wait Events
Event: Description:
global cache cr • Happens when an instance
request requests a CR data block and the
block to be transferred hasn’t
arrived at the requesting
instance.
Action:
•Examine the cluster interconnects for possible problems.
•Modify objects to reduce possibility of contention.
A TUSC Presentation 46
Tuning the RAC Cluster Interconnect
High GCS Time Per Request
A TUSC Presentation 48
Tuning the RAC Cluster Interconnect
High GCS Time Per Request
System Load
•If processes are queuing for the CPU, raise the priority
of the GCS processes (LMSn) to have priority over other
processes to lower GCS times.
Network issues
• OS logs and OS stats will indicate if a network link is
congested.
A TUSC Presentation 51
Tuning the RAC Cluster Interconnect
Using STATSPACK Reports
A TUSC Presentation 52
Tuning the RAC Cluster Interconnect
Using STATSPACK Reports
-------------------------------------------------------------
•Transfer times are excessive from other
instances in this cluster to this instance.
•Could be due to network problems or buffer
cache sizing issues.
A TUSC Presentation 53
Tuning the RAC Cluster Interconnect
Using STATSPACK Reports
A TUSC Presentation 54
Tuning the RAC Cluster Interconnect
After network and index
Using STATSPACK Reports changes.
A TUSC Presentation 56
Tuning the RAC Cluster Interconnect
Using STATSPACK Reports
A TUSC Presentation 58
Tuning the RAC Cluster Interconnect
Using STATSPACK Reports
Statistic: Description:
gcs blocked • Instance requested a block from
converts another instance and was unable
to obtain the conversion of the
gcs blocked cr
block.
converts
•Indicates users on different
instances need to access the
same blocks.
:
ent users on different instances from needing access to the sam
re sufficient freelists (not an issue if using automated freelists)
ce block contention through freelists, initrans.
rows per block.
A TUSC Presentation 60
Tuning the RAC Cluster Interconnect
Using STATSPACK Reports
GES Lock GES Pin GES Pin GES Inval GES Invali-
Namespace Requests Requests Releases Requests dations
--------------- ------------ ------------ ------------ ----------- -----------
BODY 1 0 0 0 0
CLUSTER 4 0 0 0 0
INDEX 84 0 0 0 0
SQL AREA 0 0 0 0 0
TABLE/PROCEDURE 617 192 0 77 0
TRIGGER 0 0 0 0 0
A TUSC Presentation 62
Tuning the RAC Cluster Interconnect
Using STATSPACK Reports
reads:
A TUSC Presentation 65
Tuning the RAC Cluster Interconnect
GES Monitoring
A TUSC Presentation 72
Tuning the RAC Cluster Interconnect
CACHE_TRANSFER views
A TUSC Presentation 73
Tuning the RAC Cluster Interconnect
CACHE_TRANSFER views
V$FILE_CACHE_TRANSFER
• FILE_NUMBER shows the file FILE_NUMBER NUMBER
numbers of datafiles that are X_2_NULL NUMBER
source of blocks transferred. X_2_NULL_FORCED_WRITE NUMBER
X_2_NULL_FORCED_STALE NUMBER
X_2_S NUMBER
X_2_S_FORCED_WRITE NUMBER
•Use this view to show the S_2_NULL NUMBER
block transfers per file. S_2_NULL_FORCED_STALE NUMBER
RBR NUMBER
RBR_FORCED_WRITE NUMBER
RBR_FORCED_STALE NUMBER
NULL_2_X NUMBER
S_2_X NUMBER
NULL_2_S NUMBER
CR_TRANSFERS NUMBER
CUR_TRANSFERS NUMBER
A TUSC Presentation 76
Tuning the RAC Cluster Interconnect
CACHE_TRANSFER views
A TUSC Presentation 77
Tuning the RAC Cluster Interconnect
Monitoring the GES Processes
A TUSC Presentation 78
Tuning the RAC Cluster Interconnect
Monitoring the GES Processes
SELECT *
FROM gv$enqueue_stat
WHERE total_wait# > 0
ORDER BY inst_id, cum_wait_time desc;
A TUSC Presentation 81
Enterprise Manager – 9i
A TUSC Presentation 82
Statspack – Top Wait
Events
A TUSC Presentation 83
Statspack - Top Wait Events
Things to look for…
Administration
Network and Monitoring
Load Balancer Provisioning
Applications
Security
Enterprise
Manager
Storage
A TUSC Presentation 90
What’s New in EM 10g
Area EM 9i EM 10g Key EM10G functionality
Oracle Database Application Performance
Oracle9iAS Management
– Real performance for All Your
Oracle Collab Users, All Your Pages, All the
Suite Time
Oracle eBusiness – Application Availability
Suite – Synthetic transactions
– End-to-end tracing
Operating System Enterprise Configuration
Storage Management
– Rapid installation
Network – Deployment
– Provisioning
SLB (Nortel, F5) – Upgrade
– Automated patching
Hardware
Admin and
Monitoring A TUSC Presentation 91
End to End Solution
DB All Target Types
• General health assessment • System and application
iAS
• Bad SQL identification availability
• Config changes across cluster • Set up of target-specific
• Top SQL identification
(OC4J, Apache) • SQL recommendations metrics/thresholds
• Create/Manage cluster • Configuration data collection
• Tuning advisories
• Deploy app to cluster • Performance data collection
• Performance trending
• Reconfigure a farm • Comprehensive monitoring
• Backup
• Add/Remove node from cluster • Alerts
• Restore
• Clone (mid-tiers) • Email and Paging notifications
• Security vulnerability ID
• Patch • Blackouts
• Create/remove
OCS Physical/Logical Standby • User-defined jobs
• Standby health assessment • System and application
• IMAP, SMTP End-2-end service
• Standby switchover/failover response time measurements
monitoring • Policy violation reporting
• Files End-2-end service
RAC • Clone Oracle Home
monitoring • Patch search/download
• Files document analysis: count, • Cluster cache coherency
size, format monitoring
• Files user analysis: number, • Failover events ASM
quota consumed • Discovery of RAC topology • Disk group admin (rebalance)
• Startup/shutdown • Startup/Shutdown
Host/Host Clusters • Relocate services • Disk group usage/status
• Failover jobs • I/O performance
• Top processes identification
A TUSC Presentation • Add/Remove disks 92
Monitor All Targets
Monitor
Targets…
are they
up?
Target
Alerts
A TUSC Presentation 93
View it Wireless
Target
Alerts
A TUSC Presentation 94
Application
Performance Issues
A TUSC Presentation 95
Middle Tier Performance
Analysis
Monitor
Web
Apps.
Web
App.
Alerts
A TUSC Presentation 97
Choose a Host
Select
Targets
tab
Pick a
Host
A TUSC Presentation 98
App. Server Response Time
Choose
App.
Server
App
Server
Response
Time &
Info.
A TUSC Presentation 99
App. Server Performance
Memory
CPU
Web
Cache
Hits
Choose
Web
Apps.
Choose
the App.
To
Monitor
Page
Response
Time
Detailed
Info.
Click
Alert
for this
A TUSC Presentation 102
View the Web Application
Page
Response
Time
Detail
Web
Page
Response
Time all
URL’s
internet
Middle Tier
A TUSC Presentation 105
Middle Tier Performance
Web
Page
Detail
Response
Time all
URL’s
Splits
Time
into
Parts A TUSC Presentation 106
Host Performance
Each
Piece of
the Web
App.
Choose
the Host
I/O
Memory
CPU
Hardware
O/S
Software
Side by
Side
Compare
Create a
Prod DB’s
Group
Pick
Items for
the Group
A TUSC Presentation 113
Database Performance
View the
Prod DB’s
Group
Check
Alerts &
Policy
Issues
A TUSC Presentation 114
Database Performance
Alert
History
Waits
Advice –
Click
Here for
Issues
A TUSC Presentation 115
Database Performance
Alert
Issues
Major
Waits
Fix
Critical
Policy Management
• Rule definitions
Policy • Violation detection
• Corrective action
Security policies
• Software
installation
hardening
• Excess
services/ports
• Excess user
privileges
Configuration policies
• Best practices
• Base images
A TUSC Presentation 118
Performance polices
Automated Best Practices -
Database
Database Services
All Oracle Software 2. Enable listener logging
2. Security alerts
3. Password-protect listeners
3. Critical patches
4. Disable direct listener administration
Host 5. Disallow remote OS roles and authentication
5. Detect open ports 6. Disallow use of remote password file
6. Detect insecure services 7. Restrict access to external procedure service
Monitor
Database
We have a
CPU
issue!
Monitor
Perform.
We have a
Concurr.
issue!
Monitor
for a
period of
time
Check the
Top SQL
Drill
down to
show the
Top SQL
Target
Alerts
Top SQL
Check
Execution
History or
Other
Options
Monitor
Database
Check the
Diagnostic
Summary
Target
Alerts
Check a
snapshot
Check the
findings
Finding
Details
Suggests!
I can do it
for you !
ADDM DBA
High-Load
SQL
SQL
Workload
SQL Tuning
Advisor
SQL Tuning
Automatic Tuning Optimizer Recommendations
SQL Tuning
Statistics Advisor Gather Missing or
Analysis Stale Statistics
SQL
Profiling Create a SQL
Profile
DBA
Access Path Add Missing
Analysis Indexes
Drill into
Top SQL
for worst
time
period
Get Help!
Tuning
Sets
Tune the
Top SQL
set.
SQL
Tuning
Sets Info
How long
to work on
this
Tuning
Results
for this
job
Suggests
using a
profile
For this
SQL
A TUSC Presentation 137
Using SQL Tuning Sets
Detailed
info
Improve
Factor and
click to
Use
Confirmed
to use
suggestion
Detail
Motivation
– Enable user to tune a custom set of SQL statements
It is a new object in Oracle10g for capturing SQL
workload
It stores SQL statements along with…
– Execution context: parsing user, bind values, etc.
– Execution statistics: buffer gets, CPU time, elapse
time, number of executions, etc.
It is created from a SQL source
– Sources: AWR, cursor cache, user-defined SQL
workload, another
A TUSCSTS
Presentation 140
Business Transaction Monitoring
- Set up Beacons!
Web Application
A TUSC Presentation 141
Transaction Monitoring
Recorder
1 2 3 4
E-Bus Suite
Oracle9iAS
Oracle
Beacon running
representative
transaction
Beacon running
representative
transaction
Oracle9iAS
Beacon running Oracle
representative Oracle9i
transaction Database
Database
Beacon running
representative
transaction
App Server
3rd Party
Beacon running
representative
transaction
E-Bus Suite
Oracle9iAS
Sales Office transaction
Oracle
Beacon running availability
transaction
Toronto
Sales Office
Oracle9iAS
Beacon running availability
transaction
Oracle
Database
Headquarters App Server
transaction
Tokyo
Sales Office
A TUSC Presentation 144
Enterprise Manager for the
Grid; Many more Options!
www.tusc.com
Oracle9i
Performance
Tuning Tips &
Techniques;
Richard J.
Niemiec; Oracle
Press (May
“If you are going through hell, keep going” -
2003)
Churchill A TUSC Presentation 148
References