Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1.

Similar presentations


Presentation on theme: "Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1."— Presentation transcript:

1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1

2 Performance Tuning: 10 New Active Session History and Automatic Workload Repository Tips Deba Chatterjee Principal Product Manager

3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 3 3 Types of Performance Management

4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 4

5 5 Reactive Performance Management

6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 6 Comparing Performance Across Two Periods Inconsistent Performance –Over utilization of system resources –High load ad hoc query consuming resources –Change in execution plan of query –Parallel execution downgrade Performance was fine yesterday, today my application is really slow?

7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 7 Tip: Compare Period ADDM Full ADDM analysis across two AWR snapshot periods Detects causes, measure effects, then correlates them Causes: workload changes, configuration changes Effects: regressed SQL, reach resource limits (CPU, I/O, memory, interconnect) Makes actionable recommendations along with quantified impact AWR Snapshot Period 1 AWR Snapshot Period 2 Analysis Report Compare Period ADDM SQL Commonality Regressed SQL I/O Bound Undersized SGA

8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 8 30% smaller Buffer cache 10% new SQL Compare Period ADDM: Method Top SQL increased 45% Read I/O up 55% Buffer cache reduction caused read I/O increase

9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 9 Reactive Performance Management

10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 10 Database Hang Analysis Database Hung state –Blocking Sessions –Memory allocation issues –Library cache issues –Unresponsive Storage (ASM) –Interconnect problems My database is hung? I do not want to bounce it.

11 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 11 Tip: Real-Time ADDM EM Agent JDBC Connection Diagnostic Connection Database ADDM Analysis Hangs Latches Deadlocks Uses a pre-established diagnostic connection for unresponsive systems Initiates a standard JDBC connection for real-time analysis Diagnostic connection collects data without holding latches or running SQL First intelligent advisor to diagnose problems in real-time as they occur, no matter how sick the system is Real-Time Analysis Unresponsive DB

12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 12 Real-Time ADDM Real-time analysis of hung or slow database systems Holistically identify global resource contentions and deadlocks Quantified performance impact Precise, actionable recommendations Provide cluster-wide analysis for RAC

13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 13 Reactive Performance Management

14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 14 SQL Performance Analysis I enabled parallel query, yet this query is taking so long. Can you take a look? Parallel Downgrades – Uncontrolled parallel execution – Parallel Server availability – Object level settings – Session level settings

15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 15 Tip: Real-Time SQL Monitoring Insert Executed with Parallel Hint

16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 16 Real-Time SQL Monitoring Parallel Tab Parallel Coordinator busy for the entire duration!!

17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 17 Real-Time SQL Monitoring Enabled Parallel DML Parallel Slaves busy for the entire duration!!!

18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 18 SQL Performance Analysis My simple query takes so long. Whats wrong with the database? SQL Performance Problems – Statistics – Resources – Application issues – Parallelism – Initialization parameters

19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 19 Tip: Real-Time SQL Monitoring SQL with Count and Group By

20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 20 Real-Time SQL Monitoring SQL with Count and Group By

21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 21 Real-Time SQL Monitoring PGA Size Increased

22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 22 Reactive Performance Management

23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 23

24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 24 Proactive Performance Management

25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 25 Reactive Tracing of long running programs ? Can you trace my program ? What is wrong with tracing ? – A very reactive way of looking at problems – Overhead of writing data to trace files – Programs we want to trace are usually the ones with issues – Impacts the performance of the production system

26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 26 Monitoring Complex Database Operations Whats Really Happening inside the Database

27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 27 Real-Time Database Operations Monitoring Know Whats Happening and Resolve Issues Faster. Database monitoring of application jobs Grouping of SQLs, sessions for the application jobs Key scenarios: ETL operations, Quarter End Close jobs Real-time monitoring driven by application specified tagging Oracle Data Pump jobs automatically monitored Tagging ability in PL/SQL, OCI, JDBC Avoids the overhead of SQL*Trace Visibility of top SQL statements, system and session performance metrics

28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 28 Naming a Database Operation How to Setup a DBOP ? – Naming or Bracketing – Tagging BEGIN_OPERATION END_OPERATION SQL PL/SQL Blocks … SQL EXPLICIT SQL PL/SQL Blocks … SQL DBOP (Tag) IMPLICIT (For Java & OCI)

29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 29 Monitor Composite Database Operations Oracle Database 11g: Support for simple DB operations PL/SQL procedures/functions Oracle Database 12c: NEW support for composite operations Session(s) activity between 2 points of time defined by application code or DBA For example; SQL*Plus script, batch job, or ETL processing At most one DBOP per DB session

30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 30 Proactive Performance Management

31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 31 Analyzing Transient Performance Problems What happened last night the batch job took twice the time to finish ? No way to detect transient issues – We look at AWR data Averaged out over the snapshot window – On-disk ASH Data Sampled every 10 seconds – Very difficult to detect such issues in the past

32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 32 Automatic Performance Diagnostics The ADDM Family: A Continuous Evolution in Database Performance Management Hung or extremely slow databases Uses a normal and diagnostic mode connection Manually triggered Real-Time ADDM In-depth performance comparison across two periods Uses AWR data Manually triggered Compare Period ADDM Diagnose persistent performance issues Uses AWR snapshots Automatically runs every hour ADDM Real-Time ADDM Compare Period ADDM ADDM Proactively detect & diagnose performance spikes Uses in-memory data Automatically runs every 3 seconds Enhanced Real-Time ADDM

33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 33 Enhanced Real-Time ADDM Proactive problem detection & analysis Very light weight (in memory, latchless) check runs every 3 seconds When detects bad performance trends, triggers further analysis Analyzes High CPU, I/O spikes, memory, interconnect, hangs, deadlocks Identifies a problem before it threatens application performance For current spikes, Real-Time ADDM can be manually triggered For short duration (5-min) performance spikes, i.e. transient, high impact problems Actionable advice for critical issues Richer data set available for analysis Reports (analysis and data) stored in AWR for historical analysis Database self-monitors for serious performance issues

34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 34 Triggers for Further Analysis

35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 35 Proactive Performance Management

36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 36 Understanding Workload Profile The SQL Response Metric crossed the warning threshold. What is wrong? Several factors can impact SQL Response time – Increased or unusual load on system – Hardware Issues – Runaway queries consuming system resources – Changes in execution plans – Missing or stale object statistics Need a mechanism to quickly analyze in-memory performance data

37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 37 Database Response Time AnalysisAWR AWR top 5 section shows the Wait Class which contributes most to DB wait time Objects involved in TX row lock contention can be identified in Segment Statistics section of AWR Foreground Wait Class section in AWR to see distribution of DB waits over Waits classes

38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 38 From AWR to ASH ASH report for the period of increase of Application waits will show the same waits as AWR Can I get the Application Module which suffered from this type of contention ?

39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 39 Extracting More Data From ASH Identify SQL statements and sessions impacted by waits on Application Wait Class

40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 40 Extracting More Data From ASH Get a list of blocking sessions and DB objects !

41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 41 Understanding Workload Profile Graphical ASH report for advanced analysis Provides visual filtering for recursive drill-downs Select any time period for analysis Analyze performance across many dimensions Different visualizations: Stacked chart or Tree Map Collaborate with others using Active Reports

42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 42 Proactive Performance Management

43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 43

44 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 44 Preventive Performance Management

45 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 45 DATABASE MANAGEMENT 187 Million Members $252 Million in Revenue 800 Oracle Databases 1,400 Applications FOCUS ON Preventive Performance Management Challenge: LinkedIns ERP systems were being upgraded from DB 10g to DB11g Presence of a large amount of custom code Limited time frame to complete the upgrade. Management concern about System performance Initial testing showed no major problems/concerns A week before go-live several potential showstopper performance issues were noticed. Re-writing or tuning several pieces of code was not feasible in a short window of time. Decision to use either SQL Profiles or Baselines to regress to the DB10g plan in the interim Using Oracle Enterprise Manager: Used EM to regress back to the old plan to run a job that calls the slow performing SQL Used SQL Tuning Advisor to drilling down in to the session and identify the SQL ID You can compare the explain plan and see the new explain plan in the same window Click through guided wizard to implement the SQL profile DONE!!! Case Study

46 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 46 SQL Tuning Advisor Comprehensive SQL Tuning Recommendations Gather Missing or Stale Statistics Create a SQL Profile Add Missing Access Structures Modify SQL Constructs Adopt Alternative Execution Plan (11.2) Create Parallel SQL Profile (11.2) SQL SQL Profiling Statistics Analysis Access Path Analysis SQL Restructure Analysis Alternative Plan Analysis Parallel Query Analysis Automatic Tuning Optimizer Administrator SQL Analyzes statistics for accuracy Recommends SQL Profiles for transparent application tuning Suggest access structures and alternate SQL to speed up query execution Identifies alternative execution plans using real-time and historical performance data to recover from plan regression Recommends appropriate degree of parallelism for best performance

47 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 47 Preventive Performance Management

48 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 48 Ensure Optimal Resource Allocation We are going through a schema consolidation, how can I ensure one schema / user will not run away with all my system resources? Database resource manager directives prevent a single user session to run away with all resources Create a resource allocation strategy Allocate appropriate CPU and I/O (Exadata) across consumer groups

49 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 49 Allocating Resources in the Database

50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 50 Tip: Setting up Resource Manager in Oracle Enterprise Manager Extremely simple to manage resource plans using Enterprise Manager UI

51 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 51 Preventive Performance Management

52 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 52 Prevent Performance Issues Due to Application Changes The new BI system has very aggressive SLAs defined. How can we ensure consistent performance across the system? Code migration, new indices, objects can often impact performance of the application How do we validate the performance of critical queries before rolling out these changes ?

53 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 53 Trial Validate Impact of Custom Code Migration Use SPA Guided Workflow (recommended) or PL/SQL APIs Create a SQL tuning set of the top X (20 or 30) queries Establish first trial remotely using current state – baseline Make change – Create the indexes or migrate custom code Establish second trial remotely using the same SQL Tuning Set Review SPA report and rollout or rollback changes. Trial 2 Central SPA SystemProduction State 1 State 2 Custom Code Changes

54 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 54 Tip: Take the Guess Work Out! Run your trial before and after migrating the change Make sure your most important queries are not regressed Take the guess work out

55 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 55 Preventive Performance Management

56 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 56 Enterprise Manager at OpenWorld 2013 SessionTitleDate/Time CON1452 Advanced Database Performance Analysis Techniques Using SQL Performance AnalyzerTuesday, Jul 23, 2:15 PM, Room 426 CON1590 DBA's guide to Data Masking and Data Subsetting Tuesday, Jul 23, 4:45 PM, Room 509 CON1628 Best Practices to Monitor and Manage WebLogic Server: Development to Production Wednesday, Jul 24, 12:00 PM, Room 420/421 CON1450Extreme Database Management with the Latest Generation of Database TechnologyWednesday, Jul 24, 12:00 PM, Room 431 CON1589Advanced Management of Oracle Applications Unlimited and Fusion ApplicationsWednesday, Jul 24, 12:00 PM, Room 509 CON1603Application Performance Matters – Oracle Real User Experience InsightWednesday, Jul 24, 2:00 PM, Room 509 CON1451Zero to Cloud in Hours with Oracle Enterprise Manager 12cWednesday, Jul 24, 2:00 PM, Room 617 CON1587 Oracle Performance Tuning Boot Camp: 10 New Problem-Solving Tips Using ASH & AWRWednesday, Jul 24, 3:15 PM, Room 509 CON1604Managing Heterogeneous Environments with Oracle Enterprise ManagerWednesday, Jul 24, 5:15 PM, Room 509 CON1588Oracle's Approach to Application and Infrastructure TestingWednesday, Jul 24, 8:45 AM, Room 509 CON1719 Oracle Enterprise Manager DBaaS: Database, Schema, or Terabytes of Data in MinutesWednesday, Jul 24, 8:45 AM, Room 61 CON1453Deep Dive into Exadata management with Oracle Enterprise Manager 12c Thursday, Jul 25, 12:00 PM, Room 42 GEN11423Total Cloud Control: Oracle Enterprise Manager 12c Overview Thursday, Jul 25, 2:00 PM, Blue Hall CON1602What's New in Oracle Exalogic Management?Thursday, Jul 25, 9:00 AM, Room 509 CON1454Database Lifecycle Management with Enterprise Manager 12cThursday, Jul 25, 9:00 AM, Room 617

57 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 57

58 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 58


Download ppt "Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1."

Similar presentations


Ads by Google