Your SlideShare is downloading. ×
0
Kellyn Pot’VinSr. Technical ConsultantASH and AWRPerformance Data
About Me Westminster, Colorado Oracle ACE Director, Sr. Technical Specialist atEnkitec EM12c book is out and starting n...
Brief History ASH= Active Session History AWR= Automatic Workload Repository Introduced in Oracle 10g Evolution to sta...
AWR Repository Used not only by the AWR reports● Automatic Database Diagnostic Monitor, (ADDMReporting)● SQL Tuning Advis...
ASH Data Samples each active database session everysecond. Data is held in buffer in memory. Built into the Oracle kern...
Running AWR from Enterprise Manager
Running ASH Report from EM• ASH is always by time, not snapshot.• Set start date and time.• End date and time• Generate re...
HTML Format ASH
 Top User and Background EventsHigh Level Importance…
 Top Impacting SQL Hmmm…What have we here??Top SQL
 Top PL/SQL Procedures What Time was this again??Top SQL and the Time Game
 Killed the Tuning Advisor that was runningagainst the workload collection. Killed the stats job that was running. COMM...
Running Reports, Command Line$ORACLE_HOME/rdbms/admin/awrrpt.sql;$ORACLE_HOME/rdbms/admin/ashrpt.sql;$ORACLE_HOME/rdbms/ad...
AWR Info Report Snapshot Interval Information Basic Info on Instances and Nodes No User or Application Schema info. Sp...
AWR Info Report
ASH Info Report, (cont.)
AWR and ASH in Real LifeScenarioRAC, 2-nodes, Ver. 10.2.0.5Application Waits Seen in EMPerformance Page.Out of the ordi...
Run AWR for Timeline Shown in Enterprise ManagerWho needs a top five when the top 2 are so impacting?
Top SQL by Elapsed Time
AWR Segment Info
Next Steps Using ASH Limiting to a defined minute instead of a 1 hourview to give us a clear database timeline. Top SQL...
Top Modules and Clients
Top SQL Statements
Blocking SessionsThe Blocking Session, along with Top Object should be noted.
Next Step Kill Blocking Session? Investigate Further? Investigate SQL_ID’s with AWR SQLTwo SQL_ID’s are in question:4z1...
4z1vnc0995bm6- Update
Update Cont.
B6vaxgxt4wh8v- Select
Select Cont.
Long Story Short…. Subsequent ASH reports showed blockedsessions became blocking sessions. Update statement and select b...
Querying ASH Data Directly More defined reporting No need to pull full report Detail on waits that are of interest Joi...
V$ACTIVE_SESSION_HISTORY• More Column Data in 11gthan shown.• Flags column is for futuredevelopment.• Broken down into usa...
Knowing What’s in the ASH Buffer• Deters from making assumptions on what data is beingqueried.• Know your samples!
Wait Events Across Nodes
Query top10SQL_ID’sin the last10minutes?
SQL_ID and CPU Usage
IO Waits by Object from ASH
SQL Text with ASH• SQL for most recent five minutes of sample data from ASH
SQL Results• SQL_ID, SQL Text, Sample Time that Process was capturedin.
Tyler Muth ASH Mining Query
ASH Mining OutputAdditional Options:•Physical Read Averages•Physical Writes, (Max/Averages)•Redo Info•Logon Info•Hard Pars...
Best Practice When Querying ASH Data Keep it Simple and don’t reinvent the wheel. Samples are an alias for time, not for...
AWR/ASH Links/Blogs Karl Arao: http://karlarao.wordpress.com Tyler Muth: http://tylermuth.wordpress.com/ Kyle Hailey, J...
Thank you!http://enkitec.comhttp://dbakevlar.comdbakevlar@gmail.comkpotvin@enkitec.comTwitter: @dbakevlarLinkedin/Facebook...
Ashawr perf kscope
Ashawr perf kscope
Upcoming SlideShare
Loading in...5
×

Ashawr perf kscope

444

Published on

ASH and AWR data for KSCOPE 2013

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
444
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
32
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Ashawr perf kscope"

  1. 1. Kellyn Pot’VinSr. Technical ConsultantASH and AWRPerformance Data
  2. 2. About Me Westminster, Colorado Oracle ACE Director, Sr. Technical Specialist atEnkitec EM12c book is out and starting new books started! Specialize in performance and management of largeenterprise environments. Board of directors for RMOUG, Director of TrainingDays, KSCOPE DB Track Lead, Women inTechnology Leader Blog: DBAKevlar.com Twitter: @DBAKevlar
  3. 3. Brief History ASH= Active Session History AWR= Automatic Workload Repository Introduced in Oracle 10g Evolution to statspack, requests forperformance reporting improvements. “Always on” approach to performance metricswith requirement of non-locking collectionprocess. Requires Management Diagnostics PackLicense from Oracle.
  4. 4. AWR Repository Used not only by the AWR reports● Automatic Database Diagnostic Monitor, (ADDMReporting)● SQL Tuning Advisor● Segment Advisor By default, snapshots every hour. Retention isfor 7 days. Both are modifiable, (so MODIFY!) Snapshots can be taken at any time:EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot;
  5. 5. ASH Data Samples each active database session everysecond. Data is held in buffer in memory. Built into the Oracle kernel and accessedthrough the v$active_session_history view. In an AWR snapshot, 1 row in 10 from ASHbuffer is placed into the AWR repository. Managed by the MMNL, (Memory Monitor Lite) Should not be used to track occurrence.
  6. 6. Running AWR from Enterprise Manager
  7. 7. Running ASH Report from EM• ASH is always by time, not snapshot.• Set start date and time.• End date and time• Generate report
  8. 8. HTML Format ASH
  9. 9.  Top User and Background EventsHigh Level Importance…
  10. 10.  Top Impacting SQL Hmmm…What have we here??Top SQL
  11. 11.  Top PL/SQL Procedures What Time was this again??Top SQL and the Time Game
  12. 12.  Killed the Tuning Advisor that was runningagainst the workload collection. Killed the stats job that was running. COMMENTED out the stats and tuningadvisors someone thought should run each dayand night mulitple times per day. Yes, processing started to run efficiently again.Solution
  13. 13. 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 Infoawrddrpt.sql Comparison report between snapshotsawrblmig.sql Migrates pre-11g baseline data into11g Baseline tables.awrgrpt.sql RAC Aware AWR Report.
  14. 14. 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
  15. 15. AWR Info Report
  16. 16. ASH Info Report, (cont.)
  17. 17. AWR and ASH in Real LifeScenarioRAC, 2-nodes, Ver. 10.2.0.5Application Waits Seen in EMPerformance Page.Out of the ordinary CPU Resourceusage50 minutes of time for evaluation. AWRset to 10 min. interval on snapshots.
  18. 18. Run AWR for Timeline Shown in Enterprise ManagerWho needs a top five when the top 2 are so impacting?
  19. 19. Top SQL by Elapsed Time
  20. 20. AWR Segment Info
  21. 21. Next Steps Using ASH Limiting to a defined minute instead of a 1 hourview to give us a clear database timeline. Top SQL Top Sessions Top Waits Blocking Sessions Top Objects Waits by time during sample intervals.
  22. 22. Top Modules and Clients
  23. 23. Top SQL Statements
  24. 24. Blocking SessionsThe Blocking Session, along with Top Object should be noted.
  25. 25. Next Step Kill Blocking Session? Investigate Further? Investigate SQL_ID’s with AWR SQLTwo SQL_ID’s are in question:4z1vnc0995bm6b6vaxgxt4wh8v
  26. 26. 4z1vnc0995bm6- Update
  27. 27. Update Cont.
  28. 28. B6vaxgxt4wh8v- Select
  29. 29. Select Cont.
  30. 30. Long Story Short…. Subsequent ASH reports showed blockedsessions became blocking sessions. Update statement and select belong to samecode. Update is executed, then large select, nocommit until AFTER select is complete. Request to development to commit beforeselect and tuning recommendation from AWRSQL_ID specific report for select statement.
  31. 31. 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…
  32. 32. V$ACTIVE_SESSION_HISTORY• More Column Data in 11gthan shown.• Flags column is for futuredevelopment.• Broken down into usablesections, easier to query.
  33. 33. Knowing What’s in the ASH Buffer• Deters from making assumptions on what data is beingqueried.• Know your samples!
  34. 34. Wait Events Across Nodes
  35. 35. Query top10SQL_ID’sin the last10minutes?
  36. 36. SQL_ID and CPU Usage
  37. 37. IO Waits by Object from ASH
  38. 38. SQL Text with ASH• SQL for most recent five minutes of sample data from ASH
  39. 39. SQL Results• SQL_ID, SQL Text, Sample Time that Process was capturedin.
  40. 40. Tyler Muth ASH Mining Query
  41. 41. ASH Mining OutputAdditional Options:•Physical Read Averages•Physical Writes, (Max/Averages)•Redo Info•Logon Info•Hard Parsing, etc.
  42. 42. 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 topackaged reports. Be aware on RAC of node specific data. Take care when querying Obj#, File# andBlock#, (still issues in different versions…) Check the time that is available in buffer, don’tassume!
  43. 43. 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/
  44. 44. Thank you!http://enkitec.comhttp://dbakevlar.comdbakevlar@gmail.comkpotvin@enkitec.comTwitter: @dbakevlarLinkedin/Facebook: Kellyn Pot’Vin
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×