DB-Time-based Oracle Performance Tuning: Theory and Practice

Slides:



Advertisements
Similar presentations
Advanced Oracle DB tuning Performance can be defined in very different ways (OLTP versus DSS) Specific goals and targets must be set => clear recognition.
Advertisements

Presentation Date Top Down Performance Management with OEM Grid Control Or how I learned to stop worrying and love OEM Grid Control 10/1/2010 John Darrah.
Unix Systems Performance Tuning Project of COSC 513 Name: Qinghui Mu Instructor: Prof. Anvari.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
Copyright © 2011 by the Commonwealth of Pennsylvania. All Rights Reserved. Load Test Report.
1.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Your customer as a segment of one That changes every second! Hein Van Der Merwe Chief.
1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Oracle Universal Content Management and Storage Systems
QAD’s Business Process Management Richard Day Senior Product Manager, QAD QAD Explore 2012.
Oracle Cloud Marketplace Neelesh Gurnani Director, Product Development Arif Khan Director, Product Management September 29, 2014 Copyright © 2014, Oracle.
Automatic Performance Diagnosis and Tuning in Oracle 10g Graham Wood Oracle Corporation.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
The Self-managing Database: Automatic Performance Diagnosis Graham Wood Kyle Hailey Oracle Corporation Session id:
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
Measuring Performance Chapter 12 CSE807. Performance Measurement To assist in guaranteeing Service Level Agreements For capacity planning For troubleshooting.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer What’s New in Version 4.1 Jeff Smith
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Advanced Metadata Modeling Modeling for the Oracle Business Intelligence Cloud.
Anton Topurov IT Department – DB Group Database Performance Tuning with EM12c.
Best Practices for Supporting Oracle Hyperion EPM and Business Intelligence Solutions Mitra Veluri Senior Principal Technical Support Engineer David Valociek.
Best Practices for Upgrading Oracle PeopleSoft Environments
Oracle 10g Database Administrator: Implementation and Administration
The Power of Business Process Management (BPM)
LEARN. NETWORK. DISCOVER. | #QADexplore Implementing Business Process Management: Steps to Success WCUG – November 18, 2014.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
© 2009 Oracle Corporation. S : Slash Storage Costs with Oracle Automatic Storage Management Ara Vagharshakian ASM Product Manager – Oracle Product.
QAD .Net UI: New Enhancements
Average Session Load (ASL) The Golden Metric ? Kyle Hailey
Enterprise Asset Management
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
12 Copyright © 2007, Oracle. All rights reserved. Database Maintenance.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8 Reporting from Contract.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
Oracle E-Business Suite Order Management: Presenting the HTML and Mobile User Experience Durgaprasad Bodapati Director, Product Management Bhavana Sharma.
RMB Billing UX Design Concepts / Proposals Peter Picone.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8 Contract Management.
Oracle9i Performance Tuning Chapter 1 Performance Tuning Overview.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
| Building the Effective Enterprise The Power of.Net Upgrade Jeffrey Steele – Solution Consultant, QAD.
SQL Tuning made much easier with SQLTXPLAIN (SQLT) Mauro Pagano Senior Principal Technical Support Engineer Oracle Confidential – Internal/Restricted/Highly.
Tivoli Software © 2009 IBM Corporation Maximo Mobile Suite David Havican Lead Product Designer & Architect.
Quick Tips for Database Performance Tuning Sergey Koltakov Kurt Engeleiter Product Manager.
1. S318417: OAUG SysAdmin SIG Angelo Rosado, Oracle Senior Product Manager Kenneth Baxter, Oracle Strategy Product Manager Biju Mohan, Oracle Principal.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
1. When things go wrong: how to find SQL error Sveta Smirnova Principle Technical Support Engineer, Oracle.
Integrated Monitoring Dashboard SEAP/BTIS/DB&I/Mar Integrated Monitoring Dashboard An Innovative Monitoring Approach Proposal by BTIS/DB&I.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Rajesh Bhat Director, PLM Analytics Applications
#.1 Average Active Sessions (AAS) The Golden Metric ? Kyle Hailey
Michael Mast Senior Architect Applications Technology Oracle Corporation.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1.
Troubleshooting Dennis Shasha and Philippe Bonnet, 2013.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 5 Lifehacks for the Apex Development environment Five frameworks you should use.
Closing the Query Processing Loop in Oracle 11g Allison Lee, Mohamed Zait.
Prepared by: Session ID: PeopleSoft Procurement Contracts Madeline Osit COO Beacon Application Services
SQL Database Management
OPERATING SYSTEMS CS 3502 Fall 2017
<Insert Picture Here>
SQL Server Monitoring Overview
Michael Mast Senior Architect
My Oracle Support (The next generation Metalink experience) lynn
Charles Phillips screen
Flight Recorder in OpenJDK
OpenWorld 2018 How to Combine Data from Source Sites
Charles Phillips screen
QAD Reporting Framework
Presentation transcript:

DB-Time-based Oracle Performance Tuning: Theory and Practice RMOUG Feb 2008 Graham Wood, Uri Shaft, John Beresniewicz Oracle Corporation

The following is intended to outline our general product direction The following 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.

Agenda Brief History of Oracle Performance Tuning Methods DB Time: What is it? DB Time: Data Sources DB Time Method

Oracle Tuning Methods Prehistory Dark Ages Renaissance Debug code Counters/Ratios BSTAT/ESTAT SQL*Trace Renaissance Increased instrumentation inc. Wait Events Move from counters to timers STATSPACK

Oracle Tuning Methods More Recent Methods – Time-based methods YAPP Instance tuning - instance statistics Non intrusive Always on Method R Session tuning – sql trace based Tightly scoped Must be highly selective Modern advances DB Time Tuning Instrumentation improvements ASH, AWR,ADDM

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!

The DB Time Method Uses combination of cumulative and sampled DB Time ‘Always on’ data only Combines best of current methods Low intrusion Detailed data No scope necessary for collections No requirement to reproduce problem Works for concurrency problems such as locking

The DB Time Method Supports multiple scopes for diagnosis Database Instance Session Client id Module/Action SQL ID More inclusive, less intrusive

Database time (DB Time) Time spent in database calls by foreground sessions Includes CPU time, IO time and wait time Excludes idle wait time The lingua franca for Oracle performance analysis Database time is total time spent by user processes either actively working or actively waiting in a database call.

A Single Session Single session with Database Black Box server TIME Browse Books Read Reviews For One Book Add to Cart Checkout TIME = time spent in database

Fundamental concepts 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 (% Activity) = The ratio of time active to total wall clock time Browse Books Read Reviews For One Book Add to Cart Checkout TIME = time spent in database

Active sessions Foreground sessions in a database call Backgrounds are also interesting Either on CPU, waiting for IO, or waiting (not idle) V$ACTIVE_SESSION_HISTORY is a collection of timed regular samples of active session attributes Active sessions are foreground sessions contributing to DB time in any given moment.

Multiple Sessions DB Time = Sum of DB Time Over All Sessions Avg. Active Sessions = Sum of Avg. Activity Over All Sessions t At time t we have 2 active sessions User 1 User 2 User 3 User n TIME = time spent in database

Wall Clock (Elapsed) Time The Basic Relationship Database Time Avg. Active Sessions = Wall Clock (Elapsed) Time Browse Books Read Reviews For One Book Add to Cart Checkout = time spent in database TIME

DB time

Breaking down DB Time (example) Sessions do different database things at different times User 1 User 2 User 3 User n TIME = time spent in database

Breaking down DB Time (example) Maybe I should investigate other wait time? CPU I/O Other Waits User 1 User 2 User 3 User n TIME

Database time (DB Time) Database time vs Wall clock time Database time vs Response time

DB time increases as system load increases. System load and DB time More users => More calls => DB time increases Larger transactions => Longer calls DB time increases as system load increases.

System performance and DB time IO performance degrades => IO time increases => DB time increases Application performance degrades => Wait time increases DB time increases as system performance degrades.

System performance and DB time

Where to find DB time? V$SYS_TIME_MODEL V$WAITCLASSMETRIC_HISTORY STAT_NAME = ‘DB time’ Accumulated value over entire instance V$WAITCLASSMETRIC_HISTORY AVERAGE_WAITER_COUNT It is precisely Average Active Sessions V$SYSMETRIC_HISTORY “Database Time Per Second”, “CPU Usage Per Sec” Units are Centi-seconds per second Value is 100 x Average Active Sessions

Where to find DB time? V$SQL V$ACTIVE_SESSION_HISTORY ELAPSED_TIME Also wait class times V$ACTIVE_SESSION_HISTORY Sample per second Count = time

Active Session History (ASH) Persisted samples of active session information Sessions contributing to DB time at time of sampling One-second sampling interval is a great default Allows simplified AAS computations DB time and Average active sessions can be computed by aggregating ASH samples

Estimating DB time with ASH ASH sample count is value of active sessions function at sample times Active sessions time t0 t1 DB Time DB time is area under curve t = 1 sec

Integral approximation using ASH

EM Top Activity page ASH-estimated DB time by wait class Aggregated over 15 second intervals

Sampled vs. cumulative DB time

Where is DB time used? ADDM AWR and AWR compare periods reports EM Performance page and drill downs ASH report Server-generated Alerts

Average active sessions Average active sessions is the rate of change of DB time over time. Time-normalized DB time Full-time equivalent sessions Not whole sessions How many full-time virtual sessions to do the work? Comparable Across systems Across time periods

What are the units? Time / time = unitless? DB time accumulates in micro- or centi-seconds Time-normalized metrics 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

EM Performance page Cumulative DB time by wait class v$waitclassmetric_history and v$sysmetric_history 1 minute intervals

% activity = DB time *100 / elapsed time Used for individual sessions Percent Activity % activity = DB time *100 / elapsed time Used for individual sessions

Percent Activity

DB Time Tuning DB Time can be aggregated at multiple levels: Database / instance Service / module / action Session / user / client id SQL id / rowsource Performance improvement for Oracle database means doing the same work in less DB Time

Performance Problem Resolution 101 Discover the problem: User phone call or other complaint Metric threshold alert or system monitoring Scope the problem: How widespread is it? How severe is it? In other words: Who or what is wasting DB Time and how much is being wasted? Diagnose the problem Scope the solution How much of the pain can be relieved?

The DB Time Method Scope Set Goal Investigate DB time distribution Identify the largest potential for improvement Modify system Evaluate against Goal

The DB Time Method Scope What is the problem? Business Requirements Resource capacity Resource contention System wide or individual Business Function

The DB Time Method Set Goal Quantitative Establishes the STOP TUNING criteria Should be business driven for applications (X per day)

The DB Time Method Investigate DB time distribution Identify major contributors to DB time at the selected scope System scope V$SYS_TIME_MODEL V$ACTIVE_SESSION_HISTORY V$SQL Identify high load service, sessions and SQL Identify resource constraints or contention

The DB Time Method Investigate DB time distribution Session scope V$SESS_TIME_MODEL V$ACTIVE_SESSION_HISTORY Identify if database is the problem Identify high load SQL Identify application efficiency issues Identify resource constraints or contention

The DB Time Method Identify the largest potential for improvement What can be changed that will produce the greatest reduction in ‘scoped’ DB time? Parameters System Application SQL Design Modify system

The DB Time Method Need to have examples here Instance level and SQL level maybe?

The DB Time Method Evaluate against Goal Did our changes to the system achieve our goal? If not return to step 3 and repeat If we have reached our goal STOP

Summary DB Time is the fundamental performance metric The DB Time Method uses many different sources of DB time within the database to allow many different scopes of performance tuning Time based diagnosis removes ‘value judgments’ from performance analysis

New In 11g – Enhancements for RAC ADDM has “Database” analysis mode New AWR “Database” report EM Performance screens for RAC enhanced to support new server capabilities.