SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
Identification of Performance Problems
without the Diagnostic Pack
Christian Antognini
14 May 2016
@ChrisAntognini
Next-Generation Oracle Database – New Performance Features2 14/05/2016
Senior principal consultant, trainer and partner at Trivadis
christian.antognini@trivadis.com
http://antognini.ch
Focus: get the most out of Oracle Database
Logical and physical database design
Query optimizer
Application performance management
Author of Troubleshooting Oracle Performance (Apress, 2008/14)
OakTable Network, Oracle ACE Director
Agenda
1. Introduction
2. Analysis of Reproducible Problems
3. Real-Time Analysis of Irreproducible Problems
4. Postmortem Analysis of Irreproducible Problems
5. Third-party Tools
14/05/2016 Identification of Performance Problems without the Diagnostic Pack3
Introduction
14/05/2016 Identification of Performance Problems without the Diagnostic Pack4
Disclaimer
Identification of Performance Problems without the Diagnostic Pack5 14/05/2016
The techniques described in this presentation are useful only to
identify performance problems that are caused by the database layer.
Objective of a Performance Analysis
Identification of Performance Problems without the Diagnostic Pack6 14/05/2016
Discover the most time-consuming SQL statements or PL/SQL code
invocations.
For each of those time-consuming statements, gather additional information
that can help in understanding the problem.
Execution plan
Runtime statistics like the number of processed rows and the CPU utilization
Experienced wait events
Basic Questions that Require Answers
Identification of Performance Problems without the Diagnostic Pack7 14/05/2016
Is the problem reproducible at will?
Yes: everything is much easier than if you can’t! Sec. 2
No: see next bullet…
For irreproducible problems, is it possible to wait till the problem occurs
again?
Yes: a real-time analysis has to be carried out Sec. 3
No: a repository holding historical performance statistics is required Sec. 4
Analysis of Reproducible Problems
14/05/2016 Identification of Performance Problems without the Diagnostic Pack8
Approach
Identification of Performance Problems without the Diagnostic Pack9 14/05/2016
The most efficient way to approach a reproducible problem is to take
advantage of one of the available tracing and profiling features to perform a
controlled measurement while an application is experiencing the problem.
The analysis starts by tracing the database calls through SQL trace.
If most of the time is spent executing SQL statements, the trace file(s) contain all the
necessary information for a detailed analysis.
If most of the time is spent executing PL/SQL code, a profiling of the PL/SQL code is
needed.
Analysis Without Diagnostics Pack
Identification of Performance Problems without the Diagnostic Pack10 14/05/2016
The analysis doesn’t depend on the availability of the Diagnostic Pack option.
The only feature you could consider to use is Real-time Monitoring.
Except in 12c, it’s useful for single executions only
Diagnostic and Tuning Pack required
Tracing Database Calls
Identification of Performance Problems without the Diagnostic Pack11 14/05/2016
There are a number of ways to enable SQL trace.
ALTER SESSION
DBMS_MONITOR
DBMS_SESSION
When enabled, SQL trace generates trace files containing not only the
executed SQL statements, but also in-depth performance figures about their
execution.
The trace files have to be analysed with a profiler.
TKPROF
Third party (e.g. TVD$XTAT and Method R Profiler)
Profiling PL/SQL Code
Identification of Performance Problems without the Diagnostic Pack12 14/05/2016
The database engine provides two profilers integrated in the PL/SQL engine.
Call-level profiler (a.k.a. hierarchical profiler; introduced in 11.1): DBMS_HPROF
Line-level profiler: DBMS_PROFILER
Except if line-level information is needed, the call-level profiler is superior.
The easiest way to use a profiler is to take advantage of the support provided
by graphical tools.
SQL Developer
Third party (e.g. TOAD and PL/SQL Developer)
Real-Time Analysis of
Irreproducible Problems
14/05/2016 Identification of Performance Problems without the Diagnostic Pack13
Approach
Identification of Performance Problems without the Diagnostic Pack14 14/05/2016
Dynamic Performance Views Provide the Necessary
Information
Identification of Performance Problems without the Diagnostic Pack15 14/05/2016
OS Statistics
Time Model Statistics
Wait Classes and Wait Events
System and Session Statistics
Metrics
Diagnostic Pack required for metrics
history only
Current Sessions Status
Active Session History
Diagnostic Pack required
SQL Statement Statistics
Real-time Monitoring
Diagnostic and Tuning Pack required
Analysis Without Diagnostics Pack
Identification of Performance Problems without the Diagnostic Pack16 14/05/2016
There are two main challenges:
Enterprise Manager can’t be used
– Third-party tools that provide similar features exist
Most of the dynamic performance views provide only cumulated statistics
– Metrics are an exception
– Utilities that sample the cumulated statistics are needed
This section focuses on a set of scripts that are freely available, so they can
be used on any system.
Database Server Load
Identification of Performance Problems without the Diagnostic Pack17 14/05/2016
Check not only whether the database server is CPU bound, but also whether
there are processes not related to the database instance that consume a lot
of CPU time.
Database Server Load Based on V$OSSTAT and
V$METRIC
Identification of Performance Problems without the Diagnostic Pack18 14/05/2016
SQL> @host_load.sql 16
BEGIN_TIME DURATION DB_FG_CPU DB_BG_CPU NON_DB_CPU OS_LOAD NUM_CPU
---------- -------- --------- --------- ---------- ------- -------
14:05:00 60.10 1.71 0.03 0.03 4.09 8
14:06:00 60.08 1.62 0.03 0.04 4.13 8
14:07:00 59.10 1.89 0.03 0.04 4.96 8
14:08:00 60.11 1.93 0.03 0.03 5.29 8
14:09:00 60.09 1.73 0.03 0.59 4.60 8
14:10:00 60.10 1.57 0.02 3.64 7.50 8
14:11:00 60.16 1.15 0.02 6.60 11.82 8
14:12:00 60.11 1.21 0.02 6.60 13.77 8
…
System Level Analysis
Identification of Performance Problems without the Diagnostic Pack19 14/05/2016
Several steps have to be carried out:
1. Check the average number of active
sessions and the portion of time they
spend for every wait class
2. Check system-wide time model statistics
3. Check whether few SQL statements are responsible for most of the activity
4. (Optional) Check whether specific sessions/components/… are responsible for
most of the activity
System Level Load Based on V$SYS_TIME_MODEL
and V$SYSTEM_WAIT_CLASS
Identification of Performance Problems without the Diagnostic Pack20 14/05/2016
SQL> @system_activity.sql 15 20
Time AAS Othr% Net% Adm% Conf% Comm% Appl% Conc% SysIO% UsrIO% CPU%
-------- ---- ----- ---- ---- ----- ----- ----- ----- ------ ------ ----
19:10:11 9.7 0.0 0.0 0.0 0.0 0.4 0.0 0.0 0.9 94.8 3.8
19:10:26 10.0 0.0 0.0 0.0 0.0 0.5 0.0 0.0 1.0 94.6 3.9
19:10:41 10.0 0.0 0.0 0.0 0.0 0.4 0.0 0.0 1.0 94.8 3.8
19:10:56 9.9 0.0 0.0 0.0 0.0 0.4 0.0 0.0 1.0 94.6 4.0
19:11:11 9.8 0.0 0.0 0.0 0.2 1.0 0.0 0.0 1.2 93.7 4.0
19:11:26 9.5 0.0 0.0 0.0 0.0 0.4 0.0 0.0 0.9 94.8 3.9
…
System Level Time Model Based on
V$SYS_TIME_MODEL
Identification of Performance Problems without the Diagnostic Pack21 14/05/2016
SQL> @time_model.sql 15 2
Time Statistic AvgActSess Activity%
-------- ----------------------------------------- ---------- ---------
19:14:49 DB time 9.8 98.6
.DB CPU 0.3 3.4
.sql execute elapsed time 9.7 97.3
.PL/SQL execution elapsed time 0.1 1.2
background elapsed time 0.1 1.4
.background cpu time 0.0 0.4
…
Top Sessions Based on V$SYSSTAT, V$SYS_TIME_
MODEL, V$SESS_TIME_MODEL and V$SESSION
Identification of Performance Problems without the Diagnostic Pack22 14/05/2016
SQL> @active_sessions.sql 15 1 10
Time #Sessions #Logins SessionId User Program Activity%
-------- --------- ------- ---------- ---- ---------------- ---------
19:14:49 117 0 195 SOE JDBC Thin Client 1.8
224 SOE JDBC Thin Client 1.5
225 SOE JDBC Thin Client 1.5
…
16 SOE JDBC Thin Client 1.4
171 SOE JDBC Thin Client 1.4
68 SOE JDBC Thin Client 1.4
Top-10 Tot 14.9
…
System Level Analysis with Snapper
Identification of Performance Problems without the Diagnostic Pack23 14/05/2016
Snapper is a script developed by Tanel Põder.
Its key functionality is to sample V$SESSION.
During the sampling, it checks the status of the specified sessions and, for
active sessions, it gathers information about their activity.
It’s a very flexible and powerful script that accepts many parameters.
System Level Analysis with Snapper – List Top SQL
Statements
Identification of Performance Problems without the Diagnostic Pack24 14/05/2016
SQL> @snapper.sql ash=sql_id 15 1 all
-------------------------
Active% | SQL_ID
-------------------------
196% | c13sma6rkr27c
186% | 8dq0v1mjngj7t
122% | bymb3ujkr3ubk
107% | 7hk2m2702ua0g
82% | 0yas01u2p9ch4
63% | 8z3542ffmp562
62% | 0bzhqhhj9mpaa
30% | 5mddt5kt45rg3
Session Level Analysis with Snapper – List Top Wait
Events
Identification of Performance Problems without the Diagnostic Pack25 14/05/2016
SQL> @snapper.sql ash=event 15 1 172
---------------------------------------------
Active% | EVENT
---------------------------------------------
22% | db file sequential read
1% | ON CPU
1% | db file parallel read
With Snapper it’s
possible to target
either one, several or
all sessions
SQL Statement Information
Identification of Performance Problems without the Diagnostic Pack26 14/05/2016
For SQL statements that are responsible for a large part of the activity, more
information is needed.
Runtime statistics
V$SQLAREA sqlarea.sql
V$SQL sql.sql
V$SQLSTATS sqlstats.sql
Execution plan DBMS_XPLAN
Postmortem Analysis of
Irreproducible Problems
14/05/2016 Identification of Performance Problems without the Diagnostic Pack27
Approach
Identification of Performance Problems without the Diagnostic Pack28 14/05/2016
To analyse a performance problem that happened in the past, a repository
containing performance statistics covering the period of time to analyse is
required.
Oracle provides two repositories:
Automatic Workload Repository (AWR)
– Diagnostic Pack required
Statspack
Automatic Workload Repository vs. Statspack
Identification of Performance Problems without the Diagnostic Pack29 14/05/2016
AWR is fully integrated and
automatically installed
AWR stores system-level, SQL-level
as well as session-level (ASH) data
AWR is an Enterprise Edition option
available as of 10g only
Enterprise Manager provides a GUI
for AWR
Statspack requires a manual
installation
Statspack stores system-level and
SQL-level data
Statspack is free of charge and
available with all editions since 8i
No Enterprise Manager integration
Analysis Without Diagnostics Pack
Identification of Performance Problems without the Diagnostic Pack30 14/05/2016
Almost everything provided by an AWR report is provided by a Statspack
report.
There’s no major difference in reading the two reports.
What’s really missing is the persisted ASH data.
Third-party implementations that allow to implement the roadmap discussed in the
previous section exist
Third-party Tools
14/05/2016 Identification of Performance Problems without the Diagnostic Pack31
Third-party Tools
Identification of Performance Problems without the Diagnostic Pack32 14/05/2016
A number of third-party tools that
doesn’t require the Diagnostic Pack
option exists!
Refer to Kyle Hailey’s Best Oracle
Performance Tools list for an
overview.
I presently advise to use Lighty for
Oracle.
It has a very good price/performance
ratio!
It supports well the approaches for
the analysis of irreproducible
problems (both in real time and
postmortem) described in this
presentation and in my book
Core Messages
It’s possible to work without the
Diagnostic Pack option
Doesn’t make things easier, though
A toolkit is required
Scripts and/or a graphical tool
With and without Diagnostic Pack
option it’s essential to approach
performance problems in a
methodological way!
14/05/2016 Identification of Performance Problems without the Diagnostic Pack33
References
Identification of Performance Problems without the Diagnostic Pack34 14/05/2016
Troubleshooting Oracle Performance, 2nd Edition, Apress (2014)
http://antognini.ch/top/
Kyle Hailey’s Best Oracle Performance Tools list
http://datavirtualizer.com/best-oracle-performance-tools/
The scripts referenced through the presentation can be downloaded from
http://antognini.ch/downloads/top2/
Tanel Põder’s Snapper can be downloaded from
http://blog.tanelpoder.com/files/scripts/snapper.sql
Questions and Answers
Christian Antognini
Senior Principal Consultant
christian.antognini@trivadis.com
14/05/2016 Identification of Performance Problems without the Diagnostic Pack35

Más contenido relacionado

Destacado

A3 statistical symbols
A3 statistical symbolsA3 statistical symbols
A3 statistical symbolssahadevag
 
Vessel Identification System Overview
Vessel Identification System OverviewVessel Identification System Overview
Vessel Identification System OverviewNASBLA
 
State space analysis, eign values and eign vectors
State space analysis, eign values and eign vectorsState space analysis, eign values and eign vectors
State space analysis, eign values and eign vectorsShilpa Shukla
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance PlsqlGuy Harrison
 
Canonical analysis
Canonical analysisCanonical analysis
Canonical analysis緯鈞 沈
 

Destacado (7)

Advanced WEC Dynamics and Controls: System Identification and Model Validation
Advanced WEC Dynamics and Controls: System Identification and Model ValidationAdvanced WEC Dynamics and Controls: System Identification and Model Validation
Advanced WEC Dynamics and Controls: System Identification and Model Validation
 
A3 statistical symbols
A3 statistical symbolsA3 statistical symbols
A3 statistical symbols
 
Vessel Identification System Overview
Vessel Identification System OverviewVessel Identification System Overview
Vessel Identification System Overview
 
State space analysis, eign values and eign vectors
State space analysis, eign values and eign vectorsState space analysis, eign values and eign vectors
State space analysis, eign values and eign vectors
 
MULTIVARIATE STATISTICAL MODELS’ SYMBOLS
MULTIVARIATE STATISTICAL MODELS’ SYMBOLSMULTIVARIATE STATISTICAL MODELS’ SYMBOLS
MULTIVARIATE STATISTICAL MODELS’ SYMBOLS
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance Plsql
 
Canonical analysis
Canonical analysisCanonical analysis
Canonical analysis
 

Similar a Identification of Performance Problems without the Diagnostic Pack

End to-end root cause analysis minimize the time to incident resolution
End to-end root cause analysis minimize the time to incident resolutionEnd to-end root cause analysis minimize the time to incident resolution
End to-end root cause analysis minimize the time to incident resolutionCleo Filho
 
Playwright Test Analytics: Extracting Insights for Improved Developer Velocity
Playwright Test Analytics: Extracting Insights for Improved Developer VelocityPlaywright Test Analytics: Extracting Insights for Improved Developer Velocity
Playwright Test Analytics: Extracting Insights for Improved Developer VelocityAffanIT1
 
miniprojectreport
miniprojectreportminiprojectreport
miniprojectreportsilpa mohan
 
Habits of Effective SAS Programmers
Habits of Effective SAS ProgrammersHabits of Effective SAS Programmers
Habits of Effective SAS ProgrammersSunil Gupta
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP PerformancePeterHBrown
 
Pmo slides jun2010
Pmo slides jun2010Pmo slides jun2010
Pmo slides jun2010Steve Turner
 
Automation Framework Design
Automation Framework DesignAutomation Framework Design
Automation Framework DesignKunal Saxena
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyAnkita Dubey
 
Oracle - Checklist for performance issues
Oracle - Checklist for performance issuesOracle - Checklist for performance issues
Oracle - Checklist for performance issuesMarkus Flechtner
 
Qtp Training Deepti 1 Of 4187
Qtp Training Deepti 1 Of 4187Qtp Training Deepti 1 Of 4187
Qtp Training Deepti 1 Of 4187Azhar Satti
 
Performance testing with your eyes wide open geekweek 2018
Performance testing with your eyes wide open  geekweek 2018Performance testing with your eyes wide open  geekweek 2018
Performance testing with your eyes wide open geekweek 2018Yoav Weiss
 
McGraw-HillIrwinCopyright © 2013 by The McGraw-Hill Compa.docx
McGraw-HillIrwinCopyright © 2013 by The McGraw-Hill Compa.docxMcGraw-HillIrwinCopyright © 2013 by The McGraw-Hill Compa.docx
McGraw-HillIrwinCopyright © 2013 by The McGraw-Hill Compa.docxandreecapon
 
Application Performance: 6 Steps to Enhance Performance of Critical Systems
Application Performance: 6 Steps to Enhance Performance of Critical SystemsApplication Performance: 6 Steps to Enhance Performance of Critical Systems
Application Performance: 6 Steps to Enhance Performance of Critical SystemsCAST
 
Dot Net performance monitoring
 Dot Net performance monitoring Dot Net performance monitoring
Dot Net performance monitoringKranthi Paidi
 
Sql server club - performance management methodologies and enhancements in sq...
Sql server club - performance management methodologies and enhancements in sq...Sql server club - performance management methodologies and enhancements in sq...
Sql server club - performance management methodologies and enhancements in sq...Charley Hanania
 
Best practices for_large_oracle_apps_r12_implementations
Best practices for_large_oracle_apps_r12_implementationsBest practices for_large_oracle_apps_r12_implementations
Best practices for_large_oracle_apps_r12_implementationsAjith Narayanan
 

Similar a Identification of Performance Problems without the Diagnostic Pack (20)

End to-end root cause analysis minimize the time to incident resolution
End to-end root cause analysis minimize the time to incident resolutionEnd to-end root cause analysis minimize the time to incident resolution
End to-end root cause analysis minimize the time to incident resolution
 
SAP Basis CCMS
SAP Basis CCMSSAP Basis CCMS
SAP Basis CCMS
 
Playwright Test Analytics: Extracting Insights for Improved Developer Velocity
Playwright Test Analytics: Extracting Insights for Improved Developer VelocityPlaywright Test Analytics: Extracting Insights for Improved Developer Velocity
Playwright Test Analytics: Extracting Insights for Improved Developer Velocity
 
miniprojectreport
miniprojectreportminiprojectreport
miniprojectreport
 
Habits of Effective SAS Programmers
Habits of Effective SAS ProgrammersHabits of Effective SAS Programmers
Habits of Effective SAS Programmers
 
summary
summarysummary
summary
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP Performance
 
Pmo slides jun2010
Pmo slides jun2010Pmo slides jun2010
Pmo slides jun2010
 
Automation Framework Design
Automation Framework DesignAutomation Framework Design
Automation Framework Design
 
Data Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubeyData Warehouses & Deployment By Ankita dubey
Data Warehouses & Deployment By Ankita dubey
 
Oracle - Checklist for performance issues
Oracle - Checklist for performance issuesOracle - Checklist for performance issues
Oracle - Checklist for performance issues
 
Qtp Training Deepti 1 Of 4187
Qtp Training Deepti 1 Of 4187Qtp Training Deepti 1 Of 4187
Qtp Training Deepti 1 Of 4187
 
Using AWR for SQL Analysis
Using AWR for SQL AnalysisUsing AWR for SQL Analysis
Using AWR for SQL Analysis
 
Performance testing with your eyes wide open geekweek 2018
Performance testing with your eyes wide open  geekweek 2018Performance testing with your eyes wide open  geekweek 2018
Performance testing with your eyes wide open geekweek 2018
 
McGraw-HillIrwinCopyright © 2013 by The McGraw-Hill Compa.docx
McGraw-HillIrwinCopyright © 2013 by The McGraw-Hill Compa.docxMcGraw-HillIrwinCopyright © 2013 by The McGraw-Hill Compa.docx
McGraw-HillIrwinCopyright © 2013 by The McGraw-Hill Compa.docx
 
Application Performance: 6 Steps to Enhance Performance of Critical Systems
Application Performance: 6 Steps to Enhance Performance of Critical SystemsApplication Performance: 6 Steps to Enhance Performance of Critical Systems
Application Performance: 6 Steps to Enhance Performance of Critical Systems
 
Dot Net performance monitoring
 Dot Net performance monitoring Dot Net performance monitoring
Dot Net performance monitoring
 
Sql server club - performance management methodologies and enhancements in sq...
Sql server club - performance management methodologies and enhancements in sq...Sql server club - performance management methodologies and enhancements in sq...
Sql server club - performance management methodologies and enhancements in sq...
 
Data explorer
Data explorerData explorer
Data explorer
 
Best practices for_large_oracle_apps_r12_implementations
Best practices for_large_oracle_apps_r12_implementationsBest practices for_large_oracle_apps_r12_implementations
Best practices for_large_oracle_apps_r12_implementations
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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 WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Identification of Performance Problems without the Diagnostic Pack

  • 1. BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH Identification of Performance Problems without the Diagnostic Pack Christian Antognini 14 May 2016
  • 2. @ChrisAntognini Next-Generation Oracle Database – New Performance Features2 14/05/2016 Senior principal consultant, trainer and partner at Trivadis christian.antognini@trivadis.com http://antognini.ch Focus: get the most out of Oracle Database Logical and physical database design Query optimizer Application performance management Author of Troubleshooting Oracle Performance (Apress, 2008/14) OakTable Network, Oracle ACE Director
  • 3. Agenda 1. Introduction 2. Analysis of Reproducible Problems 3. Real-Time Analysis of Irreproducible Problems 4. Postmortem Analysis of Irreproducible Problems 5. Third-party Tools 14/05/2016 Identification of Performance Problems without the Diagnostic Pack3
  • 4. Introduction 14/05/2016 Identification of Performance Problems without the Diagnostic Pack4
  • 5. Disclaimer Identification of Performance Problems without the Diagnostic Pack5 14/05/2016 The techniques described in this presentation are useful only to identify performance problems that are caused by the database layer.
  • 6. Objective of a Performance Analysis Identification of Performance Problems without the Diagnostic Pack6 14/05/2016 Discover the most time-consuming SQL statements or PL/SQL code invocations. For each of those time-consuming statements, gather additional information that can help in understanding the problem. Execution plan Runtime statistics like the number of processed rows and the CPU utilization Experienced wait events
  • 7. Basic Questions that Require Answers Identification of Performance Problems without the Diagnostic Pack7 14/05/2016 Is the problem reproducible at will? Yes: everything is much easier than if you can’t! Sec. 2 No: see next bullet… For irreproducible problems, is it possible to wait till the problem occurs again? Yes: a real-time analysis has to be carried out Sec. 3 No: a repository holding historical performance statistics is required Sec. 4
  • 8. Analysis of Reproducible Problems 14/05/2016 Identification of Performance Problems without the Diagnostic Pack8
  • 9. Approach Identification of Performance Problems without the Diagnostic Pack9 14/05/2016 The most efficient way to approach a reproducible problem is to take advantage of one of the available tracing and profiling features to perform a controlled measurement while an application is experiencing the problem. The analysis starts by tracing the database calls through SQL trace. If most of the time is spent executing SQL statements, the trace file(s) contain all the necessary information for a detailed analysis. If most of the time is spent executing PL/SQL code, a profiling of the PL/SQL code is needed.
  • 10. Analysis Without Diagnostics Pack Identification of Performance Problems without the Diagnostic Pack10 14/05/2016 The analysis doesn’t depend on the availability of the Diagnostic Pack option. The only feature you could consider to use is Real-time Monitoring. Except in 12c, it’s useful for single executions only Diagnostic and Tuning Pack required
  • 11. Tracing Database Calls Identification of Performance Problems without the Diagnostic Pack11 14/05/2016 There are a number of ways to enable SQL trace. ALTER SESSION DBMS_MONITOR DBMS_SESSION When enabled, SQL trace generates trace files containing not only the executed SQL statements, but also in-depth performance figures about their execution. The trace files have to be analysed with a profiler. TKPROF Third party (e.g. TVD$XTAT and Method R Profiler)
  • 12. Profiling PL/SQL Code Identification of Performance Problems without the Diagnostic Pack12 14/05/2016 The database engine provides two profilers integrated in the PL/SQL engine. Call-level profiler (a.k.a. hierarchical profiler; introduced in 11.1): DBMS_HPROF Line-level profiler: DBMS_PROFILER Except if line-level information is needed, the call-level profiler is superior. The easiest way to use a profiler is to take advantage of the support provided by graphical tools. SQL Developer Third party (e.g. TOAD and PL/SQL Developer)
  • 13. Real-Time Analysis of Irreproducible Problems 14/05/2016 Identification of Performance Problems without the Diagnostic Pack13
  • 14. Approach Identification of Performance Problems without the Diagnostic Pack14 14/05/2016
  • 15. Dynamic Performance Views Provide the Necessary Information Identification of Performance Problems without the Diagnostic Pack15 14/05/2016 OS Statistics Time Model Statistics Wait Classes and Wait Events System and Session Statistics Metrics Diagnostic Pack required for metrics history only Current Sessions Status Active Session History Diagnostic Pack required SQL Statement Statistics Real-time Monitoring Diagnostic and Tuning Pack required
  • 16. Analysis Without Diagnostics Pack Identification of Performance Problems without the Diagnostic Pack16 14/05/2016 There are two main challenges: Enterprise Manager can’t be used – Third-party tools that provide similar features exist Most of the dynamic performance views provide only cumulated statistics – Metrics are an exception – Utilities that sample the cumulated statistics are needed This section focuses on a set of scripts that are freely available, so they can be used on any system.
  • 17. Database Server Load Identification of Performance Problems without the Diagnostic Pack17 14/05/2016 Check not only whether the database server is CPU bound, but also whether there are processes not related to the database instance that consume a lot of CPU time.
  • 18. Database Server Load Based on V$OSSTAT and V$METRIC Identification of Performance Problems without the Diagnostic Pack18 14/05/2016 SQL> @host_load.sql 16 BEGIN_TIME DURATION DB_FG_CPU DB_BG_CPU NON_DB_CPU OS_LOAD NUM_CPU ---------- -------- --------- --------- ---------- ------- ------- 14:05:00 60.10 1.71 0.03 0.03 4.09 8 14:06:00 60.08 1.62 0.03 0.04 4.13 8 14:07:00 59.10 1.89 0.03 0.04 4.96 8 14:08:00 60.11 1.93 0.03 0.03 5.29 8 14:09:00 60.09 1.73 0.03 0.59 4.60 8 14:10:00 60.10 1.57 0.02 3.64 7.50 8 14:11:00 60.16 1.15 0.02 6.60 11.82 8 14:12:00 60.11 1.21 0.02 6.60 13.77 8 …
  • 19. System Level Analysis Identification of Performance Problems without the Diagnostic Pack19 14/05/2016 Several steps have to be carried out: 1. Check the average number of active sessions and the portion of time they spend for every wait class 2. Check system-wide time model statistics 3. Check whether few SQL statements are responsible for most of the activity 4. (Optional) Check whether specific sessions/components/… are responsible for most of the activity
  • 20. System Level Load Based on V$SYS_TIME_MODEL and V$SYSTEM_WAIT_CLASS Identification of Performance Problems without the Diagnostic Pack20 14/05/2016 SQL> @system_activity.sql 15 20 Time AAS Othr% Net% Adm% Conf% Comm% Appl% Conc% SysIO% UsrIO% CPU% -------- ---- ----- ---- ---- ----- ----- ----- ----- ------ ------ ---- 19:10:11 9.7 0.0 0.0 0.0 0.0 0.4 0.0 0.0 0.9 94.8 3.8 19:10:26 10.0 0.0 0.0 0.0 0.0 0.5 0.0 0.0 1.0 94.6 3.9 19:10:41 10.0 0.0 0.0 0.0 0.0 0.4 0.0 0.0 1.0 94.8 3.8 19:10:56 9.9 0.0 0.0 0.0 0.0 0.4 0.0 0.0 1.0 94.6 4.0 19:11:11 9.8 0.0 0.0 0.0 0.2 1.0 0.0 0.0 1.2 93.7 4.0 19:11:26 9.5 0.0 0.0 0.0 0.0 0.4 0.0 0.0 0.9 94.8 3.9 …
  • 21. System Level Time Model Based on V$SYS_TIME_MODEL Identification of Performance Problems without the Diagnostic Pack21 14/05/2016 SQL> @time_model.sql 15 2 Time Statistic AvgActSess Activity% -------- ----------------------------------------- ---------- --------- 19:14:49 DB time 9.8 98.6 .DB CPU 0.3 3.4 .sql execute elapsed time 9.7 97.3 .PL/SQL execution elapsed time 0.1 1.2 background elapsed time 0.1 1.4 .background cpu time 0.0 0.4 …
  • 22. Top Sessions Based on V$SYSSTAT, V$SYS_TIME_ MODEL, V$SESS_TIME_MODEL and V$SESSION Identification of Performance Problems without the Diagnostic Pack22 14/05/2016 SQL> @active_sessions.sql 15 1 10 Time #Sessions #Logins SessionId User Program Activity% -------- --------- ------- ---------- ---- ---------------- --------- 19:14:49 117 0 195 SOE JDBC Thin Client 1.8 224 SOE JDBC Thin Client 1.5 225 SOE JDBC Thin Client 1.5 … 16 SOE JDBC Thin Client 1.4 171 SOE JDBC Thin Client 1.4 68 SOE JDBC Thin Client 1.4 Top-10 Tot 14.9 …
  • 23. System Level Analysis with Snapper Identification of Performance Problems without the Diagnostic Pack23 14/05/2016 Snapper is a script developed by Tanel Põder. Its key functionality is to sample V$SESSION. During the sampling, it checks the status of the specified sessions and, for active sessions, it gathers information about their activity. It’s a very flexible and powerful script that accepts many parameters.
  • 24. System Level Analysis with Snapper – List Top SQL Statements Identification of Performance Problems without the Diagnostic Pack24 14/05/2016 SQL> @snapper.sql ash=sql_id 15 1 all ------------------------- Active% | SQL_ID ------------------------- 196% | c13sma6rkr27c 186% | 8dq0v1mjngj7t 122% | bymb3ujkr3ubk 107% | 7hk2m2702ua0g 82% | 0yas01u2p9ch4 63% | 8z3542ffmp562 62% | 0bzhqhhj9mpaa 30% | 5mddt5kt45rg3
  • 25. Session Level Analysis with Snapper – List Top Wait Events Identification of Performance Problems without the Diagnostic Pack25 14/05/2016 SQL> @snapper.sql ash=event 15 1 172 --------------------------------------------- Active% | EVENT --------------------------------------------- 22% | db file sequential read 1% | ON CPU 1% | db file parallel read With Snapper it’s possible to target either one, several or all sessions
  • 26. SQL Statement Information Identification of Performance Problems without the Diagnostic Pack26 14/05/2016 For SQL statements that are responsible for a large part of the activity, more information is needed. Runtime statistics V$SQLAREA sqlarea.sql V$SQL sql.sql V$SQLSTATS sqlstats.sql Execution plan DBMS_XPLAN
  • 27. Postmortem Analysis of Irreproducible Problems 14/05/2016 Identification of Performance Problems without the Diagnostic Pack27
  • 28. Approach Identification of Performance Problems without the Diagnostic Pack28 14/05/2016 To analyse a performance problem that happened in the past, a repository containing performance statistics covering the period of time to analyse is required. Oracle provides two repositories: Automatic Workload Repository (AWR) – Diagnostic Pack required Statspack
  • 29. Automatic Workload Repository vs. Statspack Identification of Performance Problems without the Diagnostic Pack29 14/05/2016 AWR is fully integrated and automatically installed AWR stores system-level, SQL-level as well as session-level (ASH) data AWR is an Enterprise Edition option available as of 10g only Enterprise Manager provides a GUI for AWR Statspack requires a manual installation Statspack stores system-level and SQL-level data Statspack is free of charge and available with all editions since 8i No Enterprise Manager integration
  • 30. Analysis Without Diagnostics Pack Identification of Performance Problems without the Diagnostic Pack30 14/05/2016 Almost everything provided by an AWR report is provided by a Statspack report. There’s no major difference in reading the two reports. What’s really missing is the persisted ASH data. Third-party implementations that allow to implement the roadmap discussed in the previous section exist
  • 31. Third-party Tools 14/05/2016 Identification of Performance Problems without the Diagnostic Pack31
  • 32. Third-party Tools Identification of Performance Problems without the Diagnostic Pack32 14/05/2016 A number of third-party tools that doesn’t require the Diagnostic Pack option exists! Refer to Kyle Hailey’s Best Oracle Performance Tools list for an overview. I presently advise to use Lighty for Oracle. It has a very good price/performance ratio! It supports well the approaches for the analysis of irreproducible problems (both in real time and postmortem) described in this presentation and in my book
  • 33. Core Messages It’s possible to work without the Diagnostic Pack option Doesn’t make things easier, though A toolkit is required Scripts and/or a graphical tool With and without Diagnostic Pack option it’s essential to approach performance problems in a methodological way! 14/05/2016 Identification of Performance Problems without the Diagnostic Pack33
  • 34. References Identification of Performance Problems without the Diagnostic Pack34 14/05/2016 Troubleshooting Oracle Performance, 2nd Edition, Apress (2014) http://antognini.ch/top/ Kyle Hailey’s Best Oracle Performance Tools list http://datavirtualizer.com/best-oracle-performance-tools/ The scripts referenced through the presentation can be downloaded from http://antognini.ch/downloads/top2/ Tanel Põder’s Snapper can be downloaded from http://blog.tanelpoder.com/files/scripts/snapper.sql
  • 35. Questions and Answers Christian Antognini Senior Principal Consultant christian.antognini@trivadis.com 14/05/2016 Identification of Performance Problems without the Diagnostic Pack35