参数FAST_START_MTTR_TARGET的理解
本文来源:keeptrying 《参数FAST_START_MTTR_TARGET的理解》
参数FAST_START_MTTR_TARGET的理解
一、FAST_START_MTTR_TARGET参数的作用和实现方法
参数FAST_START_MTTR_TARGET参数是一个加快实例恢复的参数,我们可以根据服务界别来定义一个合理的、可接受的值。该值得单位为秒。比如设定为60S,假定该值处于合理的情况之下,则一旦实例崩溃,在60S以内实例应当能够被恢复。合理即该值不能太大,也不能太小。太大则实例恢复所需的时间较长,太小则导致大量数据的及时写入,增加了系统的I/O。
影响实例恢复时间长短的主要因素是从最近检查点位置到联机重做日志尾部之间的距离。距离越长则所需要的cache recovery和undo、redo的时间越长。所以如何有效的缩短最近检查点位置与联机重做日志尾部之间的距离,正是FAST_START_MTTR_TARGET的目的。
FAST_START_MTTR_TARGET的值实际上是通过触发检查点来实现它的目的的。当内存中产生的dirty buffer所需的恢复时间(estimated_mttr)到达FAST_START_MTTR_TARGET所指定的时间,则检查点进程被触发。检查点进程一旦被触发,将通过DBWn进程按检查点队列顺序将脏数据写入到数据文件,从而缩短了最后检查点位置与联机重做日志间的距离,减少了实例恢复所需的时间。
二、FAST_START_MTTR_TARGET参数为0的情况
官网描述:
Fast-start checkpointing refers to the periodic writes by the database writer (DBWn) processes for the purpose of writing changed data blocks from the Oracle buffer cache to disk and advancing the thread-checkpoint. Setting the database parameter FAST_START_MTTR_TARGET to a value greater than zero enables the fast-start checkpointing feature. Fast-start checkpointing should always be enabled for the following reasons:
It reduces the time required for cache recovery, and makes instance recovery time-bounded and predictable. This is accomplished by limiting the number of dirty buffers (data blocks which have changes in memory that still need to be written to disk) and the number of redo records (changes in the database) generated between the most recent redo record and the last checkpoint.
Fast-Start checkpointing eliminates bulk writes and corresponding I/O spikes that occur traditionally with interval- based checkpoints, providing a smoother, more consistent I/O pattern that is more predictable and easier to manage. If the system is not already near or at its maximum I/O capacity, fast-start checkpointing will have a negligible impact on performance. Although fast-start checkpointing results in increased write activity, there is little reduction in database throughout, provided the system has sufficient I/O capacity.
Explicit setting of the FAST_START_MTTR_TARGET parameter to 0 disables automatic checkpoint tuning.Explicit setting of the FAST_START_MTTR_TARGET parameter to a value other than 0 also enables the Redo Log Advisor.
从上面的描述可以看出,如果将FAST_START_MTTR_TARGET设置为0将关闭检查点自动调整功能。当设定一个大于0的值给FAST_START_MTTR_TARGET,则自动调整检查点功能将启用。
三、设置FAST_START_MTTR_TARGET
这个参数值得设定需要考虑到可接受的实例的恢复时间、可承受的I/O吞吐量等等。可以再系统正常负载时参考v$instance_recovery视图来设置该参数的值。
假定将FAST_TARGET_MTTR_TARGET的值设置为30S:
1 SYS@ tsid > alter system set fast_start_mttr_target=30;
视图v$instance_recovery中有两个相关字段:TARGET_MTTR和ESTIMATED_MTTR ;TARGET_MTTR:参照FAST_START_MTTR_TARGET参数中设定的值计算出来的一个值。ESTIMATED_MTTR:系统根据dirty buffer中计算出来的值。
1 SYS@tsid>select recovery_estimated_ios,actual_redo_blks,target_redo_blks,target_mttr,estimated_mttr from v$instance_recovery;
3
4 RECOVERY_ESTIMATED_IOS ACTUAL_REDO_BLKS TARGET_REDO_BLKS TARGET_MTTR ESTIMATED_MTTR
5 ---------------------- ---------------- ---------------- ----------- --------------
6 1768 104036 184320 28 23
四、启用MTTR Advisor
首先需要设置两个参数:STATISTICS_LEVEL,设置为typical或者all ;FAST_START_MTTR_TARGET,设置为非0值。
1 SYS@ tsid > show parameter mttr; --当前参数设置为30S
2
3 NAME TYPE VALUE
4 ------------------------------------ ----------- ------
5 fast_start_mttr_target integer 30
6
7
8 SYS@ tsid > select target_mttr,estimated_mttr from v$instance_recovery;
9
10 TARGET_MTTR ESTIMATED_MTTR
11 ----------- --------------
12 28 23 --系统计算出的mttr为28S
13
14 SYS@tsid>select mttr_target_for_estimate,dirty_limit,estd_cache_writes,estd_cache_write_factor,estd_total_writes,estd_total_write_factor from v$mttr_target_advice;
15
16 MTTR_TARGET_FOR_ESTIMATE DIRTY_LIMIT ESTD_CACHE_WRITES ESTD_CACHE_WRITE_FACTOR ESTD_TOTAL_WRITES ESTD_TOTAL_WRITE_FACTOR
17 ------------------------ ----------- ----------------- ----------------------- ----------------- -----------------------
18 27 1000 75103 1.0043 75296 1.0043
19 28 1103 74974 1.0026 75167 1.0026
20 30 1313 74781 1 74974 1
21 31 1417 74652 .9983 74845 .9983
22 32 1522 74587 .9974 74780 .9974
23
24 --mttr_target_for_estimate有一个值最接近设定的目标时间30。
25 --给出了几组不同的mttr_target值及dirty_limit,cache_write,io来供DBA来选择设定合适的mttr。
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
参数FAST_START_MTTR_TARGET的理解的更多相关文章
- js参数arguments的理解
原文地址:js参数arguments的理解 对于函数的参数而言,如下例子 function say(name, msg){ alert(name + 'say' + msg); } say('xiao ...
- 转:关于S参数的一些理解
关于S参数的一些理解 http://rf.eefocus.com/module/forum/thread-596241-1-1.html 台湾工程师图文独特讲解:S参数http://rf.eefocu ...
- Explain 参数详解,重点部分已经全部完成,还有少数几个参数没不理解没标注。
Explain 参数详解,重点部分已经全部完成,还有少数几个参数没不理解没标注.http://naotu.baidu.com/file/cdb631355392e317e1d925dc2e48f592 ...
- python中对类的方法中参数self的理解
我们通过下面的代码来对参数self进行理解 #coding:utf-8 2 class washer(): 3 def wash(self): 4 print("洗衣服") 5 p ...
- 关于vue自定义事件中,传递参数的一点理解
例如有如下场景 先熟悉一下Vue事件处理 <!-- 父组件 --> <template> <div> <!--我们想在这个dealName的方法中传递额外参数 ...
- MySQL增强半同步的搭建实验,和一些参数的个人理解
关于参数理解,已补充实验,可以查看: rpl_semi_sync_master_wait_no_slave 参数研究实验 环境信息 role ip port hostname master 192.1 ...
- linear-grident的属性和使用以及对颜色后面参数(百分比)的理解
linear-grident的属性和使用 css3新增Gradient属性,用来增加渐变的效果,渐变分为线性渐变 linear-grident 和 径向渐变 radial-grident,这篇文章 ...
- vm参数配置的理解
-denv=dev表示将服务器的级别 设置为开发环境 所有错误的内容都会打印在控制台上 //The-Denv = dev statement creates a system property nam ...
- Rect参数的简易理解方式
以屏幕左上角为原点开始计算 向下 和 向右均为整数 new Rect(left, top, right, bottom) Rect参数的意思代表的是矩形的左上角的坐标(left.top)和右下角的坐标 ...
随机推荐
- Cisco Common Service Platform Collector - Hardcoded Credentials(CVE-2019-1723)
Cisco Common Service Platform Collector - Hardcoded Credentials 思科公共服务平台收集器-硬编码凭证(CVE-2019-1723) htt ...
- PHP面试(一):PHP基础知识考察点、网页考察点、Linux考察点、MySQL考察点
一.基础知识考察 1.引用变量的概念及定义方式——引用变量的原理 2.常量及数据类型——字符串的三种定义方法及各自的区别 3.运算符的使用——错误控制符.运算符优先级 4.流程控制操作 5.自定义函数 ...
- 洛谷P1494 【[国家集训队]小Z的袜子】
纪念自己独立完成的一道省选题(菜鸡如我只会看题解qwq) 还算是一道比较裸的莫队题把,比有的题目简单很多,也很好想怎么O(1)转移,比别的题就多了一个组合数计算(还有gcd??),还没算%意义下,也是 ...
- j假设程序需要要一个int烈血的刀变量来保存1英里所包含的步数(5280)为该变量编写一条声明语句。
j假设程序需要要一个int烈血的刀变量来保存1英里所包含的步数(5280)为该变量编写一条声明语句. final intFT_PER_MILE =5280
- SFTP远程连接服务器上传下载文件-qt4.8.0-vs2010编译器-项目实例
本项目仅测试远程连接服务器,支持上传,下载文件,更多功能开发请看API自行开发. 环境:win7系统,Qt4.8.0版本,vs2010编译器 qt4.8.0-vs2010编译器项目实例下载地址:CSD ...
- LINQ Except “引用类型” 用法
值类型的比较Except 直接就比了 正经集合类型的如下 var resultExcept = Expert_ItemSource.Except(Invert_ItemSource, new MyCo ...
- [转] 图 + 文 + 公式 理解LSTM
转自公号“机器之心” LSTM入门必读:从入门基础到工作方式详解 长短期记忆(LSTM)是一种非常重要的神经网络技术,其在语音识别和自然语言处理等许多领域都得到了广泛的应用..在这篇文章中,Edwin ...
- 浅析 Bag of Feature
Bag of Feature 是一种图像特征提取方法,它借鉴了文本分类的思路(Bag of Words),从图像抽象出很多具有代表性的「关键词」,形成一个字典,再统计每张图片中出现的「关键词」数量,得 ...
- SpringCloud概述
⒈官网说明 SpringCloud是基于SpringBoot提供了一套微服务解决方案,包括服务注册与发现.配置中心.全链路监控.服务网关.负载均衡.熔断器等组件,除了基于Netflix的开源组件做高度 ...
- 如何在Delphi 中使用 DevExpressVCL的 CxGrid与CxTreeList,编辑某列后计算另一列的值
如何在Delphi 中使用 DevExpressVCL的 CxGrid与CxTreeList,编辑某列后计算另一列的值:比如 输入 单价,数量,计算金额. 参考: 1. 输入 单价,数量,计算金额 ...