SlideShare a Scribd company logo
AWR Ambiguity: 

Performance reasoning when the
numbers don’t add up
John Beresniewicz
Oak table founding member

Oracle Performance maven, ASH expert, bodyboarder
an Oaktable inquiry…
Oaktable member
(I didn’t really understand the question)
…can you send me the AWR?
Top 10 Foreground Events by Total Wait Time
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Total Wait Wait % DB Wait
Event Waits Time (sec) Avg(ms) time Class
------------------------------ ----------- ---------- ---------- ------ --------
db file parallel read 139,819 469.8 3.36 78.1 User I/O
DB CPU 243 40.4
db file sequential read 201,921 52.4 0.26 8.7 User I/O
db file scattered read 221 .5 2.21 .1 User I/O
kksfbc child completion 4 .2 37.85 .0 Other
control file sequential read 249 0 0.10 .0 System I
Disk file Mirror Read 61 0 0.21 .0 User I/O
library cache load lock 19 0 0.60 .0 Concurre
cursor: pin S wait on X 4 0 1.61 .0 Concurre
Disk file operations I/O 140 0 0.03 .0 User I/O
CPU + Wait = DB Time
40.4 + 86.8 = 127.2% ( > 100% WTF??? )
Quick Review
The Model
• Summed over all foreground sessions
• Wait time is active wait time (non-idle waits)
• CPU and Wait time are non-overlapping
DB Time = DB CPU time + Wait time
The Method
• Account for DB Time accurately
• Reduce DB Time spent doing the same work
• focus on large chunks of similarly spent time
• If system is CPU-bound, reduce CPU time first
• wait times are inaccurate and wait tuning irrelevant
DB Time
• Foreground session time in database calls
• Measured by DB code using clear instrumentation points:
• [call entry:start timer]
• [call exit:stop timer]
• System DB Time = SUM(Session DB Time)
We trust DB Time accuracy implicitly
DB CPU
• Foreground CPU actually used
• does not include run-queue time
• Measured by OS, collected by Oracle
• independent instrumentation source
• NOTE: AIX CPU reporting suspect for hyper-threaded cores
We have high confidence in DB CPU accuracy
ASH and DB Time
DB Time ~ COUNT(sampled sessions) * interval
• “ON CPU”: session in a call and not waiting
• this is derived, not “observed”
• ASH always conforms to the model:
• every sample is either ON CPU or WAITING
Sessions using CPU in a wait will not show as ON CPU
Be mindful that…
• AWR report presumes accurate instrumentation
• ADDM presumes accurate instrumentation
• Instrumentation is not always accurate
• ergo, AWR report and ADDM may be misleading
AWR and ADDM could (should) do some sanity checks
Back to Problem AWR
First questions
• Elapsed time of report?
• Version of Oracle DB?
• bug lookup, report contents, available data
• System CPU-bound?
Begin at the beginning…
WORKLOAD REPOSITORY report for
DB Name DB Id Instance Inst Num Startup Time Release RAC
------------ ----------- ------------ -------- --------------- ----------- ---
DB12C 1329819247 db12cn1 1 04-Apr-15 06:19 12.1.0.2.0 NO
Host Name Platform CPUs Cores Sockets Memory(GB)
---------------- -------------------------------- ---- ----- ------- ----------
ora1.dssdhop.lab Linux x86 64-bit 72 36 2 252.17
Snap Id Snap Time Sessions Curs/Sess
--------- ------------------- -------- ---------
Begin Snap: 410 04-Apr-15 06:22:16 61 .8
End Snap: 411 04-Apr-15 06:24:18 56 .7
Elapsed: 2.02 (mins)
DB Time: 10.03 (mins)
DB version?
Elapsed time
CPU bound?
12.1.0.2
2 minutes (120 secs)
NO (36 >> 5 ; Cores >> AAS)
Next questions
• What is DB Time over interval?
• What is DB CPU over interval?
• What is (expected) Wait Time over interval?
• DB Time - DB CPU = Wait Time (expected)
• What does ASH indicate?
Load Profile
Load Profile Per Second Per Transaction Per Exec Per Call
~~~~~~~~~~~~~~~ --------------- --------------- --------- ---------
DB Time(s): 5.0 150.4 0.01 3.13
DB CPU(s): 2.0 60.8 0.00 1.27
Background CPU(s): 0.0 0.4 0.00 0.00
Time(seconds)
0
150
300
450
600
DB Time DB CPU
600
240
Wait Time
360
DB Time = 600 secs
( 5 * 120 )
DB CPU = 240 secs
( 2 * 120 )
Wait Time = 360 secs
( 600 - 240 )
Adding measured wait times…
Time(seconds)
0
200
400
600
800
DB Time CPU+Wait
52
470
600
240
excess wait
162
Top 10 Foreground Events by Total Wait Time
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Total Wait Wait % DB Wait
Event Waits Time (sec) Avg(ms) time Class
------------------------------ ----------- ---------- ---------- ------ --------
db file parallel read 139,819 469.8 3.36 78.1 User I/O
db file sequential read 201,921 52.4 0.26 8.7 User I/O
What does ASH say?
Time(seconds)
0
200
400
600
800
DB Time CPU+Wait ASH
80
52
410
470
600
60
240 CPU in
wait
Slot Event
Slot Time (Duration) Count Event Count % Event
-------------------- -------- ------------------------------ -------- -------
06:22:16 (2.0 min) 55 db file parallel read 41 74.55
db file sequential read 8 14.55
CPU + Wait for CPU 6 10.91
ASH DB Time ~ 550
ASH CPU way off
What is our conclusion?
• “db file parallel read” is consuming significant CPU under wait
• 162 / 470 ~ 34% of the “wait” is actually CPU
• 162 * 1000 / 139,819 ~ 1.16 ms/wait
• block counts >>100 blocks ~ 1MB ~ 300 MB/sec
• Not technically a bug
Total Wait Wait % DB Wait
Event Waits Time (sec) Avg(ms) time Class
------------------------------ ----------- ---------- ---------- ------ --------
db file parallel read 139,819 469.8 3.36 78.1 User I/O
The model and reality do not always agree so well
Digging a bit further…OSSTAT
Operating System Statistics DB/Inst: DB12C/db12cn1
Statistic Value End Value
------------------------- ---------------------- ----------------
BUSY_TIME 72,614
IDLE_TIME 795,376
IOWAIT_TIME 36,343
SYS_TIME 45,030
USER_TIME 27,559
LOAD 7 9
Time(seconds)
0
300
600
900
1200
Oracle AWR OSSTAT
450
363360
275240
DB CPU
DB IOwait
USER_TIME
IOWAIT_TIME
SYS_TIME?
1088 / 120 = 8.3 AAS
}Non-Oracle process
CPU doing I/O?
So what is Mr SLOB up to?
• Benchmarking: pounding on parallel read wait event
• Testing advanced I/O interfaces servicing this event?
• SSD storage using I/O slaves perhaps? (non-DB sys time)
• If we factor in ALL reads and ALL CPU:
• 1000 * (450+275 tot CPU secs) / 15,496,576 tot reads
• ~ 0.05 milliseconds CPU per random read
Instrumentation issues and symptoms
Symptom Possible issue
DB CPU >> ASH CPU
(and significant wait time)
CPU used within wait
(this was the issue here)
ASH CPU >> DB CPU
System CPU-bound
(ASH includes run-queue)
DB Time >> DB CPU + Wait
(and not CPU-bound)
Un-instrumented wait
(in call, not in wait, not on CPU)
DB Time >> ASH DB Time
1. Double-counted DB Time
2. ASH dropped samples
Final advice
• Don’t believe the unbelievable
• Trust DB Time and DB CPU the most
• Be wary of ASH CPU and measured Wait times
• Always get ASH Report with AWR Report
• Don’t ponder details if the big picture is not clear
AWR Ambiguity: Performance reasoning when the numbers don't add up
Ad

More Related Content

What's hot (20)

Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Zohar Elkayam
 
Same plan different performance
Same plan different performanceSame plan different performance
Same plan different performance
Mauro Pagano
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
Simon Huang
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
Tanel Poder
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
Kyle Hailey
 
ASH and AWR on DB12c
ASH and AWR on DB12cASH and AWR on DB12c
ASH and AWR on DB12c
Kellyn Pot'Vin-Gorman
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014
John Beresniewicz
 
Analyzing awr report
Analyzing awr reportAnalyzing awr report
Analyzing awr report
satish Gaddipati
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
SolarWinds
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aas
Kyle Hailey
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
Mauro Pagano
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
Mohamed Farouk
 
Using Statspack and AWR for Memory Monitoring and Tuning
Using Statspack and AWR for Memory Monitoring and TuningUsing Statspack and AWR for Memory Monitoring and Tuning
Using Statspack and AWR for Memory Monitoring and Tuning
Texas Memory Systems, and IBM Company
 
Oracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention TroubleshootingOracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention Troubleshooting
Tanel Poder
 
Awr + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance tuning
AiougVizagChapter
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
Mauro Pagano
 
AWR reports-Measuring CPU
AWR reports-Measuring CPUAWR reports-Measuring CPU
AWR reports-Measuring CPU
Mohammed Yasir Hashmi
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC Performance
Anil Nair
 
SQLd360
SQLd360SQLd360
SQLd360
Mauro Pagano
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Zohar Elkayam
 
Same plan different performance
Same plan different performanceSame plan different performance
Same plan different performance
Mauro Pagano
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
Simon Huang
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
Tanel Poder
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
Kyle Hailey
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014
John Beresniewicz
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
SolarWinds
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aas
Kyle Hailey
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
Mauro Pagano
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
Mohamed Farouk
 
Oracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention TroubleshootingOracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention Troubleshooting
Tanel Poder
 
Awr + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance tuning
AiougVizagChapter
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
Mauro Pagano
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC Performance
Anil Nair
 

Viewers also liked (20)

Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmasters
Kyle Hailey
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reports
John Beresniewicz
 
Intro to ASH
Intro to ASHIntro to ASH
Intro to ASH
Kyle Hailey
 
How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problem
Cary Millsap
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoring
Kyle Hailey
 
The Most Important Things You Should Know about Oracle®
The Most Important Things You Should Know about Oracle®The Most Important Things You Should Know about Oracle®
The Most Important Things You Should Know about Oracle®
Cary Millsap
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
Kyle Hailey
 
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseOaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Kyle Hailey
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reports
John Beresniewicz
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
John Beresniewicz
 
SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013
Kyle Hailey
 
Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013
John Beresniewicz
 
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
Hiroshi Sekiguchi
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Kyle Hailey
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata security
Kyle Hailey
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb
Connor McDonald
 
Indexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management InternalsIndexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management Internals
Christian Antognini
 
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
Kyle Hailey
 
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...
OakTable World 2015  - Using XMLType content with the Oracle In-Memory Column...OakTable World 2015  - Using XMLType content with the Oracle In-Memory Column...
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...
Marco Gralike
 
OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AAS
Kyle Hailey
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmasters
Kyle Hailey
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reports
John Beresniewicz
 
How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problem
Cary Millsap
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoring
Kyle Hailey
 
The Most Important Things You Should Know about Oracle®
The Most Important Things You Should Know about Oracle®The Most Important Things You Should Know about Oracle®
The Most Important Things You Should Know about Oracle®
Cary Millsap
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
Kyle Hailey
 
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseOaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Kyle Hailey
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reports
John Beresniewicz
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
John Beresniewicz
 
SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013
Kyle Hailey
 
Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013
John Beresniewicz
 
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
Hiroshi Sekiguchi
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Kyle Hailey
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata security
Kyle Hailey
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb
Connor McDonald
 
Indexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management InternalsIndexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management Internals
Christian Antognini
 
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
Kyle Hailey
 
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...
OakTable World 2015  - Using XMLType content with the Oracle In-Memory Column...OakTable World 2015  - Using XMLType content with the Oracle In-Memory Column...
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...
Marco Gralike
 
OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AAS
Kyle Hailey
 
Ad

Similar to AWR Ambiguity: Performance reasoning when the numbers don't add up (20)

Awrrpt 1 3004_3005
Awrrpt 1 3004_3005Awrrpt 1 3004_3005
Awrrpt 1 3004_3005
Kam Chan
 
Thomas+Niewel+ +Oracletuning
Thomas+Niewel+ +OracletuningThomas+Niewel+ +Oracletuning
Thomas+Niewel+ +Oracletuning
afa reg
 
AWR, ADDM, ASH, Metrics and Advisors.ppt
AWR, ADDM, ASH, Metrics and Advisors.pptAWR, ADDM, ASH, Metrics and Advisors.ppt
AWR, ADDM, ASH, Metrics and Advisors.ppt
bugzbinny
 
Using AWR for IO Subsystem Analysis
Using AWR for IO Subsystem AnalysisUsing AWR for IO Subsystem Analysis
Using AWR for IO Subsystem Analysis
Texas Memory Systems, and IBM Company
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
Kyle Hailey
 
Using AWR/Statspack for Wait Analysis
Using AWR/Statspack for Wait AnalysisUsing AWR/Statspack for Wait Analysis
Using AWR/Statspack for Wait Analysis
Texas Memory Systems, and IBM Company
 
Awr1page OTW2018
Awr1page OTW2018Awr1page OTW2018
Awr1page OTW2018
John Beresniewicz
 
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesMySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
Severalnines
 
active_session_history_oracle_performance.ppt
active_session_history_oracle_performance.pptactive_session_history_oracle_performance.ppt
active_session_history_oracle_performance.ppt
cookie1969
 
Oracle Database : Addressing a performance issue the drilldown approach
Oracle Database : Addressing a performance issue the drilldown approachOracle Database : Addressing a performance issue the drilldown approach
Oracle Database : Addressing a performance issue the drilldown approach
Laurent Leturgez
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Kristofferson A
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
Cuneyt Goksu
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
Chien Chung Shen
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tango
Mauro Pagano
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
Carlos Sierra
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Kristofferson A
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performance
Ricky Zhu
 
IO Dubi Lebel
IO Dubi LebelIO Dubi Lebel
IO Dubi Lebel
sqlserver.co.il
 
MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527
Saewoong Lee
 
30334823 my sql-cluster-performance-tuning-best-practices
30334823 my sql-cluster-performance-tuning-best-practices30334823 my sql-cluster-performance-tuning-best-practices
30334823 my sql-cluster-performance-tuning-best-practices
David Dhavan
 
Awrrpt 1 3004_3005
Awrrpt 1 3004_3005Awrrpt 1 3004_3005
Awrrpt 1 3004_3005
Kam Chan
 
Thomas+Niewel+ +Oracletuning
Thomas+Niewel+ +OracletuningThomas+Niewel+ +Oracletuning
Thomas+Niewel+ +Oracletuning
afa reg
 
AWR, ADDM, ASH, Metrics and Advisors.ppt
AWR, ADDM, ASH, Metrics and Advisors.pptAWR, ADDM, ASH, Metrics and Advisors.ppt
AWR, ADDM, ASH, Metrics and Advisors.ppt
bugzbinny
 
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesMySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
Severalnines
 
active_session_history_oracle_performance.ppt
active_session_history_oracle_performance.pptactive_session_history_oracle_performance.ppt
active_session_history_oracle_performance.ppt
cookie1969
 
Oracle Database : Addressing a performance issue the drilldown approach
Oracle Database : Addressing a performance issue the drilldown approachOracle Database : Addressing a performance issue the drilldown approach
Oracle Database : Addressing a performance issue the drilldown approach
Laurent Leturgez
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Kristofferson A
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
Cuneyt Goksu
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
Chien Chung Shen
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tango
Mauro Pagano
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
Carlos Sierra
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Kristofferson A
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performance
Ricky Zhu
 
MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527
Saewoong Lee
 
30334823 my sql-cluster-performance-tuning-best-practices
30334823 my sql-cluster-performance-tuning-best-practices30334823 my sql-cluster-performance-tuning-best-practices
30334823 my sql-cluster-performance-tuning-best-practices
David Dhavan
 
Ad

More from John Beresniewicz (7)

ASHviz - Dats visualization research experiments using ASH data
ASHviz - Dats visualization research experiments using ASH dataASHviz - Dats visualization research experiments using ASH data
ASHviz - Dats visualization research experiments using ASH data
John Beresniewicz
 
NoSQL is Anti-relational
NoSQL is Anti-relationalNoSQL is Anti-relational
NoSQL is Anti-relational
John Beresniewicz
 
AAS Deeper Meaning
AAS Deeper MeaningAAS Deeper Meaning
AAS Deeper Meaning
John Beresniewicz
 
JB Design CV: products / mockups / experiments
JB Design CV: products / mockups / experiments JB Design CV: products / mockups / experiments
JB Design CV: products / mockups / experiments
John Beresniewicz
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholds
John Beresniewicz
 
Ash Outliers UKOUG2011
Ash Outliers UKOUG2011Ash Outliers UKOUG2011
Ash Outliers UKOUG2011
John Beresniewicz
 
Contract-oriented PLSQL Programming
Contract-oriented PLSQL ProgrammingContract-oriented PLSQL Programming
Contract-oriented PLSQL Programming
John Beresniewicz
 
ASHviz - Dats visualization research experiments using ASH data
ASHviz - Dats visualization research experiments using ASH dataASHviz - Dats visualization research experiments using ASH data
ASHviz - Dats visualization research experiments using ASH data
John Beresniewicz
 
JB Design CV: products / mockups / experiments
JB Design CV: products / mockups / experiments JB Design CV: products / mockups / experiments
JB Design CV: products / mockups / experiments
John Beresniewicz
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholds
John Beresniewicz
 
Contract-oriented PLSQL Programming
Contract-oriented PLSQL ProgrammingContract-oriented PLSQL Programming
Contract-oriented PLSQL Programming
John Beresniewicz
 

Recently uploaded (20)

The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 

AWR Ambiguity: Performance reasoning when the numbers don't add up

  • 1. AWR Ambiguity: 
 Performance reasoning when the numbers don’t add up John Beresniewicz Oak table founding member
 Oracle Performance maven, ASH expert, bodyboarder
  • 2. an Oaktable inquiry… Oaktable member (I didn’t really understand the question)
  • 3. …can you send me the AWR? Top 10 Foreground Events by Total Wait Time ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Total Wait Wait % DB Wait Event Waits Time (sec) Avg(ms) time Class ------------------------------ ----------- ---------- ---------- ------ -------- db file parallel read 139,819 469.8 3.36 78.1 User I/O DB CPU 243 40.4 db file sequential read 201,921 52.4 0.26 8.7 User I/O db file scattered read 221 .5 2.21 .1 User I/O kksfbc child completion 4 .2 37.85 .0 Other control file sequential read 249 0 0.10 .0 System I Disk file Mirror Read 61 0 0.21 .0 User I/O library cache load lock 19 0 0.60 .0 Concurre cursor: pin S wait on X 4 0 1.61 .0 Concurre Disk file operations I/O 140 0 0.03 .0 User I/O CPU + Wait = DB Time 40.4 + 86.8 = 127.2% ( > 100% WTF??? )
  • 5. The Model • Summed over all foreground sessions • Wait time is active wait time (non-idle waits) • CPU and Wait time are non-overlapping DB Time = DB CPU time + Wait time
  • 6. The Method • Account for DB Time accurately • Reduce DB Time spent doing the same work • focus on large chunks of similarly spent time • If system is CPU-bound, reduce CPU time first • wait times are inaccurate and wait tuning irrelevant
  • 7. DB Time • Foreground session time in database calls • Measured by DB code using clear instrumentation points: • [call entry:start timer] • [call exit:stop timer] • System DB Time = SUM(Session DB Time) We trust DB Time accuracy implicitly
  • 8. DB CPU • Foreground CPU actually used • does not include run-queue time • Measured by OS, collected by Oracle • independent instrumentation source • NOTE: AIX CPU reporting suspect for hyper-threaded cores We have high confidence in DB CPU accuracy
  • 9. ASH and DB Time DB Time ~ COUNT(sampled sessions) * interval • “ON CPU”: session in a call and not waiting • this is derived, not “observed” • ASH always conforms to the model: • every sample is either ON CPU or WAITING Sessions using CPU in a wait will not show as ON CPU
  • 10. Be mindful that… • AWR report presumes accurate instrumentation • ADDM presumes accurate instrumentation • Instrumentation is not always accurate • ergo, AWR report and ADDM may be misleading AWR and ADDM could (should) do some sanity checks
  • 12. First questions • Elapsed time of report? • Version of Oracle DB? • bug lookup, report contents, available data • System CPU-bound?
  • 13. Begin at the beginning… WORKLOAD REPOSITORY report for DB Name DB Id Instance Inst Num Startup Time Release RAC ------------ ----------- ------------ -------- --------------- ----------- --- DB12C 1329819247 db12cn1 1 04-Apr-15 06:19 12.1.0.2.0 NO Host Name Platform CPUs Cores Sockets Memory(GB) ---------------- -------------------------------- ---- ----- ------- ---------- ora1.dssdhop.lab Linux x86 64-bit 72 36 2 252.17 Snap Id Snap Time Sessions Curs/Sess --------- ------------------- -------- --------- Begin Snap: 410 04-Apr-15 06:22:16 61 .8 End Snap: 411 04-Apr-15 06:24:18 56 .7 Elapsed: 2.02 (mins) DB Time: 10.03 (mins) DB version? Elapsed time CPU bound? 12.1.0.2 2 minutes (120 secs) NO (36 >> 5 ; Cores >> AAS)
  • 14. Next questions • What is DB Time over interval? • What is DB CPU over interval? • What is (expected) Wait Time over interval? • DB Time - DB CPU = Wait Time (expected) • What does ASH indicate?
  • 15. Load Profile Load Profile Per Second Per Transaction Per Exec Per Call ~~~~~~~~~~~~~~~ --------------- --------------- --------- --------- DB Time(s): 5.0 150.4 0.01 3.13 DB CPU(s): 2.0 60.8 0.00 1.27 Background CPU(s): 0.0 0.4 0.00 0.00 Time(seconds) 0 150 300 450 600 DB Time DB CPU 600 240 Wait Time 360 DB Time = 600 secs ( 5 * 120 ) DB CPU = 240 secs ( 2 * 120 ) Wait Time = 360 secs ( 600 - 240 )
  • 16. Adding measured wait times… Time(seconds) 0 200 400 600 800 DB Time CPU+Wait 52 470 600 240 excess wait 162 Top 10 Foreground Events by Total Wait Time ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Total Wait Wait % DB Wait Event Waits Time (sec) Avg(ms) time Class ------------------------------ ----------- ---------- ---------- ------ -------- db file parallel read 139,819 469.8 3.36 78.1 User I/O db file sequential read 201,921 52.4 0.26 8.7 User I/O
  • 17. What does ASH say? Time(seconds) 0 200 400 600 800 DB Time CPU+Wait ASH 80 52 410 470 600 60 240 CPU in wait Slot Event Slot Time (Duration) Count Event Count % Event -------------------- -------- ------------------------------ -------- ------- 06:22:16 (2.0 min) 55 db file parallel read 41 74.55 db file sequential read 8 14.55 CPU + Wait for CPU 6 10.91 ASH DB Time ~ 550 ASH CPU way off
  • 18. What is our conclusion? • “db file parallel read” is consuming significant CPU under wait • 162 / 470 ~ 34% of the “wait” is actually CPU • 162 * 1000 / 139,819 ~ 1.16 ms/wait • block counts >>100 blocks ~ 1MB ~ 300 MB/sec • Not technically a bug Total Wait Wait % DB Wait Event Waits Time (sec) Avg(ms) time Class ------------------------------ ----------- ---------- ---------- ------ -------- db file parallel read 139,819 469.8 3.36 78.1 User I/O The model and reality do not always agree so well
  • 19. Digging a bit further…OSSTAT Operating System Statistics DB/Inst: DB12C/db12cn1 Statistic Value End Value ------------------------- ---------------------- ---------------- BUSY_TIME 72,614 IDLE_TIME 795,376 IOWAIT_TIME 36,343 SYS_TIME 45,030 USER_TIME 27,559 LOAD 7 9 Time(seconds) 0 300 600 900 1200 Oracle AWR OSSTAT 450 363360 275240 DB CPU DB IOwait USER_TIME IOWAIT_TIME SYS_TIME? 1088 / 120 = 8.3 AAS }Non-Oracle process CPU doing I/O?
  • 20. So what is Mr SLOB up to? • Benchmarking: pounding on parallel read wait event • Testing advanced I/O interfaces servicing this event? • SSD storage using I/O slaves perhaps? (non-DB sys time) • If we factor in ALL reads and ALL CPU: • 1000 * (450+275 tot CPU secs) / 15,496,576 tot reads • ~ 0.05 milliseconds CPU per random read
  • 21. Instrumentation issues and symptoms Symptom Possible issue DB CPU >> ASH CPU (and significant wait time) CPU used within wait (this was the issue here) ASH CPU >> DB CPU System CPU-bound (ASH includes run-queue) DB Time >> DB CPU + Wait (and not CPU-bound) Un-instrumented wait (in call, not in wait, not on CPU) DB Time >> ASH DB Time 1. Double-counted DB Time 2. ASH dropped samples
  • 22. Final advice • Don’t believe the unbelievable • Trust DB Time and DB CPU the most • Be wary of ASH CPU and measured Wait times • Always get ASH Report with AWR Report • Don’t ponder details if the big picture is not clear