Oracle Performance Tools of the Trade

  • View
    3.811

  • Download
    0

  • Category

    Software

Preview:

DESCRIPTION

Part of the Oracle Performance 101 Workshop

Citation preview

Oracle PerformanceTools of the Trade

Carlos Sierra

• Oracle Performance and SQL Tuning

• Consultant/Developer/DBA

• eDB360 and eAdam

• SQLT and SQLHC

• Exadata

Carlos Sierra

Enkitec (c) 2014 2

Tools of the Trade

• OEM

• AWR

• ADDM

• ASH

• EDB360

Enkitec © 2014 3

OEM

• Oracle Enterprise Manager (OEM)

– Database Control

– Grid Control

• GUI Tool for System Monitoring

– Including Performance

Enkitec © 2014 4

Enkitec © 2014 5

Enkitec © 2014 6

Enkitec © 2014 7

Enkitec © 2014 8

Enkitec © 2014 9

Enkitec © 2014 10

Enkitec © 2014 11

Enkitec © 2014 12

Enkitec © 2014 13

Enkitec © 2014 14

Enkitec © 2014 15

Enkitec © 2014 16

What is wrong?

Enkitec © 2014 17

AWR

• Automatic Workload Repository (AWR)

• Requires Oracle Diagnostics Pack License

• Set of DBA_HIST views

• Periodic Snapshots (1hr apart by default)

• 7 days history (by default)

Enkitec © 2014 18

AWR Demo (1)

• Go to: carlos-sierra.net

• Right-hand side

• Downloads

– ECO Demos

Enkitec © 2014 19

AWR Demo (2)

• Average Active Sessions (AAS)?

• DB CPU Utilization?

• Do you see any bottlenecks?

• What would be your action plan?

Enkitec © 2014 20

Enkitec © 2014 21

Enkitec © 2014 22

Enkitec © 2014 23

Enkitec © 2014 24

Enkitec © 2014 25

Enkitec © 2014 26

Enkitec © 2014 27

Enkitec © 2014 28

Enkitec © 2014 29

Enkitec © 2014 30

Enkitec © 2014 31

Enkitec © 2014 32

Enkitec © 2014 33

Enkitec © 2014 34

AWR Demo Conclusions (1)

• High Parsing

– Use of Literals instead of Bind Variables

• Some suboptimal SQL wasting CPU cycles

• High Background Waits related to DBWR

• Write Back Flash Cache disabled

– Hard to detect!

Enkitec © 2014 35

AWR Demo Conclusions (2)

• 6 copies of Control Files

– 2 members in 2 high redundancy disk groups

• Thousands of Tablespaces (thus Data Files)

• Frequent Log switches due to small size

– Think Checkpoints updating SCN on Data Files and Control Files

Enkitec © 2014 36

AWR Demo Conclusions (3)

• There is usually more than 1 culprit– Even when performance is fine

• Database health-check is like any other– Early detection is preferred

• Motto: “if it ain't broke, don't fix it”– Really?

– Would you apply this motto to your own health?

Enkitec © 2014 37

Alert Log

• As old as Oracle

• Like reading your Daily News

• Watch for ORA errors

– And fix them!

• Rename every so often

Enkitec © 2014 38

ADDM (1)

• Automatic Database Diagnostic Monitor

• Requires Oracle Diagnostics Pack License

• Its goal is to reduce DB Time

– Wait and CPU time of all non-idle user sessions

• Based on AWR data

– Hourly execution by default

Enkitec © 2014 39

ADDM (2)

• Database, Instance or Partial modes

• Available via OEM or SQL*Plus

– DBA_ADVISOR_* and DBA_ADDM_*

• Question Everything, including “Advice”

Enkitec © 2014 40

Enkitec © 2014 41

ADDM Sample

Enkitec © 2014 42

ASH (1)

• Active Session History (ASH)

• Requires Oracle Diagnostics Pack License

• Active Session

– On CPU; or

– Non-idle Wait

Enkitec © 2014 43

ASH (2)

• Snapshot of V$SESSION every second

– V$ACTIVE_SESSION_HISTORY

– Every 10 seconds on AWR

• DBA_HIST_ACTIVE_SESS_HISTORY

• Source of truth

• Multi-dimension

Enkitec © 2014 44

Enkitec © 2014 45

ASH Sample

EDB360

Enkitec © 2014 46

• 360-degree view of an Oracle database

• Database health-check and sizing

• 2 Parameters: Pack License [T|D|N] and Days

– @edb360.sql T 31

• Installs nothing

• Free download and use

EDB360 Demo (1)

• Go to: carlos-sierra.net

• Right-hand side

• Downloads

– ECO Demos

Enkitec © 2014 47

Enkitec © 2014 48

EDB360 Demo (2)

EDB360 Demo (3)

• When was 11.2.0.3 BP21 applied?

• Is “_parallel_statement_queuing” modified?

• What is CPU peak demand for instance 1?

• How many invalid objects?

• How many SQL Plan Baselines?

• Are CBO System Statistics collected?

Enkitec © 2014 49

Enkitec © 2014 50

Enkitec © 2014 51

Enkitec © 2014 52

Conclusions

• OEM is “the” tool for Oracle Performance

• AWR, ADDM and ASH complement OEM

• EDB360 allows “offline” analysis

• Snapper is a good “session level” tool

• SQL Tuning requires the use of specialized tools

Enkitec © 2014 53

References

• Oracle Database Performance Tuning Guide 11g Release 2

• Snapper - Tanel Poder

– http://blog.tanelpoder.com/files/scripts/snapper4.sql

• http://www.enkitec.com/products/edb360

Enkitec © 2014 54

Contact Information

• carlos.sierra@enkitec.com

• carlos-sierra.net

• @csierra_usa

Enkitec © 2014 55

Recommended