ash and awr performance data2
DESCRIPTION
PDF of ASH and AWR Performance data Presentation, Aug. 30th from Redgate Webinar. Webinar is available at Redgate's site.TRANSCRIPT
![Page 1: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/1.jpg)
Ash and AWR
Performance
Data Kellyn Pot’Vin
Sr. Technical Consultant
Enkitec
![Page 2: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/2.jpg)
A Little About Me:
Sr. Technical Consultant for Enkitec
Multi-Platform Tuning Specialist
(Lately) EM12c Specialist
Oracle ACE
Training Days Director for RMOUG
Blog at DBAKevlar.com
![Page 3: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/3.jpg)
Brief History ASH= Active Session History
AWR= Automatic Workload Repository
Introduced in Oracle 10g
Evolution to statspack, requests for performance reporting improvements.
“Always on” approach to performance metrics with requirement of non-locking collection process.
Requires Management Tuning Pack License from Oracle.
![Page 4: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/4.jpg)
![Page 5: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/5.jpg)
![Page 6: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/6.jpg)
AWR Repository Used not only by the AWR reports
Automatic Database Diagnostic Monitor, (ADDM Reporting)
SQL Tuning Advisor
Segment Advisor
By default, snapshots every hour. Retention is for 7 days. Both are modifiable.
Snapshots can be taken at any time: EXEC
DBMS_WORKLOAD_REPOSITORY.create_snapshot;
![Page 7: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/7.jpg)
ASH Data Samples each active database session every
second.
Data is held in buffer in memory.
Built into the Oracle kernel and accessed through the v$active_session_history view.
In an AWR snapshot, 1 row in 10 from ASH buffer is placed into the AWR repository.
Managed by the MMNL, (Memory Monitor Lite)
Should not be used to track occurrence.
![Page 8: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/8.jpg)
Running AWR from Enterprise
Manager
![Page 9: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/9.jpg)
Running ASH Report from EM • ASH is always by time, not snapshot.
• Set start date and time.
• End date and time
• Generate report
![Page 10: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/10.jpg)
HTML Format ASH
![Page 11: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/11.jpg)
Running Reports, Command
Line
$ORACLE_HOME/rdbms/admin/awrrpt.sql;
$ORACLE_HOME/rdbms/admin/ashrpt.sql;
$ORACLE_HOME/rdbms/admin/awrsqlrpt.sql;
Less Known AWR Reports:
awrinfo.sql General AWR Info
awrddrpt.sql Comparison report between snapshots
awrblmig.sql Migrates pre-11g baseline data into 11g Baseline tables.
awrgrpt.sql RAC Aware AWR Report.
![Page 12: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/12.jpg)
AWR Info Report
Snapshot Interval Information
Basic Info on Instances and Nodes
No User or Application Schema info.
Space Usage by SYSAUX
WRH$ and Non- AWR Objects, ordered by
size
Snapshot info and if any errors.
Advisor Tasks
![Page 13: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/13.jpg)
AWR Info Report
![Page 14: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/14.jpg)
ASH Info Report, (cont.)
![Page 15: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/15.jpg)
AWR and ASH in Real Life
Scenario
RAC, 2-nodes, Ver. 10.2.0.5
Application Waits Seen in EM
Performance Page.
Out of the ordinary CPU Resource usage
50 minutes of time for evaluation. AWR
set to 10 min. interval on snapshots.
![Page 16: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/16.jpg)
Run AWR for Timeline Shown in
Enterprise Manager
Who needs a top five when the top 2 are so impacting?
![Page 17: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/17.jpg)
Top SQL by Elapsed Time
![Page 18: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/18.jpg)
AWR Segment Info
![Page 19: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/19.jpg)
Next Steps Using ASH
Limiting from a 50 minute/1 hour view to more definitive view of the database a given timeline.
Top SQL
Top Sessions
Top Waits
Blocking Sessions
Top Objects
Waits by time during sample intervals.
![Page 20: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/20.jpg)
Top Modules and Clients
![Page 21: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/21.jpg)
Top SQL Statements
![Page 22: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/22.jpg)
Blocking Sessions
The Blocking Session, along with Top Object should be noted.
![Page 23: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/23.jpg)
Next Step
Kill Blocking Session?
Investigate Further?
Investigate SQL_ID’s with AWR SQL
Two SQL_ID’s are in question:
4z1vnc0995bm6
b6vaxgxt4wh8v
![Page 24: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/24.jpg)
4z1vnc0995bm6- Update
![Page 25: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/25.jpg)
Update Cont.
![Page 26: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/26.jpg)
B6vaxgxt4wh8v- Select
![Page 27: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/27.jpg)
Select Cont.
![Page 28: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/28.jpg)
Long Story Short….
Subsequent ASH reports showed blocked
sessions became blocking sessions.
Update statement and select belong to same
code. Update is executed, then large select,
no commit until AFTER select is complete.
Request to development to commit before
select and tuning recommendation from
AWR SQL_ID specific report for select
statement.
![Page 29: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/29.jpg)
Querying ASH Data Directly
More defined reporting
No need to pull full report
Detail on waits that are of interest
Join to non-AWR objects
Simple queries presented…
![Page 30: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/30.jpg)
V$ACTIVE_SESSION_HISTORY
• More Column Data in
11g than shown.
• Flags column is for future
development.
• Broken down into usable
sections, easier to query.
![Page 31: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/31.jpg)
Knowing What’s in the ASH
Buffer • Deters from making assumptions on what data is being
queried.
• Know your samples!
![Page 32: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/32.jpg)
Wait Events Across Nodes
![Page 33: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/33.jpg)
Query top
10 SQL_ID’s
in the last
10
minutes?
![Page 34: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/34.jpg)
SQL_ID and CPU Usage
![Page 35: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/35.jpg)
IO Waits by Object from ASH
![Page 36: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/36.jpg)
SQL Text with ASH • SQL for most recent five minutes of sample data from ASH
![Page 37: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/37.jpg)
SQL Results • SQL_ID, SQL Text, Sample Time that Process was
captured in.
![Page 38: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/38.jpg)
Tyler Muth ASH Mining Query
![Page 39: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/39.jpg)
ASH Mining Output
Additional Options:
• Physical Read Averages
• Physical Writes, (Max/Averages)
• Redo Info
• Logon Info
• Hard Parsing, etc.
![Page 40: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/40.jpg)
Best Practice When Querying
ASH Data
Keep it Simple and don’t reinvent the wheel.
Samples are an alias for time, not for counts.
Understand what is valuable and compare to
packaged reports.
Be aware on RAC of node specific data.
Take care when querying Obj#, File# and
Block#, (still issues in different versions…)
Check the time that is available in buffer,
don’t assume!
![Page 41: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/41.jpg)
AWR/ASH Links/Blogs
Karl Arao: http://karlarao.wordpress.com
Tyler Muth:
http://tylermuth.wordpress.com/
Kyle Hailey, John Beresniewicz, Graham
Wood: http://ashmasters.com/
Mine- “For the Love of ASH and AWR”
http://dbakevlar.com/2011/02/for-the-
love-of-awr-and-ash/
![Page 42: Ash and awr performance data2](https://reader033.vdocuments.mx/reader033/viewer/2022042613/54c68ad34a7959fb258b4644/html5/thumbnails/42.jpg)
QUESTIONS
Email: [email protected]
Company: http://enkitec.com
Website: http://dbakevlar.com
User Group: http://www.rmoug.org