免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1773 | 回复: 1
打印 上一主题 下一主题

如何知道incremental checkpoint的进度 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-11-19 16:30 |只看该作者 |倒序浏览

有朋友问我:"incremental checkpoint似乎看不见,摸不着,我怎么知道我系统里incremental checkpoint发生的频率呢,或者说我如何才能知道incremental checkpoint的进度?"

首先要说明的是,什么是incremental checkpoint

These disjointed activities
of writing buffers in ascending low RBA order and periodically recording the lowest low RBA in the control file constitute incremental checkpoint

注意这里理解incremental checkpoint最为关键的地方就是上述我标明的两个单词----disjointed activities

接着我们来说上述问题的答案:

Oracle里有一个内存结构X$KCBBES,以indx4的条件去查询上述结构,列reason的值就是当前系统的number of db block buffers written to the disk for incremental checkpoint,换句话说,这就可以用来衡量严格意义上的incremental checkpoint的进度

X$KCBBES = [K]ernel [C]ache [B]uffer Management Buffer Event Statistics

Column

Type

Comments


------------------

------

---------------


ADDR
RAW(4)

Address


INDX

NUMBER
Reason / Priority / Savecode number


INST_ID

NUMBER
Instance id


REASON
NUMBER
Count of buffers written for this REASON


PRIORITY
NUMBER
Count of buffers written at this PRIORITY


SAVECODE
NUMBER
Count of occurrences of return to write buffers

indx的具体含义为:

KCBB_INVALID

0
invalid reason

KCBB_PING

1
Ping write

KCBB_HIPR_CKPT

2
High priority thread checkpoint

KCBB_IRCV_CKPT

3
Instance recovery checkpoint

KCBB_MDPR_CKPT

4
Medium priority thread checkpoint

                                  (typically due to incremental checkpoint)

KCBB_AGING

5
Aging writes

KCBB_MRCV_CKPT

6
Media recovery checkpoint

KCBB_LOPR_CKPT


7
Low priority thread checkpoint

KCBB_TBSP_CKPT

8
Tablespace checkpoint

KCBB_REUSE_OBJ

9
Reuse
object

KCBB_REUSE_RNG
10
Reuse block range

KCBB_DBUF_LMT

11
Limit dirty buffers

我们看一个实际的例子,如下的这个系统中午大家都吃饭去了,很闲,还没有达到触发DBWn进程写dirty buffer的条件,所以Checkpoint Queue上的Checkpoint Position(即low cache RBA)在一段时间内始终没有发生变化:

11:49:52 SQL> select indx,reason from x$kcbbes where indx=4;


INDX
REASON

---------- ----------


4
4404345

11:52:44 SQL> select indx,reason from x$kcbbes where indx=4;


INDX
REASON

---------- ----------


4

4404345

11:56:46 SQL> select indx,reason from x$kcbbes where indx=4;


INDX
REASON

---------- ----------


4
4404345

12:08:33 SQL> select indx,reason from x$kcbbes where indx=4;


INDX
REASON

---------- ----------


4
4404345

即此时的incremental checkpoint虽然也在不停的发生,但从严格意义上说,并不能算真正的incremental checkpoint,因为只是CKPT进程每隔3秒去更新一下control文件(记录下low cache RBA),DBWn进程始终没有写Checkpoint Queue上的dirty buffer(所以low cache RBA没有变化)。

下午1点半,大家吃完饭回来了,开始干活了,真正意义上的incremental checkpoint一下子变得频繁起来:

13:31:17 SQL> select indx,reason from x$kcbbes where indx=4;


INDX
REASON

---------- ----------


4
4404345

13:35:22 SQL> select indx,reason from x$kcbbes where indx=4;


INDX
REASON

---------- ----------


4
4404580

13:38:37 SQL> select indx,reason from x$kcbbes where indx=4;


INDX
REASON

---------- ----------


4
4404583

13:42:15 SQL> select indx,reason from x$kcbbes where indx=4;


INDX
REASON

---------- ----------


4
4409684

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
2 [报告]
发表于 2010-11-19 21:32 |只看该作者
从什么地方转载的啊。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP