9 Resolving Performance Degradation Over Time
Performance degradation of the database occurs when your database was performing optimally in the past, such as 6 months ago, but has gradually degraded to a point where it becomes noticeable to the users. The Automatic Workload Repository (AWR) Compare Periods report enables you to compare database performance between two periods of time.
While an AWR report shows AWR data between two snapshots (or two points in time), the AWR Compare Periods report shows the difference between two periods (or two AWR reports with a total of four snapshots). Using the AWR Compare Periods report helps you to identify detailed performance attributes and configuration settings that differ between two time periods. The two time periods selected for the AWR Compare Periods report can be of different durations. The report normalizes the statistics by the amount of time spent on the database for each time period and presents statistical data ordered by the largest difference between the periods.
For example, a batch workload that historically completed in the maintenance window between 10:00 p.m. and midnight is currently showing poor performance and completing at 2 a.m. You can generate an AWR Compare Periods report from 10:00 p.m. to midnight on a day when performance was good and from 10:00 a.m. to 2 a.m. on a day when performance was poor. The comparison of these reports should identify configuration settings, workload profile, and statistics that were different in these two time periods. Based on the differences identified, you can diagnose the cause of the performance degradation.
This chapter contains the following sections:
Managing Baselines
Baselines are an effective way to diagnose performance problems. AWR supports the capture of baseline data by enabling you to specify and preserve a pair or a range of snapshots as a baseline. The snapshots contained in a baseline are excluded from the automatic AWR purging process and are retained indefinitely.
A moving window baseline corresponds to all AWR data that exists within the AWR retention period. Oracle Database automatically maintains a system-defined moving window baseline. The default size of the window is the current AWR retention period, which by default is 8 days.
This section contains the following topics:
Creating a Baseline
Before creating a baseline, carefully consider the time period you choose as a baseline because it should represent the database operating at an optimal level. In the future, you can compare these baselines with other baselines or snapshots captured during periods of poor performance to analyze performance degradation over time.
You can create the following types of baseline:
Creating a Single Baseline
A single baseline is captured at a single, fixed time interval. For example, a single baseline may be captured on February 5, 2020 from 5:00 p.m. to 8:00 p.m.
You can choose future start and end times to create a baseline that captures future database activity. If both the start time and the end time are in the future, then a baseline template with the same name as the baseline is also created. A baseline template is a specification that enables Oracle Database to automatically generate a baseline for a future time period.
To create a single baseline:
Deleting a Baseline
To conserve storage space, you may want to periodically delete unused baselines stored in the database.
Removing a source from AWR dashboard presents two options:
- Hard Delete: Remove source from AWR Warehouse and purge all collected AWR data
- All the extract/transfer jobs scheduled for the source are removed.
- The source databases are removed from AWR dashboard
- Already collected AWR data for the source from the warehouse is purged.
- Soft Delete: Stop all upload on source but retain collected data in AWR Warehouse
- Source database remain in the dashboard, but in a disabled (greyed out) state.
- The extract/transfer jobs scheduled for the source are removed.
- Diagnosis,edit,enable/disable snapshots user actions are disabled.
- Retention period for the collected snapshots is still applicable. For example , all snapshots older than the retention period are deleted.
- AWR data collected in the Warehouse are not purged, and AWR reports can be generated from the data.
To delete a baseline:
Computing Threshold Statistics for Baselines
Computing threshold statistics for baselines enables you to graphically display the computed statistics in the charts on the Performance page.
To compute threshold statistics for baselines:
See Also:
"Customizing the Database Performance page" for information about displaying computed statistics on the Performance pageSetting Metric Thresholds for Baselines
As explained in "Setting Metric Thresholds for Performance Alerts", a metric is the rate of change in a cumulative statistic. Alerts notify you when particular metric thresholds are crossed. When the metric thresholds are crossed, the system is in an undesirable state. You can edit the threshold settings for baseline metrics.
You can create the following types of baseline:
Setting Metric Thresholds for the Default Moving Baseline
This section describes the easiest technique for setting the metric thresholds for the default moving baseline. You can choose a group of basic metric threshold settings based on common database workload profiles such as OLTP, data warehousing, and OLTP with nighttime batch jobs. After choosing a workload profile, you can expand or change the threshold values as needed.
To set metric thresholds for the default moving baseline:
-
Access the Database Home page.
See "Accessing the Database Home Page" for more information.
-
From the Performance menu, select Adaptive Thresholds.
If the Database Login page appears, then log in as a user with administrator privileges.
The Threshold Configuration tab of the Baseline Metric Thresholds page appears.
-
Click Quick Configuration.
The Quick Configuration: Baseline Metric Thresholds page appears.
-
In Workload Profile, select one of the following options, depending on how you are using the database:
-
Primarily OLTP (pure transaction processing 24 hours a day)
-
Primarily Data Warehousing (query and load intensive)
-
Alternating (OLTP during the daytime and batch during the nighttime)
In this example, Primarily OLTP was selected.
-
-
Click Continue.
The Quick Configuration: Review OLTP Threshold Settings page appears.
-
Review the metric threshold settings and then click Finish.
You are returned to the Baseline Metric Thresholds page, with the Threshold Configuration tab selected. The metric threshold settings are displayed.
Setting Metric Thresholds for Selected Baselines
This section explains how to select a baseline and edit its thresholds. You can configure the type of threshold, for example, whether it is based on significance levels, percentage of maximum values, or fixed values. You can also configure the threshold levels that determine when the database generates critical alerts and warnings.
You can edit thresholds for the default moving baseline or a baseline that you created in the AWR Baselines page. You can select a baseline in the Edit Thresholds page after you have scheduled statistics computation from the AWR Baselines page and the statistics have finished computing on the static baseline.
To set a metric threshold for a selected moving baseline:
-
Access the Baseline Metric Thresholds page, as explained in "Setting Metric Thresholds for the Default Moving Baseline".
-
In the View list, select Basic Metrics.
The Baseline Metric Thresholds page appears.
-
In the Category/Name column, click the link for the metric whose threshold you want to set or change.
For example, click Number of Transactions (per second).
The Edit Thresholds: Number of Transactions (per second) appears.
The charts on this page provide simple and detailed views of metric activity for a 24-hour period. In the top simple chart, click a day to view the value of the metric plotted against a 24-hour period.
-
Under AWR Baseline, in the Name list, select either the default SYSTEM_MOVING_WINDOW or the name of a baseline created in the AWR Baselines page.
A baseline appears in the AWR Baseline list after you have scheduled statistics computation from the AWR Baselines page and the statistics have finished computing on the static baseline.
In this example,
BASELINE_TUE_1120
is selected.The page refreshes to show the charts for the baseline that you selected.
-
In the Threshold Settings section, complete the following steps to change the settings:
-
In the Threshold Type list, select a type.
-
In the Critical list, select a level.
-
In the Warning list, select a value.
-
In the Occurrences list, select a value.
-
-
Click Apply Thresholds.
The Baseline Metric Thresholds page reappears. The page shows the altered metric threshold settings.
Running the AWR Compare Periods Reports
This section describes how to run the AWR Compare Periods reports using Enterprise Manager Cloud Control (Cloud Control).
You can use AWR Compare Periods reports to compare the database performance between two time periods by:
Comparing a Baseline to Another Baseline or Pair of Snapshots
When performance degradation occurs over time, you can run the AWR Compare Periods report to compare the degraded performance, captured as a new baseline or a pair of snapshots, to an existing baseline. You must have a baseline that represents the system operating at an optimal level. If an existing baseline is unavailable, then compare database performance between two periods of time using two arbitrary pairs of snapshots, as described in "Comparing Two Pairs of Snapshots".
To compare a baseline to another baseline:
See Also:
Comparing Current System Performance to a Baseline Period
You may have noticed a performance change on a production system and would like to know why, or you may have implemented a change to a production system and want to know the effect of the change, such as increased concurrency waits.
The Compare Period ADDM compares the performance of the database server in two time periods, and returns a report describing the performance changes and the root origin of the changes. The Advisor can analyze any Oracle RDBMS version 10.2.0.4 or later monitored by Cloud Control. The following procedure explains how to initiate a report from the Compare Period ADDM.
Comparing Two Pairs of Snapshots
If an existing baseline is unavailable, then you can compare database performance by using two arbitrary pairs of snapshots. Use one pair taken when the database is performing optimally, and another pair when the database is performing poorly. At least four snapshots must be available.
To compare performance using two pairs of snapshots:
-
Access the Database Home page.
See "Accessing the Database Home Page" for more information.
-
From the Performance drop-down menu, select AWR and then Compare Periods Reports.
If the Database Login page appears, then log in as a user with administrator privileges. The Run Compare Periods Report page appears.
-
In First Period, select By Snapshot.
-
In Begin Snapshot, click the magnifying glass icon.
The Search and Select: Snapshots page appears.
-
Select the starting point for the first snapshot period to be included in the report, and then click Select.
You are returned to the Run Compare Periods Report page.
-
In End Snapshot, click the magnifying glass icon.
The Search and Select: Snapshots page appears.
-
Select the ending point for the first snapshot period to be included in the report, and then click Select.
You are returned to the Run Compare Periods Report page.
-
Click Generate Report.
The Report Results section appears on the Run Compare Periods Report page. The section contains the Workload Repository Compare Period Report.
-
Optionally, do the following:
Using the AWR Compare Periods Reports
After an AWR Compare Periods report is generated for the time periods you want to compare, you can use it to analyze performance degradation. To learn how to create the report, see "Running the AWR Compare Periods Reports".
Figure 9-1 shows a portion of an AWR Compare Periods report.
The AWR Compare Periods report is divided into the following sections:
Summary of the AWR Compare Periods Report
The report summary is at the beginning of the AWR Compare Periods report, and summarizes information about the snapshot sets and loads used in the report. The report summary contains the following sections:
Snapshot Sets
The Snapshot Sets section displays information about the snapshot sets used for this report, such as instance, host, and snapshot information.
In the example shown in Figure 9-1, the first snapshot period corresponds to the time when performance was stable on February 7 from 10:50 to 11:20. The second snapshot period corresponds to the time when performance degradation occurred on the same day from 12:50 to 13:00.
Host Configuration Comparison
The Host Configuration Comparison section compares the host configurations used in the two snapshot sets. For example, the report compares physical memory and number of CPUs. Differences in the configurations are quantified as percentages in the %Diff column.
Cache Sizes
The Cache Sizes section compares the database configurations used in the two snapshot sets. For example, the report compares the SGA and log buffer size. Differences in the configurations are quantified as percentages in the %Diff column.
Load Profile
The Load Profile section compares the loads used in the two snapshot sets. Differences in the loads are quantified as percentages in the %Diff column.
In this example, the DB time per second was 100% higher in the first period. CPU time per second was 100% higher.
Top Timed Events
The Top Timed Events section is one of the most useful sections in the report. This section displays the five timed events or operations that consumed the highest percentage of total DB time in each of the snapshot sets.
In this example, CPU time and the number of waits for database file sequential reads are significantly higher in the first period than in the second.
Supplemental Information in the AWR Compare Periods Report
The supplemental information is at the end of the AWR Compare Periods report, and provides additional information about initialization parameters and SQL statements. The init.ora Parameters section lists all the initialization parameter values for the first snapshot set. The Complete List of SQL Text section lists each statement by SQL ID and shows the text of the SQL statement.