9 Copyright © 2006, Oracle. All rights reserved. Automatic Performance Management.

Slides:



Advertisements
Similar presentations
Using the SQL Access Advisor
Advertisements

1 ZonicBook/618EZ-Analyst Resonance Testing & Data Recording.
1
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Processes and Operating Systems
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) Customer Supplier Customer authorizes Enrollment ( )
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
19 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Developing Web Services.
14 Copyright © 2005, Oracle. All rights reserved. System Management Tasks and Techniques.
Refreshing Materialized Views
11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Rhesy S.ppt proRheo GmbH
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
12 Copyright © 2006, Oracle. All rights reserved. Automatic Storage Management.
1 Chapter 16 Tuning RMAN. 2 Background One of the hardest chapters to develop material for Tuning RMAN can sometimes be difficult Authors tried to capture.
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
Database Performance Tuning and Query Optimization
PP Test Review Sections 6-1 to 6-6
11 Copyright © Oracle Corporation, All rights reserved. Managing Tables.
Displaying Data from Multiple Tables
Virtual Memory II Chapter 8.
Sample Service Screenshots Enterprise Cloud Service 11.3.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Adding Up In Chunks.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Materialized Views.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Energy Generation in Mitochondria and Chlorplasts
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
13 Copyright © 2005, Oracle. All rights reserved. Performance Management.
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
12 Copyright © 2005, Oracle. All rights reserved. Proactive Maintenance.
12 Copyright © 2004, Oracle. All rights reserved. Automatic Management.
12 Copyright © 2007, Oracle. All rights reserved. Database Maintenance.
15 Copyright © 2004, Oracle. All rights reserved. Proactive Maintenance.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
Preface 1Performance Tuning Methodology: A Review Course Structure 1-2 Lesson Objective 1-3 Concepts 1-4 Determining the Worst Bottleneck 1-5 Understanding.
13 Copyright © 2004, Oracle. All rights reserved. Optimizing Database Performance.
3 Copyright © 2006, Oracle. All rights reserved. Designing and Developing for Performance.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Index Index.
Presentation transcript:

9 Copyright © 2006, Oracle. All rights reserved. Automatic Performance Management

9-2 Copyright © 2006, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to: Diagnose database performance issues Configure the Automatic Workload Repository Access the database advisors Use the SQL Access Advisor to improve database performance Use asynchronous COMMIT effectively Tuning Statistics SGA Attach AWR Advisors Async. Commit

9-3 Copyright © 2006, Oracle. All rights reserved. Tuning Activities The three activities in performance management are: Performance planning Instance tuning SQL tuning

9-4 Copyright © 2006, Oracle. All rights reserved. Performance Planning Investment options System architecture Scalability Application design principles Workload testing, modeling, and implementation Deploying new applications

9-5 Copyright © 2006, Oracle. All rights reserved. Performance Planning Full Notes Page

9-6 Copyright © 2006, Oracle. All rights reserved. Instance Tuning Have well-defined goals. Allocate memory to database structures. Consider I/O requirements in each part of the database. Tune the operating system for optimal performance of the database.

9-7 Copyright © 2006, Oracle. All rights reserved. Performance Tuning Methodology The tuning steps: Tune from the top down. Tune: –The design before tuning the application code –The code before tuning the instance Tune the area with the greatest potential benefit. –Identify the longest waits. –Identify the largest service times. Stop tuning when the goal is met.

9-8 Copyright © 2006, Oracle. All rights reserved. Statistics Collection Performance tuning depends on the collection of accurate statistics. There are different types of statistics: –Optimizer statistics –System statistics There are different methods of collecting statistics: –Automatically, through GATHER_STATS_JOB –Manually, with the DBMS_STATS package –By setting database initialization parameters –By importing statistics from another database

9-9 Copyright © 2006, Oracle. All rights reserved.

9-10 Copyright © 2006, Oracle. All rights reserved. Oracle Wait Events A collection of wait events provides information about the sessions or processes that had to wait or must wait for different reasons. These events are listed in the V$EVENT_NAME view. Tuning >Statistics SGA Attach AWR Advisors Async. Commit

9-11 Copyright © 2006, Oracle. All rights reserved. V$SGASTAT pool name bytes V$SYSSTAT statistic# name class value stat_id V$SYSTEM_EVENT event total_waits total_timeouts time_waited average_wait time_waited_micro System Statistics V$EVENT_NAME event_number event_id name parameter1 parameter2 parameter3 wait_class V$SYSTEM_WAIT_CLASS wait_class_id wait_class# wait_class total_waits time_waited

9-12 Copyright © 2006, Oracle. All rights reserved.

9-13 Copyright © 2006, Oracle. All rights reserved. Displaying Session-Related Statistics V$STATNAME statistic# name class V$SESSTAT sid statistic# value V$SESSION sid serial# username command osuser seq# event# event p1/2/3text p1/2/3 p1/2/3raw wait_class wait_time seconds_in_wait state... V$SESSION_EVENT sid event total_waits total_timeouts time_waited average_wait max_wait time_waited_micro event_id V$EVENT_NAME event# name parameter1 parameter2 parameter3

9-14 Copyright © 2006, Oracle. All rights reserved. Displaying Service-Related Statistics For n-tier environments, because session statistics are not as helpful, you can see service-level statistics in these views: V$SERVICE_EVENT: Aggregated wait counts and wait times for each service, on a per event basis V$SERVICE_WAIT_CLASS: Aggregated wait counts and wait times for each service on a wait class basis

9-15 Copyright © 2006, Oracle. All rights reserved. Instance/Database V$DATABASE V$INSTANCE V$PARAMETER V$SPPARAMETER V$SYSTEM_PARAMETER V$PROCESS V$BGPROCESS V$PX_PROCESS_SYSSTAT V$SYSTEM_EVENT Troubleshooting and Tuning Views Disk V$DATAFILE V$FILESTAT V$LOG V$LOG_HISTORY V$DBFILE V$TEMPFILE V$TEMPSEG_USAGE V$SEGMENT_STATISTICS Contention V$LOCK V$UNDOSTAT V$WAITSTAT V$LATCH Memory V$BUFFER_POOL_STATISTICS V$LIBRARYCACHE V$SGAINFO V$PGASTAT

9-16 Copyright © 2006, Oracle. All rights reserved. Dictionary Views The following dictionary and special views provide useful statistics after using the DBMS_STATS package: – DBA_TABLES, DBA_TAB_COLUMNS – DBA_CLUSTERS – DBA_INDEXES – DBA_TAB_HISTOGRAMS This statistical information is static until you reexecute the appropriate procedures in DBMS_STATS.

9-17 Copyright © 2006, Oracle. All rights reserved. Diagnosis of Hung or Extremely Slow Databases Use for problem analysis when the database is performing very slowly, or is hung: Direct access to SGA for performance monitoring (memory access mode) – V$SESSION – V$SESSION_WAIT – V$SYSTEM_EVENT – V$SYSSTAT –Hang analysis using Enterprise Manager Tuning Statistics >SGA Attach AWR Advisors Async. Commit

9-18 Copyright © 2006, Oracle. All rights reserved. Using Memory Access Mode

9-19 Copyright © 2006, Oracle. All rights reserved. Using the Hang Analysis Page Micro-window

9-20 Copyright © 2006, Oracle. All rights reserved. Using the Hang Analysis Page (notes only page)

9-21 Copyright © 2006, Oracle. All rights reserved. Automatic Workload Repository SYSAUX SGA In-memory statistics 6:00 a.m. 7:00 a.m. 8:00 a.m. Snapshot 1 Snapshot 2 Snapshot 3 Snapshot 4 9:00 a.m. 9:30 a.m. ADDM finds top problems. MMON Tuning Statistics SGA Attach >AWR Advisors Async. Commit

9-22 Copyright © 2006, Oracle. All rights reserved. Automatic Workload Repository (notes only slide)

9-23 Copyright © 2006, Oracle. All rights reserved. AWR Snapshot Baselines DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE ( - start_snap_id IN NUMBER, end_snap_id IN NUMBER, baseline_name IN VARCHAR2); Relevant period in the past

9-24 Copyright © 2006, Oracle. All rights reserved. Advisory Framework: Overview ADDM SQL Tuning Advisor SQL Access Advisor Memory Space PGA Advisor SGA Segment Advisor Undo Advisor Buffer Cache Advisor Library Cache Advisor PGA Tuning Statistics SGA Attach AWR >Advisors Async. Commit

9-25 Copyright © 2006, Oracle. All rights reserved.

9-26 Copyright © 2006, Oracle. All rights reserved. Database Control and Advisors

9-27 Copyright © 2006, Oracle. All rights reserved. Typical Advisor Tuning Session Adjust task parameters. Accept results? Implement recommendations. Yes No Perform analysis. Create an advisor task.

9-28 Copyright © 2006, Oracle. All rights reserved. Manually Invoking ADDM

9-29 Copyright © 2006, Oracle. All rights reserved. Using the SQL Tuning Advisor: Review Use the SQL Tuning Advisor to analyze SQL statements and obtain performance recommendations. Sources for SQL Tuning Advisor to analyze: –Top SQL: Analyzes the top SQL statements currently active –SQL Tuning Sets: Analyzes a set of SQL statements you provide –Snapshots: Analyzes a snapshot –Baselines: Analyzes a baseline

9-30 Copyright © 2006, Oracle. All rights reserved. SQL Access Advisor: Overview SQL Access Advisor Recommendations -Indexes -Materialized views -Materialized view logs Workload specification -SQL statement -SQL Tuning Set -SQL cache contents -Statistics -Schema name

9-31 Copyright © 2006, Oracle. All rights reserved. Typical SQL Access Advisor Session

9-32 Copyright © 2006, Oracle. All rights reserved. Workload Source

9-33 Copyright © 2006, Oracle. All rights reserved. Recommendation Options

9-34 Copyright © 2006, Oracle. All rights reserved. Recommendation Options

9-35 Copyright © 2006, Oracle. All rights reserved. Reviewing Recommendations

9-36 Copyright © 2006, Oracle. All rights reserved. Asynchronous COMMIT The default COMMIT behavior is to wait until redo is saved in the redo log files. The default behavior can now be changed to not wait. Asynchronous COMMIT is useful for high transaction throughput. However, transactions may be lost. –Machine crashes –File I/O problems with redo log files Tuning Statistics SGA Attach AWR Advisors >Async. Commit

9-37 Copyright © 2006, Oracle. All rights reserved. Using Asynchronous COMMIT Possible combinations: – IMMEDIATE, WAIT (this is the default) – IMMEDIATE, NOWAIT – BATCH, WAIT – BATCH, NOWAIT System- or session-level examples: COMMIT statement examples: ALTER SYSTEM SET COMMIT_WRITE = IMMEDIATE, WAIT ALTER SESSION SET COMMIT_WRITE = IMMEDIATE, NOWAIT COMMIT WRITE BATCH WAIT COMMIT WRITE BATCH NOWAIT

9-38 Copyright © 2006, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Diagnose database performance issues Configure the Automatic Workload Repository Access the database advisors Use the SQL Access Advisor to improve database performance Use asynchronous COMMIT effectively

9-39 Copyright © 2006, Oracle. All rights reserved. Practice Overview: Using ADDM to Diagnose Performance Problems This practice covers the following topics: Viewing and interpreting ADDM findings to diagnose a performance problem Implementing those findings

9-40 Copyright © 2006, Oracle. All rights reserved.