SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1SolarWinds
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsCarlos Sierra
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007John Beresniewicz
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by exampleMauro Pagano
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuningYogiji Creations
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuningGuy Harrison
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
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
 
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
 
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 + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance tuningAiougVizagChapter
 
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
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014John Beresniewicz
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder
 
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
 

Was ist angesagt? (20)

Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Ash and awr deep dive hotsos
Ash and awr deep dive hotsosAsh and awr deep dive hotsos
Ash and awr deep dive hotsos
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
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
 
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
 
AWR & ASH Analysis
AWR & ASH AnalysisAWR & ASH Analysis
AWR & ASH Analysis
 
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 + 12c performance tuning
Awr + 12c performance tuningAwr + 12c performance tuning
Awr + 12c performance 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
 
ASH and AWR on DB12c
ASH and AWR on DB12cASH and AWR on DB12c
ASH and AWR on DB12c
 
Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014Ash architecture and advanced usage rmoug2014
Ash architecture and advanced usage rmoug2014
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
 
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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

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

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

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Kürzlich hochgeladen (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

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 /