Essential Diagnostic Techniques for Oracle Database 11g Graham - - PowerPoint PPT Presentation

essential diagnostic techniques for oracle database 11g
SMART_READER_LITE
LIVE PREVIEW

Essential Diagnostic Techniques for Oracle Database 11g Graham - - PowerPoint PPT Presentation

<Insert Picture Here> Essential Diagnostic Techniques for Oracle Database 11g Graham Wood, Uri Shaft, John Beresniewicz Oracle USA Agenda Diagnostic Pack Is Essential <Insert Picture Here> For Database Performance Tuning 11g


slide-1
SLIDE 1
slide-2
SLIDE 2

<Insert Picture Here>

Essential Diagnostic Techniques for Oracle Database 11g

Graham Wood, Uri Shaft, John Beresniewicz Oracle USA

slide-3
SLIDE 3

<Insert Picture Here>

Agenda

  • 11g Diagnostic Pack: Highlights and Usage
  • However, we start with “Why It Works”
  • DB Time and Average Active Sessions
  • The DB Time Performance Method

Diagnostic Pack Is Essential For Database Performance Tuning

slide-4
SLIDE 4

<Insert Picture Here>

Oracle Performance Analysis: The DB Time Method

slide-5
SLIDE 5

Why Do We Care About Time? Performance Is Always About Time

  • Human time is critical to the enterprise
  • System time includes human and IT resource time to

accomplish business goals

  • System performance affects business goals
  • “Time is money.”
  • Performance improvement usually means doing

things faster

  • Method: find where system time is spent – reduce it!
slide-6
SLIDE 6

Single session with Database Black Box server

Browse Books Read Reviews For One Book Add to Cart Checkout

TIME = time spent in database

A Single Session

slide-7
SLIDE 7

Active Session = Session currently spending time in a database call Database Time (DB Time) = Total time session spent in all database calls Average Activity of the Session = The ratio of time being active to total wall clock time

Browse Books Read Reviews For One Book Add to Cart Checkout

TIME = time spent in database

Fundamental concepts

slide-8
SLIDE 8
slide-9
SLIDE 9

= time spent in database

Browse Books Read Reviews For One Book Add to Cart Checkout

TIME

  • Avg. Active Sessions =

Wall Clock (Elapsed) Time Database Time

The Basic Relationship

slide-10
SLIDE 10

= time spent in database

Multiple Sessions

TIME

User 1 User 2 User 3 User n

t At time t we have 2 active sessions DB Time = Sum of DB Time Over All Sessions

  • Avg. Active Sessions = Sum of Avg. Active Sessions

Over All Sessions

slide-11
SLIDE 11

= time spent in database

Breaking down DB Time (example)

TIME

User 1 User 2 User 3 User n

Sessions do different database things at different times

slide-12
SLIDE 12

Breaking down DB Time (example)

TIME

User 1 User 2 User 3 User n

CPU I/O Other Waits Lot’s of brown…maybe I should investigate

  • ther wait time?
slide-13
SLIDE 13

DB time

slide-14
SLIDE 14

DB Time Tuning

  • DB Time can be scoped at multiple levels:
  • Database / instance
  • Service / module / action
  • Session / user
  • SQL id / rowsource
  • Performance improvement for Oracle database

means doing the same work in less DB Time

slide-15
SLIDE 15

Performance Diagnosis Method

  • 1. Look for large contributions to DB Time.

(Start from large scope to specific scope, regardless of complaint)

  • 2. Find root cause for DB Time consumption

(At scope found in step 1)

  • 3. Fix problem

(apply one fix at a time)

  • 4. Observe reduction in DB Time (At same scope)
  • 5. Affected users are happy? (Rinse and repeat)
slide-16
SLIDE 16

What enables the DB Time method?

  • Server instrumentation to measure DB Time directly
  • Time Model
  • Wait Events
  • SQL Statistics
  • Segment Statistics
  • Metrics
  • Sampling instrumentation to sample all active sessions
  • Active Session History (ASH)
  • Storage warehouse of statistics for historical reference
  • Automatic Workload Repository (AWR)
  • Statspack (pre-10g)
slide-17
SLIDE 17

<Insert Picture Here>

Oracle Diagnostic Pack: 11g Highlights

slide-18
SLIDE 18

ADDM for RAC

  • Identifies the most “Globally

Significant” performance issues

  • Automatically runs every hour
  • Cluster-wide analysis of:
  • Global cache interconnect issues
  • Lock manager congestion issues
  • Global resource contention, e.g. IO

bandwidth, hot blocks

  • Globally high-load SQL
  • Skew in instance response times

Self-Diagnostic Engine

Database-Level ADDM Instance-Level ADDMs

Node 1 Node 2 Node 3

Database Level Analysis

slide-19
SLIDE 19

ADDM for RAC

slide-20
SLIDE 20

ADDM Finding History

  • Identify systemic vs. transient issues
  • Does the finding appear consistently over many ADDM runs?
  • Justify expensive or difficult recommendations
  • How much DB Time could be saved by implementing?
slide-21
SLIDE 21
slide-22
SLIDE 22

AWR Instrumentation improvements

  • Event waits separate foreground and background

time

  • Allows wait-event and DB Tuning methods to sync better
  • DB Time CPU measurement improvements
  • Average Active Sessions metric
  • Replaces DB Time per Second
slide-23
SLIDE 23

AWR Baselines

  • Capture and preserve representative workload

performance

  • Continuous set of AWR snapshots
  • Can schedule advance captures using templates
  • SYSTEM_MOVING_WINDOW baseline
  • Trailing N days of AWR activity
  • Usages
  • AWR Compare period reports
  • Manual or adaptive alert thresholds
slide-24
SLIDE 24

Baselines and Metric Thresholds

  • Set fixed or adaptive thresholds using a baseline as

context

  • Quick Configure Adaptive Thresholds
  • Simple bootstrap settings by workload pattern
  • Metric Analysis
  • Which metrics are correlated with known problem?
slide-25
SLIDE 25

Set metric alert thresholds using context of baseline data

slide-26
SLIDE 26
slide-27
SLIDE 27

11g ASH improvements

  • SQL row source information captured
  • Which SQL execution plan operations take most time?
  • SQL execution ID captured
  • Are successive identical samples the same or different

executions of the SQL?

  • Untimed session states captured (e.g. bind, close)
  • Use ASH to estimate times spent in difficult to time operations.
  • Remote instance id for cache transfers captured
  • Remote blocking session captured
  • Much improved diagnosis of RAC performance issues.
slide-28
SLIDE 28

<Insert Picture Here>

Oracle Diagnostic Pack: Usage

slide-29
SLIDE 29

<Insert Picture Here>

The easy way: Ask ADDM

slide-30
SLIDE 30
slide-31
SLIDE 31
slide-32
SLIDE 32

<Insert Picture Here>

The fun way: Click on the big stuff!

slide-33
SLIDE 33
slide-34
SLIDE 34
slide-35
SLIDE 35
slide-36
SLIDE 36
slide-37
SLIDE 37
slide-38
SLIDE 38

…and ADDM as well. 11g Automatic SQL Tuning working it

slide-39
SLIDE 39

Conclusion

  • DB Time method:
  • Simple, powerful concept for analyzing Oracle performance
  • Diagnostic Pack
  • Instrumentation (AWR, ASH)
  • Method (automated into ADDM)
  • Graphical Interface (manual method)
  • Reports (scoped tightly or widely)

Diagnostic Pack Is Essential For Database Performance Tuning

slide-40
SLIDE 40

The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any

  • contract. It is not a commitment to deliver any

material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

slide-41
SLIDE 41

Q U E S T I O N S Q U E S T I O N S A N S W E R S A N S W E R S

slide-42
SLIDE 42
slide-43
SLIDE 43