SlideShare a Scribd company logo
1 of 44
1
Analyzing and Interpreting
AWR Report
by
Satyendra Pasalapudi
@pasalapudi
2
Agenda
• AWR Overview
• Why AWR is powerful than Statspack?
• Top 5 Timed Events
• Oracle Time Model, Wait Classes, & Metrics
• Interpreting AWR
3
Automatic Workload Repository (AWR)
– Built-in repository of performance information (
Light Weight)
– Snapshots of database metrics taken every 60
minutes and retained for 7 days
– Foundation for all self-management functions
– Data to find root cause and suggest remedies.
MMON
In-memory
statistics
Snapshots
AWR
SGA
60 minutes
4
Managing the AWR
– Retention period
• The default is 7 days
• Consider storage needs
– Collection interval
• The default is
60 minutes
• Consider storage needs and performance impact
– Collection level
• Basic (disables most of ADDM functionality)
• Typical (recommended)
• All (adds additional SQL tuning information to
snapshots)
5
Secret Behind the Success of AWR and all
other self components from Oracle 10g (
ADDM , Metrics , Alerts) ?
6
AiSHwarya Rai
7
ASH ( Active Session History)
• Memory buffers in the fixed areas
• New Oracle Background Process
– MMNL – MMON Lite
• V$ACTIVE_SESSION_HISTORY
• X$ASH
• DBA_HIST_ACTIVE_SESS_HISTORY
– Based on WRH$_ACTIVE_SESSION_HISTORY
8
ASH Architecture
Circular buffer
in SGA
V$ACTIVE_SESSION_HISTORY
X$ASH
AWR
WRH$_ACTIVE_SESSION_HISTORY
Every
30 mins
or
when buffer is
full
Samples with
variable size rows
Direct-path
inserts
MMON
Lite
(MMNL)
Indexed on timeIndexed on time
9
ASH Details - General
• No installation or setup required
• Intended 30-min circular buffer in the SGA
• In memory ASH contains as much history as it can
store.
– Circular buffer not cleared when written to disk
• ASH on Disk (1 of 10 in memory samples)
• Init.ora
– STATISTICS_LEVEL = TYPICAL (Default)
• Master Switch
– _ACTIVE_SESSION_HISTORY = TRUE (Default)
10
Session 1
Ash Samples Session State
TIME
10:00:00 10:00:01 10:00:02 10:00:03 10:00:04 10:00:05
11
Session 1
Ash Samples Session State
TIME? ? ? ? ?
Sessions change a lot quicker but can
get the main picture via sampling by
sampling faster
12
Session States
IO CPU IdleWait
13
Session States
• Idle
• CPU
• Waiting
• I/O
14
Session 1
Session 2
Session 3
Session 4
Samples for all users
10:15:00 10:15:01 10:15:02 10:15:03 10:15:04 10:15:05 10:15:06 10:15:07 TIME
15
v$active_session_history
SESSION_ID NUMBER
SESSION_SERIAL# NUMBER
USER_ID NUMBER
SERVICE_HASH NUMBER
SESSION_TYPE VARCHAR2(10)
PROGRAM VARCHAR2(64)
MODULE VARCHAR2(48)
ACTION VARCHAR2(32)
CLIENT_ID VARCHAR2(64)
EVENT VARCHAR2(64)
EVENT_ID NUMBER
EVENT# NUMBER
SEQ# NUMBER
P1 NUMBER
P2 NUMBER
P3 NUMBER
WAIT_TIME NUMBER
TIME_WAITED NUMBER
CURRENT_OBJ# NUMBER
CURRENT_FILE# NUMBER
CURRENT_BLOCK# NUMBER0
SQL_ID VARCHAR2(13)
SQL_CHILD_NUMBER NUMBER
SQL_PLAN_HASH_VALUE NUMBER
SQL_OPCODE NUMBER
QC_SESSION_ID NUMBER
QC_INSTANCE_ID NUMBER
SAMPLE_ID NUMBER
SAMPLE_TIME TIMESTAMP(3)
When
Session
SQL
Wait
SESSION_STATE VARCHAR2(7)
WAIT_TIME NUMBER
State
TIME_WAITED NUMBER Duration
16
AWR Infrastructure
SGA
V$ DBA_*
ADDM
Self-tuning
component
Self-tuning
component
…
Internal clients
External clients
EM SQL*Plus …
Efficient
in-memory
statistics
collection
AWR
snapshotsMMON
17
Automatic Database Diagnostic Monitor (ADDM)
– Runs after each AWR snapshot
– Monitors the instance; detects bottlenecks
– Stores results within the AWR
Snapshots
ADDM
AWR
EM
ADDM results
18
Advisory Framework
ADDM
SQL Tuning
Advisor
SQL Access
Advisor
Memory
Space
PGA Advisor
SGA
Segment Advisor
Undo Advisor
Buffer Cache
Advisor
Library Cache
Advisor
PGA
Backup MTTR Advisor
19
AWR TOP5 Timed Events – Wait Class
20
Active Sessions in OEM
21
AWR– Top Timed Events
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~
% Total
Event Waits Time (s) Ela Time
--------------------------- ------------ ----------- --------
db file sequential read 399,394,399 2,562,115 52.26
CPU time 960,825 19.60
buffer busy waits 122,302,412 540,757 11.03
PL/SQL lock timer 4,077 243,056 4.96
log file switch 188,701 187,648 3.83
(checkpoint incomplete)
22
Top 12 Waits
NAME Count % Total
1. db file sequential read 23,850.00 11.67%
2. log file sync 20,594.00 10.08%
3. db file scattered read 15,505.00 7.59%
4. latch free 11,078.00 5.42%
5. enqueue 7,732.00 3.78%
6. SQL*Net more data from client 7,510.00 3.67%
7. direct path read 5,840.00 2.86%
8. direct path write 4,868.00 2.38%
9. buffer busy waits 4,589.00 2.25%
10. SQL*Net more data to client 3,805.00 1.86%
11. log buffer space 2,990.00 1.46%
12. log file switch completion 2,878.00 1.41%
Above is over 80% of wait times reported
23
Top 36 Waits
19. write complete waits
20. library cache lock
21. SQL*Net more data from dblink
22. log file switch (checkpoint incomplete)
23. library cache load lock
24. row cache lock
25. local write wait
26. sort segment request
27. process startup
28. unread message
29. file identify
30. pipe put
31. switch logfile command
32. SQL*Net break/reset to dblink
33. log file switch (archiving needed)
34. Wait for a undo record
35. direct path write (lob)
36. undo segment extension
1. db file sequential read
2. log file sync
3. db file scattered read
4. latch free
5. enqueue
6. SQL*Net more data from client
7. direct path read
8. direct path write
9. buffer busy waits
10. SQL*Net more data to client
11. log buffer space
12. log file switch completion
13. library cache pin
14. SQL*Net break/reset to client
15. io done
16. file open
17. free buffer waits
18. db file parallel read
24
Waits
I/O
Library Cache
Locks
Redo
Buffer Cache
SQL*Net
Wait Areas
25
Wait Tree
Waits
IO
Buffer Cache
Library Cache
Lock
Redo
SQL Net
Buffer Busy
Rollback
Free lists
IO ReadCache Latches
Library Cache
Shared Pool
TX Row Lock
TX ITL Lock
HW Lock
Write IO
Read IO
Log Buffer
Log File Sync
Log File
26
OEM TOP Activity
27
OEM TOP Activity
28
OEM TOP Activity
29
Empty. Why?
Top 5 Timed Events – CPU time
30
• Because “CPU time” is not wait event. It is the
time spent on CPU to do the actual work.
Top 5 Timed Events – CPU time
31
• We had 60*60=3600 CPU Seconds to use in that interval if it is a single CPU
machine and 1 hour is the snap.
• If I tell you there were 32 CPUs, means:
60*60*32=115200 CPU seconds to use in 1 hr interval. “Assuming” only
1 Database is running on box and no other application load except Oracle
database.
• (14,659/115,200)*100 = 12.73% of Total CPU
• So we are not CPU bound. “Hopefully”
Top 5 Timed Events – CPU time
32
What Is DB Time?
DB Time
33
DB Time =
DB Wait Time +
DB CPU Time
34
Parse cpu to Parse elapsed ratio?
• If you spend 1 CPU second on CPU to parse
but total elapsed is 5 second wall clock time
then it means you are waiting on some
resources to complete the parsing.
• 100% ratio means parse CPU = Parse elapsed
time so no waits or no contention.
35
• (8879/110582)*100=8.03%
How does Oracle calculates it?
36
What does this ratio mean?
• Parse CPU to Parse Elapsd %: 8.03
• It is percentage. 8.03% means .0803
• If you divide it by 1 then 1/.0803 = 12.45
• Which means 12.45 second (wall clock time)
must be elapsed for every cpu second for
parsing. BAD
• It represents resource contention while parsing.
37
Execute to Parse Ratio?
• This a ratio which measures how many times
a statement got executed as opposed to parsed.
• if it is 99.99% then it means for 1 parse there
are 10,000 executes.
• if it is 90% then it means for 1 parse there are
10 executes.
• For OLTP, good to be near 99%, for DSS it
could be lower as “generally” all sql
statements/reports are unique.
38
• EXECUTE to PARSE = (1- parse/execute)
• 1-915,652/9,944,590 = 1-0.092 = 0.9079
• For percentage => .9079*100 = 90.79%
How does Oracle calculates it?
39
• EXECUTE to PARSE %= 90.79
• 1-parse/execute = .9079
• Parse/execute = 1-.9079
• Parse/execute = 0.0921
• Parse/execute = 921/10000
• For parse = 1 execute = 10.85
• So 1 parse for every ~11 executes.
What does this ratio mean?
40
?
41
Thank You
www.linkedin.com/in/satyendra
@pasalapudi
42
Wait Problem Potential Fix
Enqueue - ST Use LMT’s or pre-allocate large extents
Enqueue - HW Pre-allocate extents above HW (high
water mark.)
Enqueue – TX Increase initrans and/or maxtrans (TX4)
on (transaction) the table or index. Fix
locking issues if TX6. Bitmap (TX4) &
Duplicates in Index (TX4).
Enqueue - TM Index foreign keys; Check application
(trans. mgmt.) locking of tables. DML Locks.
43 43
Wait Problem Potential Fix
Sequential Read Indicates many index reads – tune the
code (especially joins); Faster I/O
Scattered Read Indicates many full table scans – tune
the code; cache small tables; Faster I/O
Free Buffer Increase the DB_CACHE_SIZE;
shorten the checkpoint; tune the code to
get less dirty blocks, faster I/O,
use multiple DBWR’s
Buffer Busy Segment Header – Add freelists (if inserts)
or freelist groups (esp. RAC). Use ASSM.
44 44
Wait Problem Potential Fix
Buffer Busy Data Block – Separate ‘hot’ data; potentially
use reverse key indexes; fix queries to
reduce the blocks popularity, use
smaller blocks, I/O, Increase initrans
and/or maxtrans (this one’s debatable)
Reduce records per block.
Buffer Busy Undo Header – Add rollback segments
or increase size of segment area (auto undo)
Buffer Busy Undo block – Commit more (not too
much) Larger rollback segments/area.
Try to fix the SQL.

More Related Content

What's hot

Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuningGuy Harrison
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
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 AdvisorsJohn Kanagaraj
 
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
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder
 
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder
 
Oracle AWR Data mining
Oracle AWR Data miningOracle AWR Data mining
Oracle AWR Data miningYury Velikanov
 
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 PoderTanel Poder
 
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...Carlos Sierra
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014John Beresniewicz
 
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 eDB360Carlos Sierra
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizerMauro Pagano
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by exampleMauro Pagano
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasKyle Hailey
 

What's hot (20)

Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
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
 
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...
 
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
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
 
AWR & ASH Analysis
AWR & ASH AnalysisAWR & ASH Analysis
AWR & ASH Analysis
 
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
 
Oracle AWR Data mining
Oracle AWR Data miningOracle AWR Data mining
Oracle AWR Data mining
 
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
 
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014
 
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
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
 
Ash and awr deep dive hotsos
Ash and awr deep dive hotsosAsh and awr deep dive hotsos
Ash and awr deep dive hotsos
 
AWR reports-Measuring CPU
AWR reports-Measuring CPUAWR reports-Measuring CPU
AWR reports-Measuring CPU
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aas
 

Similar to Analyzing and Interpreting AWR

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 RACKristofferson A
 
Awr + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance tuningAiougVizagChapter
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsCarlos Sierra
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerKevin Kline
 
Oracle Performance Tuning DE(v1.2)-part2.ppt
Oracle Performance Tuning DE(v1.2)-part2.pptOracle Performance Tuning DE(v1.2)-part2.ppt
Oracle Performance Tuning DE(v1.2)-part2.pptVenugopalChattu1
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d methodAjith Narayanan
 
Oracle Result Cache deep dive
Oracle Result Cache deep diveOracle Result Cache deep dive
Oracle Result Cache deep diveAlexander Tokarev
 
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...Ontico
 
Oracle result cache highload 2017
Oracle result cache highload 2017Oracle result cache highload 2017
Oracle result cache highload 2017Alexander Tokarev
 
ASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdfASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdftricantino1973
 
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 approachLaurent Leturgez
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaaCuneyt Goksu
 
Database Core performance principles
Database Core performance principlesDatabase Core performance principles
Database Core performance principlesKoppelaars
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture PerformanceEnkitec
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
 
unix_linux_ORATOP_TechDays2016_presentations
unix_linux_ORATOP_TechDays2016_presentationsunix_linux_ORATOP_TechDays2016_presentations
unix_linux_ORATOP_TechDays2016_presentationsgarosgaros
 
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Bobby Curtis
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionTanel Poder
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneEnkitec
 
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataJignesh Shah
 

Similar to Analyzing and Interpreting AWR (20)

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
 
Awr + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance tuning
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL Server
 
Oracle Performance Tuning DE(v1.2)-part2.ppt
Oracle Performance Tuning DE(v1.2)-part2.pptOracle Performance Tuning DE(v1.2)-part2.ppt
Oracle Performance Tuning DE(v1.2)-part2.ppt
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d method
 
Oracle Result Cache deep dive
Oracle Result Cache deep diveOracle Result Cache deep dive
Oracle Result Cache deep dive
 
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
 
Oracle result cache highload 2017
Oracle result cache highload 2017Oracle result cache highload 2017
Oracle result cache highload 2017
 
ASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdfASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdf
 
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
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
 
Database Core performance principles
Database Core performance principlesDatabase Core performance principles
Database Core performance principles
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
 
unix_linux_ORATOP_TechDays2016_presentations
unix_linux_ORATOP_TechDays2016_presentationsunix_linux_ORATOP_TechDays2016_presentations
unix_linux_ORATOP_TechDays2016_presentations
 
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in Action
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
 
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
 

More from pasalapudi

Multiple ldap implementation with ebs using oid
Multiple ldap implementation with ebs using oidMultiple ldap implementation with ebs using oid
Multiple ldap implementation with ebs using oidpasalapudi
 
Oracle E-Business Suite On Oracle Cloud
Oracle E-Business Suite On Oracle CloudOracle E-Business Suite On Oracle Cloud
Oracle E-Business Suite On Oracle Cloudpasalapudi
 
Aioug2017 deploying-ebs-on-prem-and-on-oracle-cloud v2
Aioug2017 deploying-ebs-on-prem-and-on-oracle-cloud v2Aioug2017 deploying-ebs-on-prem-and-on-oracle-cloud v2
Aioug2017 deploying-ebs-on-prem-and-on-oracle-cloud v2pasalapudi
 
12.2 secure configureconsole_adop_changes_aioug_appsdba_nov17
12.2 secure configureconsole_adop_changes_aioug_appsdba_nov1712.2 secure configureconsole_adop_changes_aioug_appsdba_nov17
12.2 secure configureconsole_adop_changes_aioug_appsdba_nov17pasalapudi
 
Online patching ebs122_aioug_appsdba_nov2017
Online patching ebs122_aioug_appsdba_nov2017Online patching ebs122_aioug_appsdba_nov2017
Online patching ebs122_aioug_appsdba_nov2017pasalapudi
 
Aioug sangam13 v3
Aioug sangam13 v3Aioug sangam13 v3
Aioug sangam13 v3pasalapudi
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intropasalapudi
 
DBA to Data Scientist
DBA to Data ScientistDBA to Data Scientist
DBA to Data Scientistpasalapudi
 

More from pasalapudi (8)

Multiple ldap implementation with ebs using oid
Multiple ldap implementation with ebs using oidMultiple ldap implementation with ebs using oid
Multiple ldap implementation with ebs using oid
 
Oracle E-Business Suite On Oracle Cloud
Oracle E-Business Suite On Oracle CloudOracle E-Business Suite On Oracle Cloud
Oracle E-Business Suite On Oracle Cloud
 
Aioug2017 deploying-ebs-on-prem-and-on-oracle-cloud v2
Aioug2017 deploying-ebs-on-prem-and-on-oracle-cloud v2Aioug2017 deploying-ebs-on-prem-and-on-oracle-cloud v2
Aioug2017 deploying-ebs-on-prem-and-on-oracle-cloud v2
 
12.2 secure configureconsole_adop_changes_aioug_appsdba_nov17
12.2 secure configureconsole_adop_changes_aioug_appsdba_nov1712.2 secure configureconsole_adop_changes_aioug_appsdba_nov17
12.2 secure configureconsole_adop_changes_aioug_appsdba_nov17
 
Online patching ebs122_aioug_appsdba_nov2017
Online patching ebs122_aioug_appsdba_nov2017Online patching ebs122_aioug_appsdba_nov2017
Online patching ebs122_aioug_appsdba_nov2017
 
Aioug sangam13 v3
Aioug sangam13 v3Aioug sangam13 v3
Aioug sangam13 v3
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
 
DBA to Data Scientist
DBA to Data ScientistDBA to Data Scientist
DBA to Data Scientist
 

Recently uploaded

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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...Miguel Araújo
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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 TerraformAndrey Devyatkin
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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 DiscoveryTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
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...Martijn de Jong
 
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 RobisonAnna Loughnan Colquhoun
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
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...
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Analyzing and Interpreting AWR

  • 1. 1 Analyzing and Interpreting AWR Report by Satyendra Pasalapudi @pasalapudi
  • 2. 2 Agenda • AWR Overview • Why AWR is powerful than Statspack? • Top 5 Timed Events • Oracle Time Model, Wait Classes, & Metrics • Interpreting AWR
  • 3. 3 Automatic Workload Repository (AWR) – Built-in repository of performance information ( Light Weight) – Snapshots of database metrics taken every 60 minutes and retained for 7 days – Foundation for all self-management functions – Data to find root cause and suggest remedies. MMON In-memory statistics Snapshots AWR SGA 60 minutes
  • 4. 4 Managing the AWR – Retention period • The default is 7 days • Consider storage needs – Collection interval • The default is 60 minutes • Consider storage needs and performance impact – Collection level • Basic (disables most of ADDM functionality) • Typical (recommended) • All (adds additional SQL tuning information to snapshots)
  • 5. 5 Secret Behind the Success of AWR and all other self components from Oracle 10g ( ADDM , Metrics , Alerts) ?
  • 7. 7 ASH ( Active Session History) • Memory buffers in the fixed areas • New Oracle Background Process – MMNL – MMON Lite • V$ACTIVE_SESSION_HISTORY • X$ASH • DBA_HIST_ACTIVE_SESS_HISTORY – Based on WRH$_ACTIVE_SESSION_HISTORY
  • 8. 8 ASH Architecture Circular buffer in SGA V$ACTIVE_SESSION_HISTORY X$ASH AWR WRH$_ACTIVE_SESSION_HISTORY Every 30 mins or when buffer is full Samples with variable size rows Direct-path inserts MMON Lite (MMNL) Indexed on timeIndexed on time
  • 9. 9 ASH Details - General • No installation or setup required • Intended 30-min circular buffer in the SGA • In memory ASH contains as much history as it can store. – Circular buffer not cleared when written to disk • ASH on Disk (1 of 10 in memory samples) • Init.ora – STATISTICS_LEVEL = TYPICAL (Default) • Master Switch – _ACTIVE_SESSION_HISTORY = TRUE (Default)
  • 10. 10 Session 1 Ash Samples Session State TIME 10:00:00 10:00:01 10:00:02 10:00:03 10:00:04 10:00:05
  • 11. 11 Session 1 Ash Samples Session State TIME? ? ? ? ? Sessions change a lot quicker but can get the main picture via sampling by sampling faster
  • 13. 13 Session States • Idle • CPU • Waiting • I/O
  • 14. 14 Session 1 Session 2 Session 3 Session 4 Samples for all users 10:15:00 10:15:01 10:15:02 10:15:03 10:15:04 10:15:05 10:15:06 10:15:07 TIME
  • 15. 15 v$active_session_history SESSION_ID NUMBER SESSION_SERIAL# NUMBER USER_ID NUMBER SERVICE_HASH NUMBER SESSION_TYPE VARCHAR2(10) PROGRAM VARCHAR2(64) MODULE VARCHAR2(48) ACTION VARCHAR2(32) CLIENT_ID VARCHAR2(64) EVENT VARCHAR2(64) EVENT_ID NUMBER EVENT# NUMBER SEQ# NUMBER P1 NUMBER P2 NUMBER P3 NUMBER WAIT_TIME NUMBER TIME_WAITED NUMBER CURRENT_OBJ# NUMBER CURRENT_FILE# NUMBER CURRENT_BLOCK# NUMBER0 SQL_ID VARCHAR2(13) SQL_CHILD_NUMBER NUMBER SQL_PLAN_HASH_VALUE NUMBER SQL_OPCODE NUMBER QC_SESSION_ID NUMBER QC_INSTANCE_ID NUMBER SAMPLE_ID NUMBER SAMPLE_TIME TIMESTAMP(3) When Session SQL Wait SESSION_STATE VARCHAR2(7) WAIT_TIME NUMBER State TIME_WAITED NUMBER Duration
  • 16. 16 AWR Infrastructure SGA V$ DBA_* ADDM Self-tuning component Self-tuning component … Internal clients External clients EM SQL*Plus … Efficient in-memory statistics collection AWR snapshotsMMON
  • 17. 17 Automatic Database Diagnostic Monitor (ADDM) – Runs after each AWR snapshot – Monitors the instance; detects bottlenecks – Stores results within the AWR Snapshots ADDM AWR EM ADDM results
  • 18. 18 Advisory Framework ADDM SQL Tuning Advisor SQL Access Advisor Memory Space PGA Advisor SGA Segment Advisor Undo Advisor Buffer Cache Advisor Library Cache Advisor PGA Backup MTTR Advisor
  • 19. 19 AWR TOP5 Timed Events – Wait Class
  • 21. 21 AWR– Top Timed Events Top 5 Timed Events ~~~~~~~~~~~~~~~~~~ % Total Event Waits Time (s) Ela Time --------------------------- ------------ ----------- -------- db file sequential read 399,394,399 2,562,115 52.26 CPU time 960,825 19.60 buffer busy waits 122,302,412 540,757 11.03 PL/SQL lock timer 4,077 243,056 4.96 log file switch 188,701 187,648 3.83 (checkpoint incomplete)
  • 22. 22 Top 12 Waits NAME Count % Total 1. db file sequential read 23,850.00 11.67% 2. log file sync 20,594.00 10.08% 3. db file scattered read 15,505.00 7.59% 4. latch free 11,078.00 5.42% 5. enqueue 7,732.00 3.78% 6. SQL*Net more data from client 7,510.00 3.67% 7. direct path read 5,840.00 2.86% 8. direct path write 4,868.00 2.38% 9. buffer busy waits 4,589.00 2.25% 10. SQL*Net more data to client 3,805.00 1.86% 11. log buffer space 2,990.00 1.46% 12. log file switch completion 2,878.00 1.41% Above is over 80% of wait times reported
  • 23. 23 Top 36 Waits 19. write complete waits 20. library cache lock 21. SQL*Net more data from dblink 22. log file switch (checkpoint incomplete) 23. library cache load lock 24. row cache lock 25. local write wait 26. sort segment request 27. process startup 28. unread message 29. file identify 30. pipe put 31. switch logfile command 32. SQL*Net break/reset to dblink 33. log file switch (archiving needed) 34. Wait for a undo record 35. direct path write (lob) 36. undo segment extension 1. db file sequential read 2. log file sync 3. db file scattered read 4. latch free 5. enqueue 6. SQL*Net more data from client 7. direct path read 8. direct path write 9. buffer busy waits 10. SQL*Net more data to client 11. log buffer space 12. log file switch completion 13. library cache pin 14. SQL*Net break/reset to client 15. io done 16. file open 17. free buffer waits 18. db file parallel read
  • 25. 25 Wait Tree Waits IO Buffer Cache Library Cache Lock Redo SQL Net Buffer Busy Rollback Free lists IO ReadCache Latches Library Cache Shared Pool TX Row Lock TX ITL Lock HW Lock Write IO Read IO Log Buffer Log File Sync Log File
  • 29. 29 Empty. Why? Top 5 Timed Events – CPU time
  • 30. 30 • Because “CPU time” is not wait event. It is the time spent on CPU to do the actual work. Top 5 Timed Events – CPU time
  • 31. 31 • We had 60*60=3600 CPU Seconds to use in that interval if it is a single CPU machine and 1 hour is the snap. • If I tell you there were 32 CPUs, means: 60*60*32=115200 CPU seconds to use in 1 hr interval. “Assuming” only 1 Database is running on box and no other application load except Oracle database. • (14,659/115,200)*100 = 12.73% of Total CPU • So we are not CPU bound. “Hopefully” Top 5 Timed Events – CPU time
  • 32. 32 What Is DB Time? DB Time
  • 33. 33 DB Time = DB Wait Time + DB CPU Time
  • 34. 34 Parse cpu to Parse elapsed ratio? • If you spend 1 CPU second on CPU to parse but total elapsed is 5 second wall clock time then it means you are waiting on some resources to complete the parsing. • 100% ratio means parse CPU = Parse elapsed time so no waits or no contention.
  • 36. 36 What does this ratio mean? • Parse CPU to Parse Elapsd %: 8.03 • It is percentage. 8.03% means .0803 • If you divide it by 1 then 1/.0803 = 12.45 • Which means 12.45 second (wall clock time) must be elapsed for every cpu second for parsing. BAD • It represents resource contention while parsing.
  • 37. 37 Execute to Parse Ratio? • This a ratio which measures how many times a statement got executed as opposed to parsed. • if it is 99.99% then it means for 1 parse there are 10,000 executes. • if it is 90% then it means for 1 parse there are 10 executes. • For OLTP, good to be near 99%, for DSS it could be lower as “generally” all sql statements/reports are unique.
  • 38. 38 • EXECUTE to PARSE = (1- parse/execute) • 1-915,652/9,944,590 = 1-0.092 = 0.9079 • For percentage => .9079*100 = 90.79% How does Oracle calculates it?
  • 39. 39 • EXECUTE to PARSE %= 90.79 • 1-parse/execute = .9079 • Parse/execute = 1-.9079 • Parse/execute = 0.0921 • Parse/execute = 921/10000 • For parse = 1 execute = 10.85 • So 1 parse for every ~11 executes. What does this ratio mean?
  • 40. 40 ?
  • 42. 42 Wait Problem Potential Fix Enqueue - ST Use LMT’s or pre-allocate large extents Enqueue - HW Pre-allocate extents above HW (high water mark.) Enqueue – TX Increase initrans and/or maxtrans (TX4) on (transaction) the table or index. Fix locking issues if TX6. Bitmap (TX4) & Duplicates in Index (TX4). Enqueue - TM Index foreign keys; Check application (trans. mgmt.) locking of tables. DML Locks.
  • 43. 43 43 Wait Problem Potential Fix Sequential Read Indicates many index reads – tune the code (especially joins); Faster I/O Scattered Read Indicates many full table scans – tune the code; cache small tables; Faster I/O Free Buffer Increase the DB_CACHE_SIZE; shorten the checkpoint; tune the code to get less dirty blocks, faster I/O, use multiple DBWR’s Buffer Busy Segment Header – Add freelists (if inserts) or freelist groups (esp. RAC). Use ASSM.
  • 44. 44 44 Wait Problem Potential Fix Buffer Busy Data Block – Separate ‘hot’ data; potentially use reverse key indexes; fix queries to reduce the blocks popularity, use smaller blocks, I/O, Increase initrans and/or maxtrans (this one’s debatable) Reduce records per block. Buffer Busy Undo Header – Add rollback segments or increase size of segment area (auto undo) Buffer Busy Undo block – Commit more (not too much) Larger rollback segments/area. Try to fix the SQL.