Oracle的AWR

1、AWR是什么?

2、默认的AWR是如何收集的?

3、AWR中的baseline

baseline contains performance data from a specific time period that is preserved for comparison with other similar workload periods when performance problems occur. The snapshots contained in a baseline are excluded from the automatic AWR purging process and are retained indefinitely.(基线包含来自特定时间段的性能数据,在出现性能问题时,该时间段将被保留,以便与其他类似的工作负载期间进行比较。基线中包含的快照将从自动AWR清除过程中排除,并无限期保留。)

There are several types of available baselines in Oracle Database:

3.1Fixed Baselines

A fixed baseline corresponds to a fixed, contiguous time period in the past that you specify. Before creating a fixed baseline, carefully consider the time period you choose as a baseline, because the baseline should represent the system operating at an optimal level. In the future, you can compare the baseline with other baselines or snapshots captured during periods of poor performance to analyze performance degradation over time.(固定基线对应于您指定的过去固定的连续时间段。在创建固定基线之前,请仔细考虑您选择的时间段作为基线,因为基线应该表示系统在最佳级别上运行。将来,您可以将基线与在性能不佳期间捕获的其他基线或快照进行比较,以分析性能随时间的降低。)

3.2 Moving Window Baseline

A moving window baseline corresponds to all AWR data that exists within the AWR retention period. This is useful when using adaptive thresholds because the database can use AWR data in the entire AWR retention period to compute metric threshold values.

Oracle Database automatically maintains a system-defined moving window baseline. The default window size for the system-defined moving window baseline is the current AWR retention period, which by default is 8 days. If you are planning to use adaptive thresholds, consider using a larger moving window—such as 30 days—to accurately compute threshold values. You can resize the moving window baseline by changing the number of days in the moving window to a value that is equal to or less than the number of days in the AWR retention period. Therefore, to increase the size of a moving window, you must first increase the AWR retention period accordingly.

(移动窗口基线对应于在awr保留期内存在的所有awr数据。这在使用自适应阈值时很有用,因为数据库可以在整个awr保留期内使用awr数据来计算度量阈值。

Oracle数据库自动维护系统定义的移动窗口基线。系统定义的移动窗口基线的默认窗口大小是当前的AWR保留期,默认为8天。如果计划使用自适应阈值,请考虑使用较大的移动窗口(如30天)来精确计算阈值。通过将移动窗口中的天数更改为等于或小于AWR保留期中的天数,可以调整移动窗口基线的大小。因此,要增加移动窗口的大小,必须首先相应地增加awr保留期。)

 

3.3 Baseline Templates

You can also create baselines for a contiguous time period in the future using baseline templates. There are two types of baseline templates: single and repeating.

You can use a single baseline template to create a baseline for a single contiguous time period in the future. This technique is useful if you know beforehand of a time period that you intend to capture in the future. For example, you may want to capture the AWR data during a system test that is scheduled for the upcoming weekend. In this case, you can create a single baseline template to automatically capture the time period when the test occurs.

You can use a repeating baseline template to create and drop baselines based on a repeating time schedule. This is useful if you want Oracle Database to automatically capture a contiguous time period on an ongoing basis. For example, you may want to capture the AWR data during every Monday morning for a month. In this case, you can create a repeating baseline template to automatically create baselines on a repeating schedule for every Monday, and automatically remove older baselines after a specified expiration interval, such as one month.

(您还可以使用基线模板为未来的连续时间段创建基线。基线模板有两种类型:单一模板和重复模板。可以使用单个基线模板为将来的单个连续时间段创建基线。如果您事先知道将来要捕获的时间段,则此技术非常有用。例如,您可能希望在计划在即将到来的周末进行的系统测试期间捕获awr数据。在这种情况下,您可以创建一个基线模板来自动捕获测试发生时的时间段。可以使用重复比较基准模板基于重复时间日程表创建和删除比较基准。如果您希望Oracle数据库在持续的基础上自动捕获连续的时间段,这将非常有用。例如,您可能希望在一个月的每个星期一上午捕获AWR数据。在这种情况下,可以创建重复比较基准模板,以便在每个星期一的重复计划上自动创建比较基准,并在指定的到期间隔(例如一个月)后自动删除旧的比较基准。)

 

posted @ 2019-06-19 11:17  dayu.liu  阅读(617)  评论(0)    收藏  举报