ASH and DB Time

Document technical information

Format pdf
Size 2.6 MB
First found Nov 13, 2015

Document content analysis

Language
English
Type
not defined
Concepts
no text concepts found

Transcript

Business-Driven
IT Management
Oracle Enterprise Manager:
Empowering IT to Drive Business Value
Oracle Enterprise Manager 12.1:
Database Manageability
Trond Brenna
Senior Sales Consultant
Database Management Major Themes
Database Home
Page
Real-Time
ADDM
Database
Performance
Diagnostics
Compare Period
Advisor
ASH
Analytics
Database Homepage
Complete and customizable overview of the entire database
 Ability to personalize the view by rearranging the portlets
 View of Monitored sql
 View of performance by wait class and services
Database Home Page
Database
Home Page
Summary
Status
Compliance
Summary
Diagnostics
Performance
Activity Class
Jobs Running
Services
Host CPU
Resources
Memory
SQL Monitor
Active
Sessions
Incidents
Data Storage
Topic# 2 ASH Analytics
Database Time (DB Time)
Total time spent inside database calls
by active foreground sessions
Includes CPU time, IO time and nonidle wait time
Fundamental measure of Oracle
performance throughput
Database Time is total time spent by user processes either
actively working or actively waiting in a database call.
8|Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Active Sessions
Active
Average
Activity of a
Session
Average
Active
Sessions
• In a database call
• Contributing to DB Time
• Active Time ÷ Elapsed Time
• Total of average activity across all
sessions
• Total DB Time ÷ Elapsed Time
9|Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Average Active Sessions
How many fully active sessions required to generate
observed DB Time?
Fundamental database performance metric
• Proportional to load on the database
• Responds directly to performance problems
Time-normalized DB Time and thus comparable
• Across systems
• Across time periods
10| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Active Session History
Rolling buffer
Statistics
ASH
V$SESSION
Recent history
MMON
SGA
V$ACTIVE_SESSION_HISTORY
MMNL
AWR snapshots
ASH captures ACTIVE SESSION information every second
11|Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Active Session History (ASH)
All ‘Active’ sessions captured every second
• Foregrounds and backgrounds are sampled
• Active foregrounds contribute to DB Time
In-memory: V$ACTIVE_SESSION_HISTORY
• Sampling interval = 1 second
On-disk: DBA_HIST_ACTIVE_SESS_HISTORY
• Sampling interval = 10 seconds
ASH is a system-wide record of database activity
• A FACT table with multiple dimensions that help diagnose
performance issues
12|Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
ASH and DB Time
Active sessions contribute to DB Time
ASH samples active sessions
ASH Math = estimate DB Time by counting
ASH samples
COUNT of ASH Samples = Total DB Time in
seconds for that time interval
Group by over 70+ performance dimensions
13|Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Drilling into Logical Dimensions
SQL
SQL
Session
Attributes
Resource
Usage
Resources
Identifiers
Attributes
SQL ID
PL/SQL
Wait
Class
Instance
Cons.
Group
Plan
Hash
Top Level
PL/SQL
Wait
Event
Services
Module
Operation
Object
User
Session
Action
OpCode
Blocking
Session
Parallel
Process
Client
Program
Trans.
ID
PL/SQL
ASH
Session
Identifiers
PL/SQL
Session
Type
14| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Analytic Operations Performed on Data Cubes
Operation
Description
Rollup
Performs aggregation on a data cube mainly by
dimension reduction
Drilldown
Is the reverse of rollup. Navigates from less
detailed data to more detailed data on a
dimension hierarchy
Slice
Performs a selection on one dimension of the
data cube resulting in a sub cube
Dice
Defines a sub-cube by performing a selection of
two or more dimension
Pivot
Visualization operation that rotates the data axes
to provide alternate presentation
15| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Top Activity Page…Predecessor to ASH Analytics
Key Facts
• Entirely sourced from ASH
• Multi-dimensional
• Use case: problem
detection, isolation, triage
• Method: skew analysis
Dimensions visible
•
•
Time
Wait Class
•
16| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
SQL
•
Sessions
•
Services
•
Modules
Top Activity Page ...Where could we improve?
Flexibility
• Can’t switch dimensions on area chart
• Top left list is fixed to Top SQL; right table only has few
dimensions
• No offline analysis
Utilizing the full value
• Some key dimensions omitted
• Fixed width slider – 5 min real-time, 30 min historical
Visualization
• Visualization limited to time and one other dimension
• Drilldown always sends you to a new page
17| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
ASH Analytics
Flexible Time Picker
Flexible Activity Chart
Flexible Top Chart
18| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Flexible Top Chart
Case Study # 1:
Slow response time due to high I/O
Wait
Class
Add
Filter
Wait
Event
• Sliced the data on User I/O
• Drilling down to Top SQL using the Wait Event dimension
19| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Top SQL
Multidimensional Visual Analytics: Treemaps
• Space-efficient
visualization of hierarchical
(tree) structure
• Branches are rectangles,
sub-branches are nested
rectangles
• Scales well to hundreds or
even thousands of
elements
• ASH dimensions provide
many possible hierarchies
20| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
ASH Analytics:
Removing the time dimension
Wait
Class
Wait
Event
• Default Treemap View displays the Wait class  Wait Event hierarchy
for the selected time period
• Size of each rectangle corresponds to the number of samples collected
for each wait event
21| Copyright © 2011, Oracle and/or its affiliates. All rights reserved. |
Compare Period
Compare Period
1. Production System: Regression
•
This morning my performance was terrible,
yesterday it was excellent… Why? What
Changed?
2. DB Replay: I upgraded to 11g and my
DB performance regressed.. Why?
•
•
Compelling, intelligent reporting is a critical
component of RAT
Compare Capture to Replay or Replay to
Replay
Compare Period ADDM
SQL Commonality
AWR Snapshot
Period 1
Regressed SQL
I/O Bound
AWR Snapshot
Period 2
Compare
Period ADDM
Analysis Report
• Full ADDM analysis across two AWR snapshot periods
• Detects causes, measure effects, then correlates them
• Causes: workload changes, configuration changes
• Effects: regressed SQL, reach resource limits (CPU, I/O, memory, interconnect)
• Makes actionable recommendations along with quantified impact
Undersized SGA
Key Concepts
• Basis (normally good) period to compare against (think
Base Period
“Baseline”)
• For RAT, this is the capture period, or (preferably) the replay
before modifications when comparing two replays
Compare Period
Workload Compatibility
• The time period we “test” against the base period
• For production, the “bad” period we hope to explain
• Is it even running the same application? Does it make sense
to compare?
• An index to gauge the workloads’ similarity taking into account
SQL statements and their load
• Ideally 100% for capture/replay
Compare Period ADDM: Method
STEP 1:
• Identify what changed
• DB configurations, workload changes
STEP
Did2:
the Buffer cache get smaller?
• Quantify
differences
Whyperformance
is there 10%
new SQL?
• Uses DB Time as basis for measuring
performance
STEP 3:
How come Top SQL impact increased by 45%?
• Identify
rootI/O
cause
Read
are up by 55%, why?
• Correlate performance differences with
changes
Did a buffer cache reduction cause a
read I/O increase?
Compare Period – 3 Modes
One snapshot offset
System moving
window
Customized period
Compare Period: Report
Real-Time ADDM
Emergency Monitoring
Unresponsive Database Problem
•
How do I diagnose a slow or hung database?
–
If the database is unresponsive, I can’t even
connect!
–
Even if I can connect, I need a diagnosis quickly!
•
Should I just bounce the database?
–
All in-flight operations will be aborted, mid-tier
connections/states will be lost
–
All diagnostic information will be lost
–
“If I could only know which blocking session to kill!”
Real-Time ADDM
• Real-time analysis of hung or slow database systems
• Holistically identify global resource contentions and deadlocks
• Quantified performance impact
• Precise, actionable recommendations
• Provide cluster-wide analysis for RAC
Real-Time ADDM—Architecture
Top Issues Identified
by Real-Time ADDM
EM Agent
Diagnostic Connection
JDBC Connection
Database
ADDM
Analysis
Resource
Constraints
Hangs
Memory Issues
Resource Limits
Reached
Deadlocks
• Makes a lightweight connection without acquiring additional locks and
resources, bypassing the SQL layer through the agent
• Also attempts to initiate standard JDBC connection
• Data returned by either connection is analyzed by Real-Time ADDM
Questions
Survey: http://bit.ly/dbmanagement

Similar documents

×

Report this document