SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
Average Active Sessions
John Beresniewicz, Oracle America
What is this?
Agenda
•  DB Time
•  Average Active Sessions
•  Performance Monitoring
•  Comparing Load
•  Diving Deep with ASH
•  Relationship to Queuing Theory
Database Time (DB Time)
•  Time spent in the database by foreground sessions
•  Includes CPU time, IO wait time and active wait time
•  Excludes idle wait time
Database time is total time spent by user processes
either actively working or actively waiting in a
database call.
EM Performance Page
•  DB Time per Second
•  Broken down into CPU + Wait Classes
•  Averaged over 1 minute intervals
•  Sources: v$waitclassmetric_history; v$sysmetric_history
•  Question: What are the chart units and label?
Historical Note
on Naming
• We knew what we
were graphing, but
what was it?
• Team met multiple
times to discuss
• This is from when we
finally “got it”
What Are the Units?
•  Time / time = unit-less (?)
•  DB time accumulates in micro, milli, or centi-seconds
•  Time-normalized sysmetrics are per second of elapsed
•  Centi-seconds (foreground time) per second (elapsed)
•  Centi-users per second
•  User seconds per elapsed second (normalize time units)
•  Active session seconds per second
•  Active sessions
Average Active Sessions
•  NOTE: Time units must synchronize
AAS = DB time / elapsed time
(during some workload)
Average Active Sessions
•  A time-based measure of “user load” on the database
•  Where the “time” is really user time…important
•  The derivative (calculus) of DB Time over time
•  This is why Top Activity and Perf Page are literal pictures of
DB Time
•  The “velocity” of DB Time accumulation in the
database
Performance Monitoring
•  DB Time increases when user load increases
•  Average Active Sessions measures the rate of increase
•  DB Time increases when performance degrades
•  Average Active Sessions captures the rate of
increase of DB Time over time
•  Therefore, AAS is the best single metric to monitor for
overall performance
Performance monitoring
•  Average Active Sessions captures both load and
performance
•  Severe performance degradation will spike the metric
•  Server-generated metrics for monitoring:
•  Database Time Per Sec (10g)
•  Average Active Sessions (11g)
•  Adaptive Thresholds technology
•  Set thresholds to high percentile (99th) values (unusual spike)
•  Moving window baseline and seasonality adjust to expected
load changes
Bad Friday?
Comparing Database Load
•  How to compare load on two different databases?
•  How to compare load on same database from two
different time periods?
•  Answer: normalize DB Time by time
•  That is, use Average Active Sessions!
•  Remember, DB Time is “user time”
•  It is “fungible”
Enterprise Loadmap
Enterprise Loadmap
Enterprise Loadmap
Diving Deep with ASH
•  ASH is used to estimate DB Time accumulation over
some time interval, and thus also AAS
•  With ASH we can break down total AAS within a
Database across many dimensions of interest
•  Come to “ASH Deep-dive: Advanced Performance
Analysis Tips”
•  Wednesday 3:30 pm, Moscone South Room 104
EM Top Activity
ASH Analytics
Breakdown by SQL_ID
Historical Note: ASH Analytics Mockup
ASH Analytics Loadmap
Relationship to Queuing Theory
•  Consider the Oracle database as a black-box service
center
•  User calls come in (SQL) from outside
•  Results computed inside and returned to user
•  What is the relationship of Average Active Sessions to
black-box queuing models?
•  Average Active Sessions measures an important queuing
theoretic concept
Little’s Law for Queuing Systems
N = X * R
N = number of active requests in system
X = serviced request throughput
R = average service time per request
Little’s Law: Database Black-box server
N = X * R
N = ????
X = User Calls per Second
R = Response (DB time) per Call
Average Active Sessions
This explains why DB time increases with both
performance degradation and load increase.
Compute AAS from AWR snapshots
•  Step 1: Prepare raw data stream by joining:
•  DBA_HIST_SNAPSHOT
•  DBA_HIST_SYS_TIME_MODEL
•  Statistic “DB Time”
•  Step 2: Compute elapsed time and DB Time deltas
per snapshot
•  Step 3: Compute Average Active Sessions per
snapshot
•  DELTA(DB Time) / DELTA(Elapsed time)
Step 1: Prepare Raw Data Stream
WITH snapDBtime
as
(select
SN.snap_id as snap_id
,SN.instance_number as inst_num
,ROUND(SN.startup_time,'MI') as startup_time
,ROUND(SN.begin_interval_time,'MI') as begin_time
,ROUND(SN.end_interval_time,'MI') as end_time
,TM.value / 1000000 as DBtime_secs
from
dba_hist_snapshot SN
,dba_hist_sys_time_model TM
where
SN.dbid = TM.dbid
and SN.instance_number = TM.instance_number
and SN.snap_id = TM.snap_id
and TM.stat_name = 'DB time'
),
Step 2: Compute Time Deltas
DeltaDBtime as
(select
inst_num
,snap_id
,startup_time
,end_time
,DBtime_secs
,CASE WHEN begin_time = startup_time
THEN DBtime_secs
ELSE
DBtime_secs - LAG(DBtime_secs,1)
OVER (PARTITION BY inst_num, startup_time
ORDER BY snap_id ASC)
END
as DBtime_secs_delta
,(end_time - begin_time)*24*60*60 as elapsed_secs
from
snapDBtime
order by inst_num, snap_id ASC
)
Step 3: Compute Avg Active Sessions
select
inst_num
,snap_id
,ROUND(DBtime_secs,1)
as DBtime_secs
,ROUND(DBtime_secs_delta / elapsed_secs,3)
as AvgActive_sess
from
DeltaDBtime
/
Average Active Sessions - OaktableWorld 2013

Contenu connexe

Tendances

Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007John Beresniewicz
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWRpasalapudi
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Kyle Hailey
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsCarlos Sierra
 
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 fundamentalsJohn Beresniewicz
 
The Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - PresentationThe Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - PresentationMarkus Michalewicz
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceAnil Nair
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfSrirakshaSrinivasan2
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
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
 
Oracle Database in-Memory Overivew
Oracle Database in-Memory OverivewOracle Database in-Memory Overivew
Oracle Database in-Memory OverivewMaria Colgan
 
Memory Management in Apache Spark
Memory Management in Apache SparkMemory Management in Apache Spark
Memory Management in Apache SparkDatabricks
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginnersPini Dibask
 
Apache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationApache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationDatabricks
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMarkus Michalewicz
 

Tendances (20)

Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWR
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
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
 
The Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - PresentationThe Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - Presentation
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC Performance
 
Analyzing awr report
Analyzing awr reportAnalyzing awr report
Analyzing awr report
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
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
 
Oracle Database in-Memory Overivew
Oracle Database in-Memory OverivewOracle Database in-Memory Overivew
Oracle Database in-Memory Overivew
 
Memory Management in Apache Spark
Memory Management in Apache SparkMemory Management in Apache Spark
Memory Management in Apache Spark
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
 
Apache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationApache Spark Core – Practical Optimization
Apache Spark Core – Practical Optimization
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
 

En vedette

SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 Kyle Hailey
 
How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemCary Millsap
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersKyle Hailey
 
AWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add upAWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add upJohn Beresniewicz
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsJohn Beresniewicz
 
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseOaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseKyle Hailey
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linuxKyle Hailey
 
OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASKyle Hailey
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALEPostgreSQL Experts, Inc.
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsJignesh Shah
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoringKyle Hailey
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsJohn Beresniewicz
 

En vedette (13)

SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013
 
Intro to ASH
Intro to ASHIntro to ASH
Intro to ASH
 
How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problem
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmasters
 
AWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add upAWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add up
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reports
 
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseOaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AAS
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoring
 
Awr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reportsAwr1page - Sanity checking time instrumentation in AWR reports
Awr1page - Sanity checking time instrumentation in AWR reports
 

Similaire à Average Active Sessions - OaktableWorld 2013

Presentation maximizing database performance performance tuning with db time
Presentation    maximizing database performance performance tuning with db timePresentation    maximizing database performance performance tuning with db time
Presentation maximizing database performance performance tuning with db timexKinAnx
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportAlfredo Krieg
 
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
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuningAbishek V S
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1sqlserver.co.il
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure DataTaro L. Saito
 
Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Anubhav Kale
 
Datacenter workload analysis & qualification of stroage servers fms 2017
Datacenter workload analysis & qualification of stroage servers fms 2017Datacenter workload analysis & qualification of stroage servers fms 2017
Datacenter workload analysis & qualification of stroage servers fms 2017_fJ_
 
adap-stability-202310.pptx
adap-stability-202310.pptxadap-stability-202310.pptx
adap-stability-202310.pptxMichael Ming Lei
 
Doc 2011101412020074
Doc 2011101412020074Doc 2011101412020074
Doc 2011101412020074Rhythm Sun
 
What's new in JBoss ON 3.2
What's new in JBoss ON 3.2What's new in JBoss ON 3.2
What's new in JBoss ON 3.2Thomas Segismont
 
Building Scalable Aggregation Systems
Building Scalable Aggregation SystemsBuilding Scalable Aggregation Systems
Building Scalable Aggregation SystemsJared Winick
 
InfiniFlux vs_RDBMS
InfiniFlux vs_RDBMSInfiniFlux vs_RDBMS
InfiniFlux vs_RDBMSInfiniFlux
 
Database performance monitoring:Key to seamless application performance
Database performance monitoring:Key to seamless application performanceDatabase performance monitoring:Key to seamless application performance
Database performance monitoring:Key to seamless application performanceManageEngine, Zoho Corporation
 
Planning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMPlanning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMWASdev Community
 
Simplify Complex Query with CQRS
Simplify Complex Query with CQRSSimplify Complex Query with CQRS
Simplify Complex Query with CQRSJacky Lai
 

Similaire à Average Active Sessions - OaktableWorld 2013 (20)

Presentation maximizing database performance performance tuning with db time
Presentation    maximizing database performance performance tuning with db timePresentation    maximizing database performance performance tuning with db time
Presentation maximizing database performance performance tuning with db time
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR Report
 
Measures of query cost
Measures of query costMeasures of query cost
Measures of query cost
 
10135 b 11
10135 b 1110135 b 11
10135 b 11
 
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
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
 
Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark Solving Office 365 Big Challenges using Cassandra + Spark
Solving Office 365 Big Challenges using Cassandra + Spark
 
Datacenter workload analysis & qualification of stroage servers fms 2017
Datacenter workload analysis & qualification of stroage servers fms 2017Datacenter workload analysis & qualification of stroage servers fms 2017
Datacenter workload analysis & qualification of stroage servers fms 2017
 
adap-stability-202310.pptx
adap-stability-202310.pptxadap-stability-202310.pptx
adap-stability-202310.pptx
 
Doc 2011101412020074
Doc 2011101412020074Doc 2011101412020074
Doc 2011101412020074
 
Internals of Presto Service
Internals of Presto ServiceInternals of Presto Service
Internals of Presto Service
 
What's new in JBoss ON 3.2
What's new in JBoss ON 3.2What's new in JBoss ON 3.2
What's new in JBoss ON 3.2
 
Building Scalable Aggregation Systems
Building Scalable Aggregation SystemsBuilding Scalable Aggregation Systems
Building Scalable Aggregation Systems
 
InfiniFlux vs_RDBMS
InfiniFlux vs_RDBMSInfiniFlux vs_RDBMS
InfiniFlux vs_RDBMS
 
Chapter 11new
Chapter 11newChapter 11new
Chapter 11new
 
Database performance monitoring:Key to seamless application performance
Database performance monitoring:Key to seamless application performanceDatabase performance monitoring:Key to seamless application performance
Database performance monitoring:Key to seamless application performance
 
Planning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMPlanning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPM
 
Simplify Complex Query with CQRS
Simplify Complex Query with CQRSSimplify Complex Query with CQRS
Simplify Complex Query with CQRS
 

Plus de John Beresniewicz

ASHviz - Dats visualization research experiments using ASH data
ASHviz - Dats visualization research experiments using ASH dataASHviz - Dats visualization research experiments using ASH data
ASHviz - Dats visualization research experiments using ASH dataJohn Beresniewicz
 
JB Design CV: products / mockups / experiments
JB Design CV: products / mockups / experiments JB Design CV: products / mockups / experiments
JB Design CV: products / mockups / experiments John Beresniewicz
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsJohn Beresniewicz
 
Contract-oriented PLSQL Programming
Contract-oriented PLSQL ProgrammingContract-oriented PLSQL Programming
Contract-oriented PLSQL ProgrammingJohn Beresniewicz
 

Plus de John Beresniewicz (8)

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

Dernier

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Average Active Sessions - OaktableWorld 2013

  • 1. Average Active Sessions John Beresniewicz, Oracle America
  • 3. Agenda •  DB Time •  Average Active Sessions •  Performance Monitoring •  Comparing Load •  Diving Deep with ASH •  Relationship to Queuing Theory
  • 4. Database Time (DB Time) •  Time spent in the database by foreground sessions •  Includes CPU time, IO wait time and active wait time •  Excludes idle wait time Database time is total time spent by user processes either actively working or actively waiting in a database call.
  • 5. EM Performance Page •  DB Time per Second •  Broken down into CPU + Wait Classes •  Averaged over 1 minute intervals •  Sources: v$waitclassmetric_history; v$sysmetric_history •  Question: What are the chart units and label?
  • 6. Historical Note on Naming • We knew what we were graphing, but what was it? • Team met multiple times to discuss • This is from when we finally “got it”
  • 7. What Are the Units? •  Time / time = unit-less (?) •  DB time accumulates in micro, milli, or centi-seconds •  Time-normalized sysmetrics are per second of elapsed •  Centi-seconds (foreground time) per second (elapsed) •  Centi-users per second •  User seconds per elapsed second (normalize time units) •  Active session seconds per second •  Active sessions
  • 8. Average Active Sessions •  NOTE: Time units must synchronize AAS = DB time / elapsed time (during some workload)
  • 9. Average Active Sessions •  A time-based measure of “user load” on the database •  Where the “time” is really user time…important •  The derivative (calculus) of DB Time over time •  This is why Top Activity and Perf Page are literal pictures of DB Time •  The “velocity” of DB Time accumulation in the database
  • 10. Performance Monitoring •  DB Time increases when user load increases •  Average Active Sessions measures the rate of increase •  DB Time increases when performance degrades •  Average Active Sessions captures the rate of increase of DB Time over time •  Therefore, AAS is the best single metric to monitor for overall performance
  • 11. Performance monitoring •  Average Active Sessions captures both load and performance •  Severe performance degradation will spike the metric •  Server-generated metrics for monitoring: •  Database Time Per Sec (10g) •  Average Active Sessions (11g) •  Adaptive Thresholds technology •  Set thresholds to high percentile (99th) values (unusual spike) •  Moving window baseline and seasonality adjust to expected load changes
  • 13. Comparing Database Load •  How to compare load on two different databases? •  How to compare load on same database from two different time periods? •  Answer: normalize DB Time by time •  That is, use Average Active Sessions! •  Remember, DB Time is “user time” •  It is “fungible”
  • 17. Diving Deep with ASH •  ASH is used to estimate DB Time accumulation over some time interval, and thus also AAS •  With ASH we can break down total AAS within a Database across many dimensions of interest •  Come to “ASH Deep-dive: Advanced Performance Analysis Tips” •  Wednesday 3:30 pm, Moscone South Room 104
  • 21. Historical Note: ASH Analytics Mockup
  • 23. Relationship to Queuing Theory •  Consider the Oracle database as a black-box service center •  User calls come in (SQL) from outside •  Results computed inside and returned to user •  What is the relationship of Average Active Sessions to black-box queuing models? •  Average Active Sessions measures an important queuing theoretic concept
  • 24. Little’s Law for Queuing Systems N = X * R N = number of active requests in system X = serviced request throughput R = average service time per request
  • 25. Little’s Law: Database Black-box server N = X * R N = ???? X = User Calls per Second R = Response (DB time) per Call Average Active Sessions This explains why DB time increases with both performance degradation and load increase.
  • 26. Compute AAS from AWR snapshots •  Step 1: Prepare raw data stream by joining: •  DBA_HIST_SNAPSHOT •  DBA_HIST_SYS_TIME_MODEL •  Statistic “DB Time” •  Step 2: Compute elapsed time and DB Time deltas per snapshot •  Step 3: Compute Average Active Sessions per snapshot •  DELTA(DB Time) / DELTA(Elapsed time)
  • 27. Step 1: Prepare Raw Data Stream WITH snapDBtime as (select SN.snap_id as snap_id ,SN.instance_number as inst_num ,ROUND(SN.startup_time,'MI') as startup_time ,ROUND(SN.begin_interval_time,'MI') as begin_time ,ROUND(SN.end_interval_time,'MI') as end_time ,TM.value / 1000000 as DBtime_secs from dba_hist_snapshot SN ,dba_hist_sys_time_model TM where SN.dbid = TM.dbid and SN.instance_number = TM.instance_number and SN.snap_id = TM.snap_id and TM.stat_name = 'DB time' ),
  • 28. Step 2: Compute Time Deltas DeltaDBtime as (select inst_num ,snap_id ,startup_time ,end_time ,DBtime_secs ,CASE WHEN begin_time = startup_time THEN DBtime_secs ELSE DBtime_secs - LAG(DBtime_secs,1) OVER (PARTITION BY inst_num, startup_time ORDER BY snap_id ASC) END as DBtime_secs_delta ,(end_time - begin_time)*24*60*60 as elapsed_secs from snapDBtime order by inst_num, snap_id ASC )
  • 29. Step 3: Compute Avg Active Sessions select inst_num ,snap_id ,ROUND(DBtime_secs,1) as DBtime_secs ,ROUND(DBtime_secs_delta / elapsed_secs,3) as AvgActive_sess from DeltaDBtime /