Oracle Database 11g Real Application Testing. 2 What is Real Application Testing? New database option available with EE only Includes two new features.

Slides:



Advertisements
Similar presentations
Sameer Marwa – Infogig Consulting Khaled Yagoub – Oracle Development
Advertisements

Copyright © SoftTree Technologies, Inc. DB Tuning Expert.
Kurt Engeleiter Product Manager Database Manageability
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Advanced SQL Schema Customization & Reporting Presented By: John Dyke As day to day business needs become more complex so does the need for specifically.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
Taking the Risk out of IT Operations™ DBA InfoPower Oracle Real Application Testing NOCOUG Fall Conference Hanan Hit Director of Customer Support
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
High Availability Group 08: Võ Đức Vĩnh Nguyễn Quang Vũ
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
Deployment Agility Through Tier Testing Hanan Hit, NoCOUG President 2009.
Managing Change with Real Application Testing and Snapshot Standby Barry Hodges Senior Solution Architect, Sales Consulting, Oracle NZ.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
1 What do I really need to know when upgrading Thomas Kyte
1 - Oracle Server Architecture Overview
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
Oracle 11g Real Application Testing: Avoiding Performance Regressions with SQL Performance Analyzer Khaled Yagoub, Pete Belknap, Benoit Dageville, Karl.
Overview SAP Basis Functions. SAP Technical Overview Learning Objectives What the Basis system is How does SAP handle a transaction request Differentiating.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
Module 18 Monitoring SQL Server 2008 R2. Module Overview Monitoring Activity Capturing and Managing Performance Data Analyzing Collected Performance Data.
Reinventing Upgrades, Platform Changes, RAC and More with Database Replay
Database Advisors Automatic Database Diagnostic Monitor ( ADDM )
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
12 Copyright © 2007, Oracle. All rights reserved. Database Maintenance.
M ODULE 2 D ATABASE I NSTALLATION AND C ONFIGURATION Section 1: DBMS Installation 1 ITEC 450 Fall 2012.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
DBA’s New Best Friend: Oracle Database 10g and 11g SQL Performance Analyzer Prabhaker Gongloor (GP) Khaled Yagoub Pete Belknap Database Manageability.
Database Technical Session By: Prof. Adarsh Patel.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
1 Oracle Database 11g – Flashback Data Archive. 2 Data History and Retention Data retention and change control requirements are growing Regulatory oversight.
The Self-Managing Database: Guided Application and SQL Tuning Mohamed Ziauddin Consulting Member of Technical Staff Oracle Corporation Session id:
Oracle Advanced Compression – Reduce Storage, Reduce Costs, Increase Performance Session: S Gregg Christman -- Senior Product Manager Vineet Marwah.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
Quick Tips for Database Performance Tuning Sergey Koltakov Kurt Engeleiter Product Manager.
Continuous DB integration testing with RAT „RATCOIN”
INTRODUCTION TO DBS Database: a collection of data describing the activities of one or more related organizations DBMS: software designed to assist in.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
Module 5: Implementing Merge Replication. Overview Understanding Merge Replication Architecture Implementing Conflict Resolution Planning and Deploying.
SQLXPress Make the most of NonStop SQL with a comprehensive set of easy to use productivity tools.
MISSION CRITICAL COMPUTING Siebel Database Considerations.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Retele de senzori Curs 2 - 1st edition UNIVERSITATEA „ TRANSILVANIA ” DIN BRAŞOV FACULTATEA DE INGINERIE ELECTRICĂ ŞI ŞTIINŢA CALCULATOARELOR.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
3 Copyright © 2006, Oracle. All rights reserved. Designing and Developing for Performance.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
Oracle Database Architectural Components
2 Copyright © 2007, Oracle. All rights reserved. Realistic Testing Using Database Replay.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
Databases and DBMSs Todd S. Bacastow January 2005.
How To Pass Oracle 1z0-060 Exam In First Attempt?
Maximum Availability Architecture Enterprise Technology Centre.
SQL Server Monitoring Overview
Introduction of Week 6 Assignment Discussion
Introduction of Week 3 Assignment Discussion
Data, Databases, and DBMSs
How to Thrive as a DBA in an Oracle10g World
Database Systems Instructor Name: Lecture-3.
Managing Performance by SQL Tuning
Performance And Scalability In Oracle9i And SQL Server 2000
Presentation transcript:

Oracle Database 11g Real Application Testing

2 What is Real Application Testing? New database option available with EE only Includes two new features Database Replay (DB Replay) SQL Performance Analyzer (SPA) SQL Tuning Set (STS) functionality is shared between Real Application Testing option and EM Tuning Pack Advance functionality requires additional packs Diagnostic Pack for DB Replay Tuning Pack for SPA Price (?)

3 Real Application Testing Remediate TestTest Deploy Value Reduces testing cost Improves testing quality Business Benefit Faster technology adoption Lower risk Solution for the Agile Business Change

4 Database Replay

5 The Need for Database Replay System changes like hardware/software upgrades are fact of life Customers want to identify full impact of change before going live Extensive testing and validation can be expensive in time and $$$ Despite expensive testing success rate low Many issues go undetected Changes can impact system availability and performance negatively Cause of low success rate Inability to properly test with real world production workloads results in many issues to go undetected Database Replay makes it possible to do real world testing

6 Database Replay Recreate actual production database workload in test environment Identify, analyze and fix potential instabilities before making changes to production Capture Workload in Production Capture full production workload with real load & concurrency info Move the captured workload to test system Replay Workload in Test Make the desired changes in test system Replay workload with production load & concurrency Honor commit ordering Analyze & Report Errors Data divergence Performance divergence Analysis & Reporting

7 Database Replay: Supported Changes Changes Unsupported Changes Supported Database Upgrades, Patches Schema, Parameters RAC nodes, Interconnect OS Platforms, OS Upgrades CPU, Memory Storage Etc. Client … Middle Tier Storage Recording of External Client Requests

DB Replay: 2 weeks LoadRunner: 30 weeks Total Testing Time 5 00 Comparison of LoadRunner & DB Replay Testing e-Business Suite

9 To:From: Why DB Replay? Complete workflows Partial workflows Low risk High risk Automated Manual intensive Production workloads Artificial workloads Days of development Months of development 150 Days 10 Days

10 Database Replay Overview

11 Step 1: Workload Capture File 1 File 2 File n … Production System All external client requests captured in binary files System background, internal activity excluded Minimal performance overhead for capture For RAC, shared and local file system supported Specify interesting time period for capture, e.g., peak workload, month-end processing, etc. File System Client … Middle Tier Storage

12 Capture Options Workload can be filtered to customize what is captured Filter Types Inclusion Filters: Specifies which sessions should be captured Exclusion Filters: Specifies which sessions should NOT be captured Filter Attributes: Workload capture can be filtered using any of the following session attributes User Program Module Action Service Session ID Workload capture can be run on-demand or scheduled to run at later time

13 Step 2: Process Workload Files File 1 File 2 File n … File 1 File 2 File n … Metadata Capture Files Replay Files Test System Setup test system Logically similar data as production Use RMAN to physically restore production db from backup Use Snapshot standby Use imp/exp, Data Pump, etc. Processing transforms captured data into replay files and generates necessary meta-data Must be done on same version of database as replay system Recommended to process on test system Once processed, workload can be replayed many times For RAC, if using local file system, copy all capture files to single location for replay

14 Step 3: Replay Workload File 1 File 2 File n … Metadata Replay Driver is a special client program that consumes processed workload and sends requests to the replay system Replay requests preserve timing, concurrency and dependencies seen on the capture system Replay Driver consists of one or more clients. For workloads with high concurrency, it may be necessary to start multiple clients to drive workload Once all replay clients are started, workload replay is then initiated by user Replay Files Replay Driver Replay Client

15 Replay Options Synchronized Replay Workload is replayed in full synchronized mode Exact same concurrency and timing as production workload Transaction commit order is honored Ensures minimal data divergence Unsynchronized Replay Workload can be replayed in unsynchronized mode Useful for load/stress testing High Data Divergence Three (3) parameters provided to control degree of synchronization Think time synchronization Commit order synchronization Connect (logon) time synchronization

16 Replay Options Unsynchronized Replay Parameters Think time synchronization Controls think time between database calls Auto (Default): Adjusts think time so as to maintain captured request rate Percentage 0% No think time, highest possible request rate <100% Higher request rate 100% Exact think time >100% Lower request rate Commit order synchronization Controls commit order between transactions In asynchronous mode, commit order not honored – transactions are committed as soon as commit call is issued Connect (logon) time synchronization Controls when sessions are created 0%: All session are connected immediately 100% (Default): Sessions connect at same time as in captured system

17 Replay Options Number of Replay Clients Configurable by user Client Calibration Advisor recommends number of replay clients needed for specific workload Replay clients are multithreaded clients that can drive multiple workload sessions each

18 Analysis & Reporting Comprehensive reports are provided for analysis purposes There (3) types of divergences are reported Data Divergence: Number of rows returned by each call are compared and divergences reported Error Divergence: For each call error divergence is reported New: Error encountered during replay not seen during capture Not Found: Error encountered during capture not seen during replay Mutated: Different error produced in replay than during capture Performance Divergence Capture and Replay Report: Provides high-level performance information ADDM Report: Provides in-depth performance analysis AWR, ASH Report: Facilitates comparative or skew analysis

19 Workload Types Supported Supported All SQL (DML, DDL, PLSQL) with practically all types of binds Full LOB functionality (Cursor based and direct OCI) Local transactions Login/Logoffs Session switching Limited PL/SQL RPCs Limitations Direct path load, import/export OCI based object navigation (ADTs) and REF binds Streams, non-PL/SQL based AQ Distributed txns, remote describe/commit operations Flashback Shared Server

20 EM Interface: DB Replay Summary

21 Best Practices Capture Provide adequate disk space for captured workload (binary files) Database restart (Optional): Recommended to minimize divergence during replay For RAC, use shared file system Test System Setup Ensure data in test is identical to production as of capture start time to minimize data divergence during replay Use RMAN backup/restore or Snapshot Standby feature to setup test system Reset system clock to same time as production if application logic involves SYSDATE usage Process Workload Processing workload has performance overhead and can possibly take a long time Process workload on test system after rather than production system Replay Use Client Calibration Advisor to identify number of replay clients needed to replay workload properly

22 DB Replay Security Model Any “Non-SYS” user with DBA Role SYSDBA role is not mandatory Does not have to be the user whose workload is captured “Execute” privileges on DBMS_WORLOAD_CAPTURE/REPLAY procedures DBMS_WORKLOAD_CAPTURE START_CAPTURE, FINISH_CAPTURE, REPORT(), ADD_FILTER, DELETE_FILTER DBMS_WORKLOAD_REPLAY PROCESS_CAPTURE,INITIALIZE_REPLAY, PREPARE_REPLAY(), START_REPLAY(), CANCEL(), REPORT, ADD_FILTER, REMAP_CONNECTION Capture and Replay user can be different if they have appropriate privileges

23 SQL Performance Analyzer (SPA)

24 …… Client … Capture SQL Test impact of change on SQL query performance Capture SQL workload in production including statistics & bind variables Re-execute SQL queries in test environment Middle Tier Storage Oracle DB Re-execute SQL Queries Production Test Use SQL Tuning Advisor to tune regression SQL Performance Analyzer (SPA)

25 Enables identification of SQL performance regressions before end-users can be impacted SPA can help with any change that impacts SQL execution plan DB upgrades Optimizer statistics refresh New indexes, Materialized Views, Partitions, etc. Fix regressed SQL with SQL Tuning Advisor and SQL Plan Baselines Integrated with query optimizer Captures SQL workload with low overhead SPA Benefits

26 SQL Performance Analyzer Workflow Compare Performance Initial Environment Execute Production SQL and Gather Stats Make Change Post-Change Environment Re-execute SQL Tune SQL Tuned Environment SQL Tuning Advisor Execute SQL

27 Step 1: Capture SQL Workload SQL Tuning Set (STS) used to store SQL workload STS includes: SQL Text Bind variables Execution plans Execution statistics Incremental capture used to populate STS from cursor cache over a time period SQL tuning set’s filtering and ranking capabilities filters out undesirable SQL Production Database Cursor Cache SQL Tuning Set Incremental Capture

28 Step 2: Move SQL Workload to Test System Production Database Cursor Cache SQL Tuning Set Test Database SQL Tuning Set Copy SQL tuning set to staging table (“pack”) Transport staging table to test system (datapump, db link, etc.) Copy SQL tuning set from staging table (“unpack”) Export/Import

29 Step 3: Execute SQL Before Making Change “Before change” SQL performance version is the SQL workload performance baseline SQL Performance = execution plans + execution statistics Test-Execute SQL in SQL tuning set: produce execution plans and statistics execute SQL serially (no concurrency) every SQL is executed only once skip DDL/DML effects Explain plan SQL in SQL tuning set to generate SQL plans only SQL Tuning Set Fetch Next SQL SQL Performance Analyzer Execution Plan & Statistics Test Execute Save Result Before Change

30 Step 4: Execute SQL After Making Change Re-execute SQL after change: Test-Execute SQL in SQL tuning set to generate SQL execution plans and statistics Explain plan SQL in SQL tuning set to generate SQL plans SQL Tuning Set SQL Performance Analyzer Before Change Fetch Next SQL Execution Plan & Statistics Test Execute Save Result After Change Completed Manually implement the planned change: Database upgrade Implementation of tuning recommendations Schema changes Statistics gathering Database parameter changes, OS/hardware changes, etc.

31 Step 5: Compare & Analyze Performance Before Change Completed After Change Completed Compare SQL Performance SQL Performance Analyzer Analysis Report Compare performance using different metrics Elapsed Time Parse Time Execute Elapsed Time Execute CPU Time Buffer Gets Disk Reads Disk Writes Optimizer Cost SPA Report shows impact of change for each SQL Improved SQL Regressed SQL Unchanged SQL SQL with Errors Tune regressed SQL using SQL Tuning Advisor Analysis results can be used to seed SQL Plan Management repository

32 EM Interface: SPA Report

33 SPA Security Model Based on DBMS_SQLTUNE/SQL Tuning Advisor Requires “Advisor”, “Administer [Any] SQL Tuning” privileges Create/Drop/Alter SQL Profile privileges

A Q &