Bo's Oracle Station

查看: 2546|回复: 1

请教增量检查点的问题

[复制链接]

81

主题

181

帖子

781

积分

高级会员

Rank: 4

积分
781
发表于 2017-4-12 09:03:35 | 显示全部楼层 |阅读模式
本帖最后由 lujiaguai 于 2017-4-12 13:16 编辑

唐老师
    在fast_start_mttr_target非零值的情况下
    修改参数log_checkpoint_timeout的默认值 ,由1800修改为600
    SQL> alter system set log_checkpoint_timeout=600;

    我发现日志中增量检查点的间隔时间变为10分钟一次,部分日志如下:
Wed Apr 12 04:21:13 2017
Incremental checkpoint up to RBA [0x62.85a6.0], current log tail at RBA [0x62.85fa.0]
Wed Apr 12 04:31:15 2017
Incremental checkpoint up to RBA [0x62.87b3.0], current log tail at RBA [0x62.881f.0]
Wed Apr 12 04:41:18 2017
Incremental checkpoint up to RBA [0x62.898e.0], current log tail at RBA [0x62.89eb.0]
Wed Apr 12 04:51:20 2017
Incremental checkpoint up to RBA [0x62.8bd9.0], current log tail at RBA [0x62.8c5c.0]
    而在修改之前,log_checkpoint_timeout在默认值1800下,这个时间间隔就是30分钟一次,日志如下:
Wed Apr 12 02:27:13 2017
Incremental checkpoint up to RBA [0x11528.aad80.0], current log tail at RBA [0x11528.aad8c.0]
Wed Apr 12 02:57:15 2017
Incremental checkpoint up to RBA [0x11528.ac8ba.0], current log tail at RBA [0x11528.ac8da.0]
Wed Apr 12 03:27:17 2017
Incremental checkpoint up to RBA [0x11528.af14e.0], current log tail at RBA [0x11528.af168.0]
Wed Apr 12 03:57:20 2017
Incremental checkpoint up to RBA [0x11528.b0c69.0], current log tail at RBA [0x11528.b0c81.0]

     这样的话,日志的RBA指针移动,决定写脏块的依然是log_checkpoint_timeout这个参数
     如果把这个参数设大,比如设置到3600,那么就是每一小时做一次“Incremental checkpoint up”

     如此的话,fast_start_mttr_target参数并不能决定何时做增量检查点,怎么能决定实例恢复时间?
     这样的话,如果fast_start_mttr_target设定了非零值,是不是需要log_checkpoint_timeout=0?

     如下我尝试了fast_start_mttr_target=15,log_checkpoint_timeout=3600,日志上实际每小时做一次增量检查点
SQL> alter system set fast_start_mttr_target=15;
System altered.
SQL> alter system set log_checkpoint_timeout=3600;
System altered.

Wed Apr 12 10:12:57 2017
Incremental checkpoint up to RBA [0x68.322.0], current log tail at RBA [0x68.3a6.0]
Wed Apr 12 11:13:20 2017
Incremental checkpoint up to RBA [0x68.1d37.0], current log tail at RBA [0x68.1d86.0]
Wed Apr 12 12:13:51 2017
Incremental checkpoint up to RBA [0x68.3a50.0], current log tail at RBA [0x68.3aa8.0]
Wed Apr 12 13:14:24 2017
Incremental checkpoint up to RBA [0x68.5567.0], current log tail at RBA [0x68.55b5.0]

     而fast_start_mttr_target=3600,log_checkpoint_timeout=3600,日志上实际也每小时做一次增量检查点
     那么fast_start_mttr_target参数感觉跟理解的不一样



回复

使用道具 举报

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-4-12 16:09:58 | 显示全部楼层
上课时说过,两个参数代表两代历史,参数log_checkpoint_timeout的默认值现在不要去改它。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-4 16:25 , Processed in 0.046214 second(s), 25 queries .

快速回复 返回顶部 返回列表