SlideShare a Scribd company logo
AWR1page
Sanity checking time
instrumentation in AWR
reports

John Beresniewicz

OakTableWorld 2018

Acknowledgements
• Kevin Closson / Connor McDonald

(for the motivating case studies)
• Graham Wood, Uri Shaft

(mentorship, advice and insight)
• Lothar Flatz / Wolfgang Breitling / Alberto Dell’Era /
Toon Koppelaars

(for test sample AWR reports)
Outline of talk
• Motivation: confusing AWR reports
• Model and instrumentation for time in Oracle
• When model and measures don’t match
• Concept and design of AWR1page
• Using AWR1page: case studies 1 & 2
• Final thoughts, future directions
Motivation: confounding AWR reports
• OakTable inquiries about AWR reports where
“numbers don’t add up”
• First case: double-counted DB time (CPU under wait)
• AWR Ambiguity OakTable World 2015
• Second case: AIX CPU reporting issues
• AWR1page OakTable World 2016
• Solving such AWR report puzzles is mentally
excruciating
AWR Ambiguity take-away slide
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
Model: Oracle Time = CPU + Wait
• Time spent executing Oracle code by either
background or foreground processes
• Active processes are usually most interesting

Active = (in DB call) && (on CPU or “active” wait)
• Multiple measure sources for each time component
Oracle Time
CPU Time Wait Time
Oracle time instrumentation
• Wait/Event Model: V$SYSTEM_EVENT

FG/BG active/idle wait time
• Time Model: V$SYS_TIME_MODEL

FG/BG CPU and Elapsed
• OS Timing: V$OSSTAT

CPU sys/usr/IO/wait/load avg
• ASH: V$ACTIVE_SESSION_HISTORY

FG/BG CPU and wait (estimated)
NOTE: Stop using V$SYSSTAT “CPU used by this session”
Time instrumentation essentials
• Run-queue time distorts everything!
• TM elapsed = (call end - call start) - idle wait time
• ASH ON CPU = active session not in wait (derived)
• TM CPU measured = actual instruction time used
• OSSTAT reliability platform-dependent
• Smaller call latencies increase distortion
Normalization: Avg Active Sessions
• Essential Oracle performance metric
• AAS = instrumentation time / elapsed time
• AAS / Core = core-normalized AAS
RMOUG 2007
Consistency checking AWR reports
• AWR reports are massive

(most of it irrelevant for any specific situation)
• Time data scattered about, difficult to compare
• Units vary, breakdowns inconsistent, not
normalized
• Labor intensive and error-prone
Cognitive load of consistency checking is huge
Sources of inconsistency
• CPU saturation: run queue time

First and most important item to check

ASH CPU >> Time Model CPU
• CPU under wait event

Time Model Wait << Event Wait ~ ASH Wait
• misleading hyperthreading OS CPU accounting

IBM AIX issue: ASH CPU >> Time Model CPU
• double-counted DB time

10.1 bug with job queue process accounting
Sources of inconsistency (2)
• un-instrumented wait event

ASH CPU >> Time Model CPU (OS CPU)
• active events classified idle

Time Model, Event Wait and ASH under-reported
• dropped ASH samples*

ASH << Time Model
• cpu-active idle events*

FG Time << FG CPU Time
Check CPU first!
• OSSTAT: Average Active Sessions Busy / Core
• OSSTAT: Load Average / Core
• OSSTAT: OS_CPU_WAIT (process level AAS)
• Time Model: CPU AAS / Core
• CPU Threads / Core = hyper-threading factor
Some consistency checks
? CPU saturation: Core utilization >> 1
? TM AAS ~ ASH AAS
? TM CPU ~ ASH CPU ~ OS CPU
? TM AAS ~ (TM CPU + WT Wait)
? TM Wait ~ ASH Wait ~ WT Wait
KEY:
WT = Event/Wait Model
TM = Time Model
OS = OSSTAT
ASH = ASH
Oracle Time << CPU + Wait
• CPU under wait, time is being double-counted



TM Total < (TM CPU + WT Wait) && 

ASH Wait ~ WT Wait
Oracle Time
CPU Time Wait Time
Oracle Time
CPU Time Wait TimeCPU under wait
Oracle Time >> CPU + Wait
• Wait under-counted, un-instrumented wait?



ASH CPU > TM CPU && TM CPU ~ OS CPU && 

TM Wait > WT Wait
• CPU under-counted, AIX or course timers?



ASH CPU > TM CPU && 

ASH Wait ~ WT Wait && TM Wait > WT Wait
Oracle Time
CPU Time Wait Time
The AIX CPU issue
• AIX with SMT turned on reports CPU strangely
• Semantics of CPU accounting altered
• According to Graham: “it’s just broken”
• OakTable blog references:

Marcin Przepiorowski

Jeremy Schneider
• Graham: Increase reported CPU values by 50% for
SMT=4 for more realistic picture
Objectives for AWR1page
• Reduce cognitive load of checking time
consistency in AWR reports: Total / CPU / Wait
• Facilitate comparative assessment of system sizes
and busy-ness
• In 1 page, using only AWR text report as input
AWR report time measure sources
• $0 ~”^Operating System Statistics” {
• $0 ~ "^Time Model Statistics" {
• $0 ~ "^Foreground Wait Class" {
• $0 ~ "^Wait Classes by Total Wait Time" {
• $0 ~ "^Activity Over Time" {
• Also other important report singletons like elapsed
time of AWR period, platform, core count, cpu count
Idea: measure x source matrix
INFO OSSTAT TIME MODEL ASH
HOST CPU
SYS
USR
ORCL TOTAL
CPU
WAIT
MISC
Compare rows
for equality
measures
data sources
Columns add up
heirarchically
Values from AWR report
INFO *
cores
cpus
threads/core
memory
OSSTAT
X
X
X*
X
TIME MODEL ASH
ORCL .
total .
FG
BG
.
.
.
.

X
X
X
.
X
X
X*
CPU load .
. busy
i/o wait
scheduler
ORCL .
FG
BG
X
X
X
X
.
.
.
.
.
.
.
X
X
X
.
.
.
.
X
X
X*
WAIT
MISC
Design mockup
AWR1page cores: nn cpus: nn threads: nn elapsed:nnnn.m
measure OSSTAT TIME MODEL ASH WAIT CLASS
HOST LOAD [nn:mm]
CPU BUSY [nn:mm]
USER nn
SYS nn
IOWAIT [nn:mm]
OS_CPU_WAIT [nn:mm]
ORACLE
AVG ACTIVE SESSIONS (BG & FG) [nn:mm] [nn:mm]
CPU [nn:mm] [nn:mm]
FG nn
BG nn
RES_MGR_CPU_WAIT nn
WAIT [nn:mm] [nn:mm] [nn:mm]
FG nn nn nn
BG nn dd* dd*
Scheduler nn
MISC: CPU per user call n.mmmm n.mmmm n.mmmm
Design notes
• AAS = Average Active [ Sessions | Processes | Threads| Cores ]
• instrumentation time / elapsed time
• All numbers on the sparse matrix are in AAS
• Comparable measures from different sources on same line
• Indentation and vertical position represent decomposition
• Some cells show core-normalized AAS
• [nn:mm] where nn=AAS, mm=AAS/cores
Version 2c: 634 lines of awk
AWR1page
file: awrKC.txt
platform: Linux x86 64-bit cores: 36
RAC: NO cpus: 72
release: 12.1.0.2.0 threads/core: 2
elapsed: 2.02 (min) sessions(end): 56
snaps: 1
========================================================================================================================
measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS
========================================================================================================================
HOST LOAD [7.80:0.22]
CPU BUSY [5.99:0.17]
USER 2.27
SYS 3.72
IOWAIT [3.00:0.08]
OS_CPU_WAIT N/A
........................................................................................................................
ORACLE
AVERAGE ACTIVE SESSIONS (BG+FG) [4.98:0.14] [4.58:0.13]
CPU [2.02:0.06] [0.50:0.01]
FG 2.00
BG 0.01
RSRC_MGR_CPU_WAIT N/A
WAIT [2.96:0.08] [4.08:0.11] [4.32:0.12]
FG 2.96 4.32
BG 0.00 *0.00
IOWAIT 4.32
FG 4.32
Scheduler 0.00
........................................................................................................................
MISC
CPU per call (ms) 3781.98 10.50 312.50
user calls/sec 1.58
core utilization
case studies
Using AWR1page to diagnose timing inconsistencies
case study 1
Benchmarking Oracle I/O (a.k.a. being a “SLOB”)
AWR1page
file: awrKC.txt
platform: Linux x86 64-bit cores: 36
RAC: NO cpus: 72
release: 12.1.0.2.0 threads/core: 2
elapsed: 2.02 (min) sessions(end): 56
snaps: 1
========================================================================================================================
measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS
========================================================================================================================
HOST LOAD [7.80:0.22]
CPU BUSY [5.99:0.17]
USER 2.27
SYS 3.72
IOWAIT [3.00:0.08]
OS_CPU_WAIT N/A
........................................................................................................................
ORACLE
AVERAGE ACTIVE SESSIONS (BG+FG) [4.98:0.14] [4.58:0.13]
CPU [2.02:0.06] [0.50:0.01]
FG 2.00
BG 0.01
RSRC_MGR_CPU_WAIT N/A
WAIT [2.96:0.08] [4.08:0.11] [4.32:0.12]
FG 2.96 4.32
BG 0.00 *0.00
IOWAIT 4.32
FG 4.32
Scheduler 0.00
........................................................................................................................
MISC
CPU per call (ms) 3781.98 10.50 312.50
user calls/sec 1.58
AWR1page
file: awrKC.txt
platform: Linux x86 64-bit cores: 36
RAC: NO cpus: 72
release: 12.1.0.2.0 threads/core: 2
elapsed: 2.02 (min) sessions(end): 56
snaps: 1
========================================================================================================================
measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS
========================================================================================================================
HOST LOAD [7.80:0.22]
CPU BUSY [5.99:0.17]
USER 2.27
SYS 3.72
IOWAIT [3.00:0.08]
OS_CPU_WAIT N/A
........................................................................................................................
ORACLE
AVERAGE ACTIVE SESSIONS (BG+FG) [4.98:0.14] [4.58:0.13]
CPU [2.02:0.06] [0.50:0.01]
FG 2.00
BG 0.01
RSRC_MGR_CPU_WAIT N/A
WAIT [2.96:0.08] [4.08:0.11] [4.32:0.12]
FG 2.96 4.32
BG 0.00 *0.00
IOWAIT 4.32
FG 4.32
Scheduler 0.00
........................................................................................................................
MISC
CPU per call (ms) 3781.98 10.50 312.50
user calls/sec 1.58
Decent-sized Linux system running Oracle 12
DB Time < DB CPU + Wait => CPU under (IO) wait
nontrivial IO wait
CPU ok
bedrock
IO wait = 1 aas CPU + 3 aas wait
case study 2
AskTom question about confusing AWR report
AWR1page
file: QS02FNT_AWR_AskTom.txt
platform: AIX-Based Systems (64-bit) cores: 2
RAC: NO cpus: 8
release: 12.1.0.2.0 threads/core: 4
elapsed: 44.22 (min) sessions(end): 91
snaps: 3
========================================================================================================================
measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS
========================================================================================================================
HOST LOAD [4.12:2.06]
CPU BUSY [1.13:0.57]
USER 0.66
SYS 0.47
IOWAIT [0.07:0.03]
OS_CPU_WAIT [4.06:2.03]
........................................................................................................................
ORACLE
AVERAGE ACTIVE SESSIONS (BG+FG) [0.62:0.31] [0.72:0.36]
CPU [0.13:0.07] [0.66:0.33]
FG 0.13
BG 0.01
RSRC_MGR_CPU_WAIT 0.00
WAIT [0.48:0.24] [0.06:0.03] [0.05:0.03]
FG 0.42 0.01
BG 0.07 *0.05
IOWAIT 0.03
FG 0.00
Scheduler 0.00
........................................................................................................................
MISC
CPU per call (ms) 115.47 0.01 60.02
user calls/sec 9.80
AWR1page
file: QS02FNT_AWR_AskTom.txt
platform: AIX-Based Systems (64-bit) cores: 2
RAC: NO cpus: 8
release: 12.1.0.2.0 threads/core: 4
elapsed: 44.22 (min) sessions(end): 91
snaps: 3
========================================================================================================================
measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS
========================================================================================================================
HOST LOAD [4.12:2.06]
CPU BUSY [1.13:0.57]
USER 0.66
SYS 0.47
IOWAIT [0.07:0.03]
OS_CPU_WAIT [4.06:2.03]
........................................................................................................................
ORACLE
AVERAGE ACTIVE SESSIONS (BG+FG) [0.62:0.31] [0.72:0.36]
CPU [0.13:0.07] [0.66:0.33]
FG 0.13
BG 0.01
RSRC_MGR_CPU_WAIT 0.00
WAIT [0.48:0.24] [0.06:0.03] [0.05:0.03]
FG 0.42 0.01
BG 0.07 *0.05
IOWAIT 0.03
FG 0.00
Scheduler 0.00
........................................................................................................................
MISC
CPU per call (ms) 115.47 0.01 60.02
user calls/sec 9.80
AIX = CPU red fag
CPU bound? maybe
small system

SMT = 4
TM ~ ASH
ASH ~ Wait
DB Time > DB CPU + Wait => CPU under-report or run-queue
0.56
0.06
??
Future directions
• IT WORKS! Significant reduction of cognitive load to
consistency check AWR report
• still very difficult, but at least possible
• Re-write into Python, awk too fragile
• Accept html version of AWR report
• AWS Lambda service: AWR IN -> 1page OUT
• SQL version: check AWR directly

(should be in DB regression tests)
• Open github repository, use and contribute!
Thank You
Github:
https://github.com/jberesni/
AWR1page
LinkedIn:

https://www.linkedin.com/in/
john-beresniewicz-986b0
Gmail:

john.beresniewicz@gmail.com

More Related Content

What's hot

Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersKyle Hailey
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
Enkitec
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014
John Beresniewicz
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWR
pasalapudi
 
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
John Beresniewicz
 
Oracle performance tuning_sfsf
Oracle performance tuning_sfsfOracle performance tuning_sfsf
Oracle performance tuning_sfsfMao Geng
 
Ash and awr deep dive hotsos
Ash and awr deep dive hotsosAsh and awr deep dive hotsos
Ash and awr deep dive hotsos
Kellyn Pot'Vin-Gorman
 
How to find what is making your Oracle database slow
How to find what is making your Oracle database slowHow to find what is making your Oracle database slow
How to find what is making your Oracle database slow
SolarWinds
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholds
John Beresniewicz
 
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
John Kanagaraj
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And Whatudaymoogala
 
AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015
Yury Velikanov
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
Abishek V S
 
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR usesEarl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
oramanc
 
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
 
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationWhitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationKristofferson A
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
Chien Chung Shen
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
AiougVizagChapter
 

What's hot (20)

Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmasters
 
Intro to ASH
Intro to ASHIntro to ASH
Intro to ASH
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWR
 
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 performance tuning_sfsf
Oracle performance tuning_sfsfOracle performance tuning_sfsf
Oracle performance tuning_sfsf
 
Ash and awr deep dive hotsos
Ash and awr deep dive hotsosAsh and awr deep dive hotsos
Ash and awr deep dive hotsos
 
How to find what is making your Oracle database slow
How to find what is making your Oracle database slowHow to find what is making your Oracle database slow
How to find what is making your Oracle database slow
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholds
 
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
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
 
AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015
 
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
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR usesEarl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
 
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, ...
 
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationWhitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 

Similar to Awr1page OTW2018

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
tricantino1973
 
ASH and AWR on DB12c
ASH and AWR on DB12cASH and AWR on DB12c
ASH and AWR on DB12c
Kellyn Pot'Vin-Gorman
 
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
Ajith Narayanan
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
Cuneyt Goksu
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
Carlos Sierra
 
Oracle Database : Addressing a performance issue the drilldown approach
Oracle Database : Addressing a performance issue the drilldown approachOracle Database : Addressing a performance issue the drilldown approach
Oracle Database : Addressing a performance issue the drilldown approach
Laurent Leturgez
 
200603ash.pdf Performance Tuning Oracle DB
200603ash.pdf Performance Tuning Oracle DB200603ash.pdf Performance Tuning Oracle DB
200603ash.pdf Performance Tuning Oracle DB
cookie1969
 
Ash and awr performance data2
Ash and awr performance data2Ash and awr performance data2
Ash and awr performance data2
Kellyn Pot'Vin-Gorman
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Rongze Zhu
 
Right-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual MachineRight-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual Machine
heraflux
 
ASH and AWR Performance Data by Kellyn Pot'Vin
ASH and AWR Performance Data by Kellyn Pot'VinASH and AWR Performance Data by Kellyn Pot'Vin
ASH and AWR Performance Data by Kellyn Pot'VinEnkitec
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
Brendan Gregg
 
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
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tango
Mauro Pagano
 
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
 
Performance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloudPerformance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloud
Brendan Gregg
 
KoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just beganKoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just beganTobias Koprowski
 
LISA2010 visualizations
LISA2010 visualizationsLISA2010 visualizations
LISA2010 visualizations
Brendan Gregg
 
Oracle 10g Performance: chapter 00 statspack
Oracle 10g Performance: chapter 00 statspackOracle 10g Performance: chapter 00 statspack
Oracle 10g Performance: chapter 00 statspackKyle Hailey
 

Similar to Awr1page OTW2018 (20)

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
 
ASH and AWR on DB12c
ASH and AWR on DB12cASH and AWR on DB12c
ASH and AWR on DB12c
 
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
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning 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
 
200603ash.pdf Performance Tuning Oracle DB
200603ash.pdf Performance Tuning Oracle DB200603ash.pdf Performance Tuning Oracle DB
200603ash.pdf Performance Tuning Oracle DB
 
Ash and awr performance data2
Ash and awr performance data2Ash and awr performance data2
Ash and awr performance data2
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
 
Right-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual MachineRight-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual Machine
 
ASH and AWR Performance Data by Kellyn Pot'Vin
ASH and AWR Performance Data by Kellyn Pot'VinASH and AWR Performance Data by Kellyn Pot'Vin
ASH and AWR Performance Data by Kellyn Pot'Vin
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
 
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
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tango
 
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
 
Performance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloudPerformance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloud
 
KoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just beganKoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just began
 
LISA2010 visualizations
LISA2010 visualizationsLISA2010 visualizations
LISA2010 visualizations
 
Oracle 10g Performance: chapter 00 statspack
Oracle 10g Performance: chapter 00 statspackOracle 10g Performance: chapter 00 statspack
Oracle 10g Performance: chapter 00 statspack
 

Recently uploaded

一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
James Polillo
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
theahmadsaood
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
correoyaya
 

Recently uploaded (20)

一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 

Awr1page OTW2018

  • 1. AWR1page Sanity checking time instrumentation in AWR reports
 John Beresniewicz
 OakTableWorld 2018

  • 2. Acknowledgements • Kevin Closson / Connor McDonald
 (for the motivating case studies) • Graham Wood, Uri Shaft
 (mentorship, advice and insight) • Lothar Flatz / Wolfgang Breitling / Alberto Dell’Era / Toon Koppelaars
 (for test sample AWR reports)
  • 3. Outline of talk • Motivation: confusing AWR reports • Model and instrumentation for time in Oracle • When model and measures don’t match • Concept and design of AWR1page • Using AWR1page: case studies 1 & 2 • Final thoughts, future directions
  • 4. Motivation: confounding AWR reports • OakTable inquiries about AWR reports where “numbers don’t add up” • First case: double-counted DB time (CPU under wait) • AWR Ambiguity OakTable World 2015 • Second case: AIX CPU reporting issues • AWR1page OakTable World 2016 • Solving such AWR report puzzles is mentally excruciating
  • 5. AWR Ambiguity take-away slide 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
  • 6. Model: Oracle Time = CPU + Wait • Time spent executing Oracle code by either background or foreground processes • Active processes are usually most interesting
 Active = (in DB call) && (on CPU or “active” wait) • Multiple measure sources for each time component Oracle Time CPU Time Wait Time
  • 7. Oracle time instrumentation • Wait/Event Model: V$SYSTEM_EVENT
 FG/BG active/idle wait time • Time Model: V$SYS_TIME_MODEL
 FG/BG CPU and Elapsed • OS Timing: V$OSSTAT
 CPU sys/usr/IO/wait/load avg • ASH: V$ACTIVE_SESSION_HISTORY
 FG/BG CPU and wait (estimated) NOTE: Stop using V$SYSSTAT “CPU used by this session”
  • 8. Time instrumentation essentials • Run-queue time distorts everything! • TM elapsed = (call end - call start) - idle wait time • ASH ON CPU = active session not in wait (derived) • TM CPU measured = actual instruction time used • OSSTAT reliability platform-dependent • Smaller call latencies increase distortion
  • 9. Normalization: Avg Active Sessions • Essential Oracle performance metric • AAS = instrumentation time / elapsed time • AAS / Core = core-normalized AAS RMOUG 2007
  • 10. Consistency checking AWR reports • AWR reports are massive
 (most of it irrelevant for any specific situation) • Time data scattered about, difficult to compare • Units vary, breakdowns inconsistent, not normalized • Labor intensive and error-prone Cognitive load of consistency checking is huge
  • 11. Sources of inconsistency • CPU saturation: run queue time
 First and most important item to check
 ASH CPU >> Time Model CPU • CPU under wait event
 Time Model Wait << Event Wait ~ ASH Wait • misleading hyperthreading OS CPU accounting
 IBM AIX issue: ASH CPU >> Time Model CPU • double-counted DB time
 10.1 bug with job queue process accounting
  • 12. Sources of inconsistency (2) • un-instrumented wait event
 ASH CPU >> Time Model CPU (OS CPU) • active events classified idle
 Time Model, Event Wait and ASH under-reported • dropped ASH samples*
 ASH << Time Model • cpu-active idle events*
 FG Time << FG CPU Time
  • 13. Check CPU first! • OSSTAT: Average Active Sessions Busy / Core • OSSTAT: Load Average / Core • OSSTAT: OS_CPU_WAIT (process level AAS) • Time Model: CPU AAS / Core • CPU Threads / Core = hyper-threading factor
  • 14. Some consistency checks ? CPU saturation: Core utilization >> 1 ? TM AAS ~ ASH AAS ? TM CPU ~ ASH CPU ~ OS CPU ? TM AAS ~ (TM CPU + WT Wait) ? TM Wait ~ ASH Wait ~ WT Wait KEY: WT = Event/Wait Model TM = Time Model OS = OSSTAT ASH = ASH
  • 15. Oracle Time << CPU + Wait • CPU under wait, time is being double-counted
 
 TM Total < (TM CPU + WT Wait) && 
 ASH Wait ~ WT Wait Oracle Time CPU Time Wait Time Oracle Time CPU Time Wait TimeCPU under wait
  • 16. Oracle Time >> CPU + Wait • Wait under-counted, un-instrumented wait?
 
 ASH CPU > TM CPU && TM CPU ~ OS CPU && 
 TM Wait > WT Wait • CPU under-counted, AIX or course timers?
 
 ASH CPU > TM CPU && 
 ASH Wait ~ WT Wait && TM Wait > WT Wait Oracle Time CPU Time Wait Time
  • 17. The AIX CPU issue • AIX with SMT turned on reports CPU strangely • Semantics of CPU accounting altered • According to Graham: “it’s just broken” • OakTable blog references:
 Marcin Przepiorowski
 Jeremy Schneider • Graham: Increase reported CPU values by 50% for SMT=4 for more realistic picture
  • 18. Objectives for AWR1page • Reduce cognitive load of checking time consistency in AWR reports: Total / CPU / Wait • Facilitate comparative assessment of system sizes and busy-ness • In 1 page, using only AWR text report as input
  • 19. AWR report time measure sources • $0 ~”^Operating System Statistics” { • $0 ~ "^Time Model Statistics" { • $0 ~ "^Foreground Wait Class" { • $0 ~ "^Wait Classes by Total Wait Time" { • $0 ~ "^Activity Over Time" { • Also other important report singletons like elapsed time of AWR period, platform, core count, cpu count
  • 20. Idea: measure x source matrix INFO OSSTAT TIME MODEL ASH HOST CPU SYS USR ORCL TOTAL CPU WAIT MISC Compare rows for equality measures data sources Columns add up heirarchically
  • 21. Values from AWR report INFO * cores cpus threads/core memory OSSTAT X X X* X TIME MODEL ASH ORCL . total . FG BG . . . .
 X X X . X X X* CPU load . . busy i/o wait scheduler ORCL . FG BG X X X X . . . . . . . X X X . . . . X X X* WAIT MISC
  • 22. Design mockup AWR1page cores: nn cpus: nn threads: nn elapsed:nnnn.m measure OSSTAT TIME MODEL ASH WAIT CLASS HOST LOAD [nn:mm] CPU BUSY [nn:mm] USER nn SYS nn IOWAIT [nn:mm] OS_CPU_WAIT [nn:mm] ORACLE AVG ACTIVE SESSIONS (BG & FG) [nn:mm] [nn:mm] CPU [nn:mm] [nn:mm] FG nn BG nn RES_MGR_CPU_WAIT nn WAIT [nn:mm] [nn:mm] [nn:mm] FG nn nn nn BG nn dd* dd* Scheduler nn MISC: CPU per user call n.mmmm n.mmmm n.mmmm
  • 23. Design notes • AAS = Average Active [ Sessions | Processes | Threads| Cores ] • instrumentation time / elapsed time • All numbers on the sparse matrix are in AAS • Comparable measures from different sources on same line • Indentation and vertical position represent decomposition • Some cells show core-normalized AAS • [nn:mm] where nn=AAS, mm=AAS/cores
  • 24. Version 2c: 634 lines of awk AWR1page file: awrKC.txt platform: Linux x86 64-bit cores: 36 RAC: NO cpus: 72 release: 12.1.0.2.0 threads/core: 2 elapsed: 2.02 (min) sessions(end): 56 snaps: 1 ======================================================================================================================== measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS ======================================================================================================================== HOST LOAD [7.80:0.22] CPU BUSY [5.99:0.17] USER 2.27 SYS 3.72 IOWAIT [3.00:0.08] OS_CPU_WAIT N/A ........................................................................................................................ ORACLE AVERAGE ACTIVE SESSIONS (BG+FG) [4.98:0.14] [4.58:0.13] CPU [2.02:0.06] [0.50:0.01] FG 2.00 BG 0.01 RSRC_MGR_CPU_WAIT N/A WAIT [2.96:0.08] [4.08:0.11] [4.32:0.12] FG 2.96 4.32 BG 0.00 *0.00 IOWAIT 4.32 FG 4.32 Scheduler 0.00 ........................................................................................................................ MISC CPU per call (ms) 3781.98 10.50 312.50 user calls/sec 1.58 core utilization
  • 25. case studies Using AWR1page to diagnose timing inconsistencies
  • 26. case study 1 Benchmarking Oracle I/O (a.k.a. being a “SLOB”)
  • 27. AWR1page file: awrKC.txt platform: Linux x86 64-bit cores: 36 RAC: NO cpus: 72 release: 12.1.0.2.0 threads/core: 2 elapsed: 2.02 (min) sessions(end): 56 snaps: 1 ======================================================================================================================== measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS ======================================================================================================================== HOST LOAD [7.80:0.22] CPU BUSY [5.99:0.17] USER 2.27 SYS 3.72 IOWAIT [3.00:0.08] OS_CPU_WAIT N/A ........................................................................................................................ ORACLE AVERAGE ACTIVE SESSIONS (BG+FG) [4.98:0.14] [4.58:0.13] CPU [2.02:0.06] [0.50:0.01] FG 2.00 BG 0.01 RSRC_MGR_CPU_WAIT N/A WAIT [2.96:0.08] [4.08:0.11] [4.32:0.12] FG 2.96 4.32 BG 0.00 *0.00 IOWAIT 4.32 FG 4.32 Scheduler 0.00 ........................................................................................................................ MISC CPU per call (ms) 3781.98 10.50 312.50 user calls/sec 1.58
  • 28. AWR1page file: awrKC.txt platform: Linux x86 64-bit cores: 36 RAC: NO cpus: 72 release: 12.1.0.2.0 threads/core: 2 elapsed: 2.02 (min) sessions(end): 56 snaps: 1 ======================================================================================================================== measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS ======================================================================================================================== HOST LOAD [7.80:0.22] CPU BUSY [5.99:0.17] USER 2.27 SYS 3.72 IOWAIT [3.00:0.08] OS_CPU_WAIT N/A ........................................................................................................................ ORACLE AVERAGE ACTIVE SESSIONS (BG+FG) [4.98:0.14] [4.58:0.13] CPU [2.02:0.06] [0.50:0.01] FG 2.00 BG 0.01 RSRC_MGR_CPU_WAIT N/A WAIT [2.96:0.08] [4.08:0.11] [4.32:0.12] FG 2.96 4.32 BG 0.00 *0.00 IOWAIT 4.32 FG 4.32 Scheduler 0.00 ........................................................................................................................ MISC CPU per call (ms) 3781.98 10.50 312.50 user calls/sec 1.58 Decent-sized Linux system running Oracle 12 DB Time < DB CPU + Wait => CPU under (IO) wait nontrivial IO wait CPU ok bedrock IO wait = 1 aas CPU + 3 aas wait
  • 29. case study 2 AskTom question about confusing AWR report
  • 30. AWR1page file: QS02FNT_AWR_AskTom.txt platform: AIX-Based Systems (64-bit) cores: 2 RAC: NO cpus: 8 release: 12.1.0.2.0 threads/core: 4 elapsed: 44.22 (min) sessions(end): 91 snaps: 3 ======================================================================================================================== measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS ======================================================================================================================== HOST LOAD [4.12:2.06] CPU BUSY [1.13:0.57] USER 0.66 SYS 0.47 IOWAIT [0.07:0.03] OS_CPU_WAIT [4.06:2.03] ........................................................................................................................ ORACLE AVERAGE ACTIVE SESSIONS (BG+FG) [0.62:0.31] [0.72:0.36] CPU [0.13:0.07] [0.66:0.33] FG 0.13 BG 0.01 RSRC_MGR_CPU_WAIT 0.00 WAIT [0.48:0.24] [0.06:0.03] [0.05:0.03] FG 0.42 0.01 BG 0.07 *0.05 IOWAIT 0.03 FG 0.00 Scheduler 0.00 ........................................................................................................................ MISC CPU per call (ms) 115.47 0.01 60.02 user calls/sec 9.80
  • 31. AWR1page file: QS02FNT_AWR_AskTom.txt platform: AIX-Based Systems (64-bit) cores: 2 RAC: NO cpus: 8 release: 12.1.0.2.0 threads/core: 4 elapsed: 44.22 (min) sessions(end): 91 snaps: 3 ======================================================================================================================== measure | OSSSTAT | TIME MODEL | ASH | WAIT CLASS ======================================================================================================================== HOST LOAD [4.12:2.06] CPU BUSY [1.13:0.57] USER 0.66 SYS 0.47 IOWAIT [0.07:0.03] OS_CPU_WAIT [4.06:2.03] ........................................................................................................................ ORACLE AVERAGE ACTIVE SESSIONS (BG+FG) [0.62:0.31] [0.72:0.36] CPU [0.13:0.07] [0.66:0.33] FG 0.13 BG 0.01 RSRC_MGR_CPU_WAIT 0.00 WAIT [0.48:0.24] [0.06:0.03] [0.05:0.03] FG 0.42 0.01 BG 0.07 *0.05 IOWAIT 0.03 FG 0.00 Scheduler 0.00 ........................................................................................................................ MISC CPU per call (ms) 115.47 0.01 60.02 user calls/sec 9.80 AIX = CPU red fag CPU bound? maybe small system
 SMT = 4 TM ~ ASH ASH ~ Wait DB Time > DB CPU + Wait => CPU under-report or run-queue 0.56 0.06 ??
  • 32. Future directions • IT WORKS! Significant reduction of cognitive load to consistency check AWR report • still very difficult, but at least possible • Re-write into Python, awk too fragile • Accept html version of AWR report • AWS Lambda service: AWR IN -> 1page OUT • SQL version: check AWR directly
 (should be in DB regression tests) • Open github repository, use and contribute!