Copyright 2012, Oracle and/or its affiliates. All rights reserved.



Similar documents
Proactive Performance Monitoring Using Metric Extensions and SPA

DBA Best Practices: A Primer on Managing Oracle Databases. Leng Leng Tan Vice President, Systems and Applications Management

Risk-Free Administration for Expert Database Administrators

Why Standardize on Oracle Database 11g Next Generation Database Management. Thomas Kyte

Real Application Testing. Fred Louis Oracle Enterprise Architect

Oracle Database 12c: Performance Management and Tuning NEW

Management Packs for Database

Oracle s SQL Performance Analyzer

Oracle Database 12c: Performance Management and Tuning NEW

Monitoring and Diagnosing Oracle RAC Performance with Oracle Enterprise Manager. Kai Yu, Orlando Gallegos Dell Oracle Solutions Engineering

How To Test For A Test On A Test Server

Monitoring and Diagnosing Oracle RAC Performance with Oracle Enterprise Manager

Oracle Enterprise Manager 13c Cloud Control

Maximizing Performance for Oracle Database 12c using Oracle Enterprise Manager

Oracle Enterprise Manager 12c Microsoft SQL Server Plug-in version

Beyond the Basics: Making the Most of Oracle Enterprise Manager 12c Monitoring

Oracle Database 11g: Performance Tuning DBA Release 2

Enterprise Manager 12c for Middleware

An Oracle White Paper June, Strategies for Scalable, Smarter Monitoring using Oracle Enterprise Manager Cloud Control 12c

Oracle Database Performance Management Best Practices Workshop. AIOUG Product Management Team Database Manageability

1. This lesson introduces the Performance Tuning course objectives and agenda

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - Performance Tuning DBA Release 2. 5 Jours [35 Heures]

Oracle Database 10g. Page # The Self-Managing Database. Agenda. Benoit Dageville Oracle Corporation benoit.dageville@oracle.com

Optimizing Your Database Performance the Easy Way

Oracle Enterprise Manager Cloud Control 12c

PATROL From a Database Administrator s Perspective

Programa de Actualización Profesional ACTI Oracle Database 11g: SQL Tuning Workshop

Oracle Enterprise Manager 12c New Capabilities for the DBA. Charlie Garry, Director, Product Management Oracle Server Technologies

ORACLE ENTERPRISE MANAGER 10 g CONFIGURATION MANAGEMENT PACK FOR ORACLE DATABASE

Strategies for Monitoring Large Data Centers with Oracle Enterprise Manager. Ana McCollum Consulting Product Manager

Monitoring, Managing and Supporting Enterprise Clouds with Oracle Enterprise Manager 12c Jan van Tiggelen, Senior Sales Consultant Oracle

Enabling ITIL Best Practices Through Oracle Enterprise Manager, Session # Ana Mccollum Enterprise Management, Product Management

Total Cloud Control with Oracle Enterprise Manager 12c. Kevin Patterson, Principal Sales Consultant, Enterprise Manager Oracle

Expert Oracle Enterprise

Customer evaluation guide Toad for Oracle v12 Database administration

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

Oracle Data Masking. Bruce Elton. Master Principal Sales Consultant Information Security Oracle Corporation

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

Perform-Tools. Powering your performance

Critical Database. Oracle Enterprise Manager Oracle Open World 2010 Presented dby Venkat Tekkalur. Prem Venkatasamy. Principal Technical Architect

CA Database Performance

Oracle Database 10g: New Features for Administrators

Oracle Database 11g: New Features for Administrators

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

Quick Start Guide. Ignite for SQL Server. Confio Software 4772 Walnut Street, Suite 100 Boulder, CO CONFIO.

How To Use Ibm Tivoli Monitoring Software

Response Time Analysis

ORACLE DATABASE 10G ENTERPRISE EDITION

The Complete Performance Solution for Microsoft SQL Server

How To Manage Your It From A Business Perspective

Development Best Practices

Maintaining a Microsoft SQL Server 2008 Database

Basic Tuning Tools Monitoring tools overview Enterprise Manager V$ Views, Statistics and Metrics Wait Events

Improve SQL Performance with BMC Software

MySQL Administration and Management Essentials

Exploiting Oracle Tools and Utilities for Monitoring and Testing Oracle RAC OTN Tour

CA Insight Database Performance Monitor for Distributed Databases

Response Time Analysis

NETWORK MONITORING & ALERTING SERVICES SERVICE DEFINITION

ITIL A guide to event management

The First Complete Cloud Management Solution with Oracle Enterprise Manager. Jean Pierre van Tiggelen EMEA Senior Sales Director Manageability

APPLICATION MANAGEMENT SUITE FOR ORACLE E-BUSINESS SUITE APPLICATIONS

SQL Server Training Course Content

Server & Application Monitor

APPLICATION MANAGEMENT SUITE FOR SIEBEL APPLICATIONS

Product Review: James F. Koopmann Pine Horse, Inc. Quest Software s Foglight Performance Analysis for Oracle

An Oracle White Paper February, Oracle Database In-Memory Advisor Best Practices

Oracle Database. 2 Day + Performance Tuning Guide 12c Release 1 (12.1) E

The Evolution of Load Testing. Why Gomez 360 o Web Load Testing Is a

WhatsUp Gold v11 Features Overview

Oracle Database 11g Comparison Chart

PTC System Monitor Solution Training

Oracle Database 11g: SQL Tuning Workshop Release 2

Oracle Database 11g: New Features for Administrators 15-1

Who is my SAP HANA DBA? What can I expect from her/him? HANA DBA Role & Responsibility. Rajesh Gupta, Deloitte. Consulting September 24, 2015

Oracle Database 11 g Performance Tuning. Recipes. Sam R. Alapati Darl Kuhn Bill Padfield. Apress*

SQL Server Solutions GETTING STARTED WITH. SQL Diagnostic Manager

ITIL A guide to Event Management

Oracle Database 11g: New Features for Administrators DBA Release 2

An Oracle White Paper July, Managing Oracle Business Intelligence Enterprise Edition using Enterprise Manager Cloud Control 12c

SQL Server 2008 Performance and Scale

Oracle: Database and Data Management Innovations with CERN Public Day

Oracle Database 12c: New Features for Administrators

Cisco Process Orchestrator Adapter for Cisco UCS Manager: Automate Enterprise IT Workflows

Microsoft SQL Database Administrator Certification

Course Syllabus. At Course Completion

SQL Server 2005 Features Comparison

Capacity planning with Microsoft System Center

Oracle 11g New Features - OCP Upgrade Exam

What's New in SAS Data Management

White Paper. The Ten Features Your Web Application Monitoring Software Must Have. Executive Summary

Proactive Performance Management for Enterprise Databases

Oracle Database 11g: SQL Tuning Workshop

2013 OTM SIG CONFERENCE Performance Tuning/Monitoring

MS SQL Server 2014 New Features and Database Administration

Transcription:

1

Advanced Database Performance Analysis Techniques Using Metric Extensions and SPA Mughees A. Minhas VP of Product Management Oracle 2

Program Agenda Database Performance Analysis Challenges Advanced Use Cases 1. Detecting Run-away Queries Using Metric Extensions 2. Identifying High Risk SQL in Growing Data Volume Environment 3

Database Performance Analysis Challenges 2 4 Reported by end users Discovered by daily checks Reactive to end-users Find? Fix? Relate symptom to possible cause Relate possible cause to probable metric Implement change Did it work? End-user feedback? Run reports on metric Validate? Track? Will it occur again? Custom script to watch for the metric Complex alerting and notification 1 3 4

1 Find: Diagnostics For problem diagnosis use ADDM, EM Performance ADDM reveals significant problems including problematic SQL details and recommendations improve to performance ADDM family Compare Period, Real- Time ADDM 5

2 Fix: Tuning Seamless integration between Find and Fix In-depth analysis and recommendation of the fix Gather statistics for this example How would we validate this changes? 6

3 Validate: Real Application Testing SQL Performance Analyzer (SPA) SQL Plans + Run-time Stats Pre-Change Trial SQL Workload STS SQL Plans + Run-time Stats Post-Change Trial Compare SQL Performance Analysis Report Test and predict impact of system changes on SQL query performance Analyze performance changes for improvements and regressions Comprehensive performance analysis and reporting Re-execute SQL queries in the given environment End-to-end solution: STS, SQL Plan Baselines, and SQL Tuning Advisor 7

Extended Infrastructure 4 Track: Monitoring in Enterprise Manager (EM) Lights-out data center monitoring Manage by exception Notifications Integrated with My Oracle Support Complete and integrated across stack Entire Oracle stack Heterogeneous infrastructure monitoring via plug-ins Extensible Monitoring scope Integrates with third-party systems Helpdesks and other management systems Metric Extensions (12c) Next generation User Defined Metrics (UDM) Can be defined for any target type, including applications 10

4 Track: Metric Extensions EM Metrics for Application Monitoring Problem Application specific database events that may cause adverse business impact, examples: Sudden burst of orders increases application order queues Application specific locking in database resulting in sessions waiting Solution Utilize Metric Extensions to extend Enterprise Manager monitoring Metric Extension periodically monitors application orders queue length in the database Any violations of thresholds triggers an incident 11

4 Track: Orders Queue Length Metric Extension Create a Metric Extension that monitors ORDERS_QUEUE table Set Warning and Critical limits for New and Processing status Set Incident Rules notify when warning or critical limits are violated 12

4 Track: Monitoring Your custom metric integrated natively into OOB metrics Historical metric view in one pane shows past trend of orders queues, stored in EM repository Alert history summary with actions taken Email notification sent when violations occur 13

Program Agenda Database Performance Analysis Challenges Advanced Use Cases 1. Detecting Run-away Queries Using Metric Extensions 2. Identifying High Risk SQL in Growing Data Volume Environment 14

Case Study 1: Detecting Run-Away Queries Using Metric Extensions Author: John Beresniewicz, Oracle 15

Metric Extension (ME) Lifecycle Develop and unit test privately Deploy and system test on actual targets Publish for general use in EM Export/import to propagate to other EM environments 17

Find Metric Extensions 18

Manage Metric Extensions 19

Runaway Query SQL that consumes too much CPU or executes too long BUGS: Need to find during Development and Testing contexts Real-time SQL Monitoring introduced in DB 11g Monitors long-running and parallel query (PQ) SQL executions Rich interactive user interface and Active Report GV$SQL_MONITOR or V$SQL_MONITOR 20

Design Metric Extension GV$SQL_MONITOR query SQL_ID: key column TotalCPUSecs TotalElapsedSecs Execute every 15-minutes (to not miss anything) Set alert thresholds on CPU and Elapsed times 21

Create Metric Extension Guided wizard makes it easy Well organized Excellent explanations Develop and test on any database before deploying to production 22

Monitoring Email notification with custom subject line Informative email with context-sensitive hyperlinks into EM Your metric is a firstclass EM metric 23

Metric Extensions are Cool! First-class metrics of your own design Easy-to-use user interface makes it a snap Lifecycle support and export/import important value-adds Monitor targets for application-specific issues OOB metrics are for the general case RunawaySQL ME has found many bugs Using EM to improve EM 24

Program Agenda Database Performance Analysis Challenges Advanced Use Cases 1. Detecting Run-away Queries Using Metric Extensions 2. Identifying High Risk SQL in Growing Data Volume Environment 25

Case Study 2: Identifying High Risk SQL in Growing Data Volume Environment 26

Identify High Risk SQL with Growing Data Volumes Problem Data stores and sources are expanding at a rate greater than ever The fast increase of data volume commonly results in performance slowdown Performance slow down can lead to unplanned downtime Reactive Fix Adjust system or db configuration Tune storage system or SQL reactively Provision more hardware Reduce or restrict user access Proactive Optimization Identify SQL with potential volatile plans in increasing data volume DBs Preempt SQL performance reliably Assess and plan for data growth 27

Identify High Risk SQL with Growing Data Volumes 1 Run SPA to establish baseline in test of a given workload* 2 3 Modify statistics to simulate data scale-up factor increase Run SPA to identify high risk SQL Repeat incrementally on each scale-up 4 Periodically run high risk SQL in production to monitor performance * Workload captured into SQL Tuning Sets (STS) 28

1 SPA Baseline Trial in Test Setup test environment either full or subset of data Ensure table and index statistics are same as that of production Run SPA trials in explain plan mode for the workload 29

2 Simulate Data Growth using Statistics Backup existing table and index statistics Create table to hold original table and index statistics dbms_stats.create_stat_table() Export current table and index statistics to this table dbms_stats.export_table_stats() dbms_stats.export_index_stats() Simulate scale up of data volume Assuming column data is uniformly distributed: For all tables increase number of rows and blocks by a factor of 1.1 (10%) using dbms_stats.set_table_stats() For all indexes increase number of rows, number of leaf blocks, number of distinct keys and clustering factor by a factor of 1.1 (10%), using dbms_stats.set_index_stats() 30 Refer to slide notes section for example commands

3 Run SPA Trial Analysis Run SPA Trial with the scaled-up optimizer statistics to assess the impact of data volume growth Identify High Risk SQLs (SQL with plan changes) due to data volume growth 31

4 Periodically Test High Risk SQL in Production Subset high risk SQL (SQL with volatile execution plans) into a separate SQL Tuning Set Create a new empty SQL Tuning Set: dbms_sqltune.create_sqlset() Load high risk SQL into the new SQL Tuning set from the SPA task dbms_sqltune.load_sqlset() Using this STS, run SPA trials periodically with per execution time limits in production to monitor and tune volatile SQL Plans 32

4 Periodically Test High Risk SQL in Production Baseline STS on production once with SPA On a routine basis run SPA Analysis and compare to baseline to identify SQL regressions Trials Production Database Preempt performance degradation and fix proactively in rapidly growing data volume environments Volatile SQL 33

Case Study: Predict Data Growth Effect on SQL Performance Using Optimizer Statistics and SPA, test incrementally, SQL Plan volatility with data volume growth TPCH workload containing 33 queries Run SPA tests at increments of 1.1, 1.5, 2, 3, 4 and 5 times the original data size using dbms_stats to simulate this data volume increase Tests were done assuming uniform column data distribution Optimizer Cost was measured for the workload SPA Trials were run in explain plan mode 34

Predict Data Growth Effect on SQL Performance Using TPCH, captured 33 SQL and ran SPA Analysis on increasing data volumes Focused on queries with plan changes Unchanged performance with new plans also requires testing to minimize risk Regressed SQL represents only 11% of total workload (worst case scenario at 1.5X) # of SQL 30 25 20 15 10 5 Regressed- Plan Change Unchanged - Plan Change Significant Cost changes past 1.5X, investigate partitioning or additional access structures at this point (SQL Access Advisor) 0 1.1 1.5 2 3 4 5 Data Growth (x) 1.1X 1.5X 2X 3X 4X 5X Cost Regression % -3-59 -146-436 -1480-3679 35

% Workload Plan Sensitivity Distribution 100% 80% 60% 40% 20% 0% 1.1x 1.5x 2x 3x 4x 5x Data Volume 36

SPA with Growing Data Volume Summary SPA can be used to identify high risk SQL with minimal effort in environments with Large workloads and increasing data volumes Prevent unexpected performance degradation proactively Test high risk SQL in production and tune 37

Advanced Databases Performance Analysis Solution Built-in, self-diagnostics engine: Automatic Database Diagnostics Monitor (ADDM) (Diagnostics Pack) Find Automates complex and time consuming task of application tuning (Tuning Pack) Fix Validates tuning and what-if activities (Real Application Testing) Validate Track Extend EM out-of-box metrics - Can be defined for any target type, including applications (Metric Extensions) 38

Safe Harbor Statements 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. 39

Graphic Section Divider 40

41

Optimizer Cost % Change (PSI) Plan Sensitivity to Data Volume Growth *Plan Sensitivity Index (PSI) = Optimizer Cost Change % / data volume growth factor Linear optimizer cost increase observed with data volume scale increase up until 2X 1200% 1000% 800% PSI in Data Warehouse Application (TPCH) When data volume is double the original size, significant regression can be predicted For OLTP workload, increasing PSI index signals regressing application performance Use SQL Tuning Advisor and/or Plan Baseline to remediate regression(s) 600% 400% 200% 0% 1.1 1.5 2 3 4 5 Data Volume Scale-up Factor Opt. Cost Change % PSI 42