ITPub博客

首页 > Linux操作系统 > Linux操作系统 > MTTR详解

MTTR详解

原创 Linux操作系统 作者:zecaro 时间:2011-02-11 20:00:45 0 删除 编辑

原文链接

MTTR和MTBF的区别
关键词:
MTTR-Mean Time To Recover
MTBF-Mean Time Between Failures

       对于DBA来说,应该明白数据库宕机对业务的压力,管理者关心的宕机时间所要付出的成本,特别是损失数据所增加的企业成本,所以DBA一个重要的职责就是尽量减少宕机时间和数据损失最小化。
       DBA应该努力减少MTTR,制定策略使数据库不可用时间缩为最短,能否应付各种DB Failure,运用有效的手段减少损失;努力增加MTBF,DBA必须理解所在数据库环境的备份和恢复结构,并且正确配置数据库,防止DB Failure发生。
       在初始化参数文件中有一个参数FAST_START_MTTR_TARGET,它定义了MTTR大小(单位是秒),另外还有两个参数,LOG_CHECKPOINT_TIMEOUT和LOG_CHECKPOINT_INTERVAL。

SQL> show parameter FAST_START_MTTR_TARGET
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fast_start_mttr_target integer 600
SQL> show parameter LOG_CHECKPOINT_TIMEOUT
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_checkpoint_timeout integer 1800
SQL> show parameter LOG_CHECKPOINT_INTERVAL
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_checkpoint_interval integer 0


       在ORACLE METALINK网站对FAST_START_MTTR_TARGET的解释如下:
The information in this article applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.0 to 10.2.0.0
This problem can occur on any platform.
Goal
Tuning Automatic Checkpoint in 10G
Fix
Checkpoints are means of synchronizing the data modified in memory with the data files of the database. By periodically writing modified data to the data files between checkpoints Oracle Database ensures that sufficient amounts of memory are available, improving the performance of finding free memory for incoming operations.

Checkpointing is of 2 types:

1. Normal checkpoint.
2. Incremental checkpoint.
1. Normal checkpoint will update the control file as well as all datafile headers.
2. Incremental checkpoint will update only the control file.

Incremental checkpoint is:


> Continuously active checkpoint
> no completion RBA
> checkpoint advanced in memory only
> RBA for incremental checkpoint recorded in control file.
> DBW0 writes out dirty buffers to advance the incremental checkpoint.
> Used to reduce recovery time after a failure.

 

Incremental checkpoint is determined by:


> Upper bound on recovery needs.
> size of the smallest log file
> value of log_checkpoint_interval
> value of log_checkpoint_timeout
> Total numbers of dirty buffers in the cache.


In 8i:
===

Checkpoint tuning is controlled by three parameters :

LOG_CHECKPOINT_INTERVAL
LOG_CHECKPOINT_TIMEOUT
FAST_START_IO_TARGET
The fast-start checkpointing feature limits the number of dirty buffers and thereby limits the amount of time required for instance recovery. If Oracle must process an excessive number of I/O operations to perform. instance recovery, then performance can be adversely affected. You can control this overhead by setting an appropriate value for the parameter

FAST_START_IO_TARGET.

However, aggressive checkpointing can reduce run-time performance, because checkpointing causes DBWn processes to perform. I/O. The overhead associated with checkpointing is usually small.


In 9i:
===

New parameter is introduced - FAST_START_MTTR_TARGET.

The FAST_START_MTTR_TARGET initialization parameter simplifies the configuration of recovery time from instance or system failure. This parameter lets you specify the number of seconds crash or instance recovery is expected to take. The FAST_START_MTTR_TARGET is internally converted to a set of parameters that modify the operation of Oracle such that recovery time is as close to this estimate as possible.

The maximum value for FAST_START_MTTR_TARGET is 3600, or one hour. If you set the value to more than 3600, then Oracle rounds it to 3600. There is no minimum value for FAST_START_MTTR_TARGET. However, this does not mean that you can target the
recovery time as low as you want. The time to do a crash recovery is limited by the low limit of the target number of dirty buffers, which is 1000, as well as factors such as how long initialization and file open take.


In 10g:
=====

Starting with Oracle Database 10g, the database can self-tune checkpointing to achieve good recovery times with low impact on normal throughput. With automatic checkpoint tuning, Oracle Database takes advantage of periods of low I/O usage to write out data modified in memory to the data files without adverse impact on the throughput. Thus, a reasonable crash recovery time can be achieved even if the administrator does not set any checkpoint-related parameter or if this parameter is set to a very large value.

Oracle Database 10g supports automatic checkpoint tuning which takes advantage of periods of low I/O usage to advance checkpoints and therefore improve availability. Automatic checkpoint tuning is in effect if the FAST_START_MTTR_TARGET database initialization parameter is unset. Observe the following recommendations to take advantage of automatic checkpoint tuning.

If it is necessary to control the time to recover from an instance or node failure, then set FAST_START_MTTR_TARGET to the desired MTTR in seconds. If targeting a specific MTTR is unnecessary, then leave FAST_START_MTTR_TARGET unset to enable automatic checkpoint tuning. Fast-start checkpointing can be disabled by setting FAST_START_MTTR_TARGET=0. Disable fast-start checkpointing only when system I/O capacity is insufficient with fast-start checkpointing enabled and achieving a target MTTR is not important.Enabling fast-start checkpointing increases the average number of writes per transaction that DBWn issues for a given workload (when compared with disabling fast-start checkpointing). However, if the system is not already near or at its maximum I/O capacity, then fast-start checkpointing has a negligible impact on performance. The percentage of additional DBWn writes with very aggressive fast-start checkpointing depends on many factors, including the workload, I/O speed and capacity, CPU speed and capacity, and the performance of previous recoveries.


If FAST_START_MTTR_TARGET is set to a low value, then fast-start checkpointing is more aggressive, and the average number of writes per transaction that DBWn issues is higher in order to keep the thread checkpoint sufficiently advanced to meet the requested MTTR. Conversely, if FAST_START_MTTR_TARGET is set to a high value, or if automatic checkpoint tuning is in effect (that is, FAST_START_MTTR_TARGET is unset), then fast-start checkpointing in less aggressive, and the average number of writes per transaction that DBWn issues is lower.

Fast-start checkpointing can be explicitly disabled by setting FAST_START_MTTR_TARGET=0. Disabling fast-start checkpointing leads to the fewest average number of writes per transaction for DBWn for a specific workload and configuration, but also results in the highest MTTR.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23650854/viewspace-687038/,如需转载,请注明出处,否则将追究法律责任。

下一篇: RAID介绍
请登录后发表评论 登录
全部评论

注册时间:2010-10-28

  • 博文量
    182
  • 访问量
    356665