Beruflich Dokumente
Kultur Dokumente
8. We just went live after a DB change and now performance has regressed, what happened?
9. We are going through a schema consolidation, how can I ensure one session will not run away with all my system resources? 10. The new BI system has very aggressive SLAs defined. How can we ensure consistent performance across the system?
Over utilization of system resources High load ad hoc query consuming resources Change in execution plan of query Parallel execution downgrade
Regressed SQL
I/O Bound
Analysis Report
Undersized SGA
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)
Blocking Sessions Memory allocation issues Library cache issues Unresponsive Storage (ASM) Interconnect problems
10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Diagnostic Connection
Unresponsive DB
JDBC Connection
Hangs
Latches
Real-Time Analysis
Database
ADDM Analysis
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
11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Real-Time ADDM
12
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
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Real-Time ADDM
13
14
15
Parallelism
Initialization parameters
18
19
20
21
Real-Time ADDM
SQL Monitoring
22
23
24
Runaway Query
SQL that consumes too much CPU or executes too long
BUGS: Need to find during Development and Testing contexts
GV$SQL_MONITOR
Not really intended for user-written queries
25
26
query
SQL_ID: key column TotalCPUSecs TotalElapsedSecs Execute every 15-minutes
27
28
29
easy
Well organized Excellent
explanations
Develop and test on
30
Monitoring
Email notification with
class EM metric
31
Metric Extensions
32
33
Foreground Wait Class section in AWR to see distribution of DB waits over Waits classes
Objects involved in TX row lock contention can be identified in Segment Statistics section of AWR
34
Can I get the Application Module which suffered from this type of contention ?
35
36
37
Database Operations
Correlate AWR & ASH
38
performance data
39
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Different visualizations: Stacked chart or Tree Map Provides visual filtering for recursive drill-downs Collaborate with others using Active Select any time period for analysis Reports Analyze performance across many dimensions
40
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Database Operations
Correlate AWR & ASH
ASH Analytics
41
42
Case Study
DATABASE MANAGEMENT
187 Million Members $252 Million in Revenue 800 Oracle Databases 1,400 Applications
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
SQL Profiling Statistics Analysis Access Path Analysis SQL Restructure Analysis
Add Missing Access Structures Modify SQL Constructs Adopt Alternative Execution Plan (11.2) Create Parallel SQL Profile (11.2)
Administrator
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
45 Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
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
47
Ensures all Consumer Group get a specific share of the resources Allows any Consumer Group to consume any unused resources Kicks in at 100% resource utilization. Assumes that not all Consumer Group will use its allocated resources
Ensures all Consumer Group get a specific share of the resources Prevents a Consumer Group from taking more than the maximum value assigned. May result in unused capacity
impact performance of the application How do we validate the performance of critical queries before rolling out these changes ?
51
Validate
Production
State 1
01001011001010100100100100100100100100100100100010010101001001001 00111001001001001001001000010010000010111001001010100100100101010 1001000100000101010010010101010011010100101010010010101001100101
Trial 2
State 2
52
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.
53
56