Professional Documents
Culture Documents
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
Doug Burns
Background
Independent Oracle Consultant Oracle ACE Director Oak Table Network The guy with the plushy toys
http://oracledoug.com
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
Graham Wood
Background
Performance guy
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
What Is Big Data, and What Makes It Big? Wed 13:15 Moscone South 300
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
Program Agenda
Basics AWR Reports
Case Study
Administration and Diagnostics
Conclusions
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
Program Agenda
Basics AWR Reports
Case Study
Administration and Diagnostics
Conclusions
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Basics
Is this the Soup?
Repository for snapshots of Oracle performance data Introduced with Oracle 10g Licensed as part of Diagnostic Pack On by default Self-managing
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Basics
Snapshots
Capture performed by MMON process Captures data from V$ performance views
Cumulative data e.g. V$SYSSTAT Data based on deltas e.g. V$SQL Active Session History Metrics
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Basics
Snapshots
Process controlled by AWR metadata Settings visible in DBA_HIST_WR_CONTROL Metadata set using DBMS_WORKLOAD_REPOSITORY package Can also do manual snapshots
10
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Basics
Snapshots
Stores data in AWR tables in SYSAUX tablespace
WRH$_xxx for data WRM$_xxx for metadata
Access data directly using DBA_HIST_xxx views Large tables are partitioned for ease of management
Especially for purge Partition size depends on retention No license requirement
11
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Basics
Default configuration
SQL> select * from dba_hist_wr_control;
DBID SNAP_INTERVAL
4001518076 +00000 01:00:00.0
RETENTION
+00008 00:00:00.0
TOPNSQL
DEFAULT
AWR Basics
Recommended configuration
One hour or 30 minute snapshot interval
If you think you need less, you are probably using the wrong data Attend Active Session History Deep Dive Moscone S Rm 104 Wed 15:30
-- 90 days
AWR Reports
14
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Reports
Use the report based on the scope of the problem
How many AWR reports are there?
awrrpt.sql awrgrpt.sql
awrddrpt.sql Compare period report awrgdrpt.sql RAC Compare period report awrsqlrpt.sql AWR SQL history report ashrpt.sql
ASH report
addmrpt.sql
ADDM report
15
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Report
Beware!
AWR averages data over the
16
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Report
Beware!
AWR averages data over the
17
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Reports
Analyzing the AWR report
Scope the problem before starting to analyze the data AWR Report is very long But you are not expected to read it all Top few pages contains high level summary Summary leads you to where to look next
18
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Reports
Analyzing the AWR report
Look at the system overview unless you know the system well
CPU cores Memory OS Oracle version RAC? Connected sessions
19
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Reports
Analyzing the report
If resource is maxed out, target that first
DB CPU/sec => DB cores Paging/Swapping/High System time
20
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Reports
Analyzing the report
Or use Tyler Muths AWR Formatter for Chrome as a helper
http://tylermuth.wordpress.com/2011/04/20/awr-formatter/
Or RUN THE ADDM REPORT
21
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
AWR Reports
ADDM included in 12c AWR
Findings at top of report Full ADDM report towards end
of report
22
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
23
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
new partitions Various aggregation and reporting steps at end of run One of the aggregation jobs had been running for over an hour rather than a few minutes and had been killed On a Saturday morning (of course) When my replacements were all out of signal range (of course)
24 Copyright 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
Overall Approach
Performance Analysis is Informed Common Sense
Asking sensible questions
How long does this usually run for? Few minutes When did it start running slowly? This morning Ran just fine every other day, including the previous day
Start with the appropriate tools Use other tools for deeper analysis depending on the results
25
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
26
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
27
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
comparing
28
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
of basic report
Shows both values side-by-side
29
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
30
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
31
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
than usual
Check SQL statement Elapsed
Time Changes
Shows statements that appear
32
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
33
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
34
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
35
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
different plans
Long Elapsed Time so this is
the culprit
Lots of User I/O Wait Time
36
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
37
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
38
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
Colored SQL
Even an AWR fan curses it sometimes!
TOPNSQL defines how many statements AWR should capture
Over multiple dimensions
Which means that you often won't find the 'Good Guy' for comparison
with the 'Bad Guy' dbms_workload_repository.add_colored_sql allows you to specify a SQL_ID that will always be captured if it is in the cursor cache
39
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
40
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
ADDM
AWR Report use case
What did ADDM say? Host CPU was the issue Latch issue ranked third
41
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
42
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
43
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
44
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
On by default and self-managing Basket of tools for investigating performance issue Scope of issue should lead to choice of tool Drill down based on DB Time Remember to ask ADDM
45
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template
46
Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template