+ All Categories
Home > Documents > 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

Date post: 17-Dec-2015
Category:
Upload: caroline-lucas
View: 222 times
Download: 3 times
Share this document with a friend
24
13 Copyright © 2005, Oracle. All rights reserved. Performance Management
Transcript
Page 1: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13Copyright © 2005, Oracle. All rights reserved.

Performance Management

Page 2: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-2 Copyright © 2005, Oracle. All rights reserved.

Objectives

After completing this lesson, you should be able to do the following:

• Use Enterprise Manager to monitor performance

• Tune SQL by using the SQL Tuning Advisor

• Tune SQL by using the SQL Access Advisor

• Use Automatic Shared Memory Management (ASSM)

• Use the Memory Advisor to size memory buffers

• View performance-related dynamic views

• Troubleshoot invalid and unusable objects

Page 3: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-3 Copyright © 2005, Oracle. All rights reserved.

Performance Monitoring

Memory allocation

issues

Memory allocation

issues

Input/outputdevice

contention

Input/outputdevice

contention

Application code

problems

Application code

problems

Resourcecontention

Resourcecontention

Network bottlenecks

Network bottlenecks

?DBA

> Perf MonTuning AdvAccess AdvMemoryStatsInvalid Obj

Page 4: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-4 Copyright © 2005, Oracle. All rights reserved.

Performance Monitoring

Page 5: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-5 Copyright © 2005, Oracle. All rights reserved.

Performance Monitoring

Page 6: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-6 Copyright © 2005, Oracle. All rights reserved.

Performance Monitoring

Page 7: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-7 Copyright © 2005, Oracle. All rights reserved.

Performance Monitoring: Top Sessions

Page 8: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-8 Copyright © 2005, Oracle. All rights reserved.

Performance Monitoring: Top Services

Page 9: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-9 Copyright © 2005, Oracle. All rights reserved.

SQL Tuning Advisor: Overview

Add missing index

Run access advisor

Restructure SQL

Tune SQL plan

(SQL profile)

Automatic Tuning Optimizer

SQL analysisoptimization mode

Access analysis optimization mode

Plan tuning optimization mode

Statistics checkoptimization mode Detect stale or missing

statistics

Comprehensive SQL tuning

SQL Tuning Advisor

Perf Mon> Tuning Adv

Access AdvMemoryStatsInvalid Obj

Page 10: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-10 Copyright © 2005, Oracle. All rights reserved.

SQL Tuning Advisor Options and Recommendations

Page 11: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-11 Copyright © 2005, Oracle. All rights reserved.

Using the SQL Tuning Advisor

• 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

Page 12: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-12 Copyright © 2005, Oracle. All rights reserved.

Using the SQL Tuning Advisor: Example

Page 13: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-13 Copyright © 2005, Oracle. All rights reserved.

SQL Tuning Advisor: SQL Statistics

select count(*) from x where object_id < 340

select count(*) from x where object_id < 220

Each statement causes a hard parse.

Page 14: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-14 Copyright © 2005, Oracle. All rights reserved.

SQL Tuning Advisor:Identifying Duplicate SQL

Bind variable candidates

Page 15: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-15 Copyright © 2005, Oracle. All rights reserved.

Using the SQL Access AdvisorPerf MonTuning Adv

> Access AdvMemoryStatsInvalid Obj

Page 16: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-17 Copyright © 2005, Oracle. All rights reserved.

Managing MemoryComponents

• Automatic Shared Memory Management:– Is recommended to simplify management– Enables you to specify the total SGA memory

through one initialization parameter– Enables the Oracle server to manage the amount of

memory allocated to the shared pool, Java pool, buffer cache, streams pool, and the large pool

• Manually setting shared memory management:– Sizes the components through multiple individual

initialization parameters– Uses the Memory Advisor to make

recommendations

Perf MonTuning AdvAccess Adv

> MemoryStatsInvalid Obj

Page 17: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-18 Copyright © 2005, Oracle. All rights reserved.

Enabling Automatic SharedMemory Management (ASMM)

Click Enable to enable Automatic Shared

Memory Management.

Page 18: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-20 Copyright © 2005, Oracle. All rights reserved.

Manually Setting SharedMemory Management

Page 19: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-21 Copyright © 2005, Oracle. All rights reserved.

Using the Memory Advisor

Page 20: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-22 Copyright © 2005, Oracle. All rights reserved.

V$SYSTEM_EVENT• event• total_waits• total_timeouts• time_waited• average_wait• time_waited_micro

Dynamic Performance Statistics

V$SYSSTAT• statistic# • name• class• value• stat_id

V$SESSION_EVENT• sid• event• total_waits• total_timeouts• time_waited• average_wait• max_wait• time_waited_micro• event_id

V$SESSTAT• sid• statistic#• value

V$SERVICE_EVENT• service_name• service_name_hash• event• event_id• total_waits• total_timeouts• time_waited• average_wait• time_waited_micro

V$SERVICE_STATS• service_name_hash• service_name• stat_id• stat_name• value

Systemwide Session specific Service specific

Cumulative stats

Wait events

…Access AdvMemory

> StatsInvalid Obj

Page 21: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-24 Copyright © 2005, Oracle. All rights reserved.

Instance/DatabaseV$DATABASEV$INSTANCEV$PARAMETERV$SPPARAMETERV$SYSTEM_PARAMETERV$PROCESSV$BGPROCESSV$PX_PROCESS_SYSSTAT

V$SYSTEM_EVENT

Troubleshooting and Tuning Views

DiskV$DATAFILEV$FILESTATV$LOGV$LOG_HISTORYV$DBFILEV$TEMPFILEV$TEMPSEG_USAGEV$SEGMENT_STATISTICS

ContentionV$LOCKV$UNDOSTATV$WAITSTATV$LATCH

MemoryV$BUFFER_POOL_STATISTICSV$LIBRARYCACHEV$SGAINFOV$PGASTAT

Page 22: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-25 Copyright © 2005, Oracle. All rights reserved.

Invalid and Unusable Objects

Effect on Performance:

• PL/SQL code objects are recompiled.

• Indexes are rebuilt.

Perf MonTuning AdvAccess AdvMemoryStats

> Invalid Obj

Page 23: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-27 Copyright © 2005, Oracle. All rights reserved.

Summary

In this lesson, you should have learned how to:

• Use Enterprise Manager to monitor performance

• Tune SQL using the SQL Tuning Advisor

• Tune SQL using the SQL Access Advisor

• Use Automatic Shared Memory Management

• Use the Memory Advisor to size memory buffers

• View performance-related dynamic views

• Troubleshoot invalid and unusable objects

Page 24: 13 Copyright © 2005, Oracle. All rights reserved. Performance Management.

13-28 Copyright © 2005, Oracle. All rights reserved.

Practice Overview:Monitoring and Improving Performance

This practice covers the following topics:

• Detecting and repairing unusable indexes

• Using the SQL Tuning Advisor

• Using the Performance page in Enterprise Manager


Recommended