SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
Kyle Hailey
 
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
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
Kyle Hailey
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360
Carlos Sierra
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
Simon Huang
 

Mais procurados (20)

Awr + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance tuning
 
ASH and AWR on DB12c
ASH and AWR on DB12cASH and AWR on DB12c
ASH and AWR on DB12c
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014
 
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...
 
Ash and awr deep dive hotsos
Ash and awr deep dive hotsosAsh and awr deep dive hotsos
Ash and awr deep dive hotsos
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 
Deep review of LMS process
Deep review of LMS processDeep review of LMS process
Deep review of LMS process
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360
 
AWR reports-Measuring CPU
AWR reports-Measuring CPUAWR reports-Measuring CPU
AWR reports-Measuring CPU
 
Oracle AWR Data mining
Oracle AWR Data miningOracle AWR Data mining
Oracle AWR Data mining
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Using AWR for IO Subsystem Analysis
Using AWR for IO Subsystem AnalysisUsing AWR for IO Subsystem Analysis
Using AWR for IO Subsystem Analysis
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
 
Understanding SQL Trace, TKPROF and Execution Plan for beginners
Understanding SQL Trace, TKPROF and Execution Plan for beginnersUnderstanding SQL Trace, TKPROF and Execution Plan for beginners
Understanding SQL Trace, TKPROF and Execution Plan for beginners
 

Destaque

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
 
SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013
Kyle Hailey
 
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
 
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
 

Destaque (20)

Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmasters
 
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
 
Intro to ASH
Intro to ASHIntro to ASH
Intro to ASH
 
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
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoring
 
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®
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
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
 
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
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
 
SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013
 
Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013
 
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
 
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
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata security
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb
 
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
 
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!
 
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...
 
OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AAS
 

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

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
 
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
 
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
 

Semelhante a 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
 
Thomas+Niewel+ +Oracletuning
Thomas+Niewel+ +OracletuningThomas+Niewel+ +Oracletuning
Thomas+Niewel+ +Oracletuning
 
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
 
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
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 
Using AWR/Statspack for Wait Analysis
Using AWR/Statspack for Wait AnalysisUsing AWR/Statspack for Wait Analysis
Using AWR/Statspack for Wait Analysis
 
Awr1page OTW2018
Awr1page OTW2018Awr1page OTW2018
Awr1page OTW2018
 
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
 
active_session_history_oracle_performance.ppt
active_session_history_oracle_performance.pptactive_session_history_oracle_performance.ppt
active_session_history_oracle_performance.ppt
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
 
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
 
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, ...
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tango
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
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
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performance
 
IO Dubi Lebel
IO Dubi LebelIO Dubi Lebel
IO Dubi Lebel
 
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
 

Mais de John Beresniewicz

Mais de 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
 
NoSQL is Anti-relational
NoSQL is Anti-relationalNoSQL is Anti-relational
NoSQL is Anti-relational
 
AAS Deeper Meaning
AAS Deeper MeaningAAS Deeper Meaning
AAS Deeper Meaning
 
JB Design CV: products / mockups / experiments
JB Design CV: products / mockups / experiments JB Design CV: products / mockups / experiments
JB Design CV: products / mockups / experiments
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholds
 
Ash Outliers UKOUG2011
Ash Outliers UKOUG2011Ash Outliers UKOUG2011
Ash Outliers UKOUG2011
 
Contract-oriented PLSQL Programming
Contract-oriented PLSQL ProgrammingContract-oriented PLSQL Programming
Contract-oriented PLSQL Programming
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

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