暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle7.3.4 Checkpoint行为研究

原创 eygle 2006-02-20
867

于检查点的描述,很多文档上大都是简单的一句话,通常是:



When a checkpoint occurs, Oracle must update the headers of all datafiles to record the details of the checkpoint. This is done by the CKPT process. The CKPT process does not write blocks to disk; DBWn always performs that work.



这段描述实际上过于简略了,在不同的版本中,Oracle的检查点策略一直在不断的调整优化,而从Oracle7之后,Oracle不在文档中透漏更多的信息给我们.


在Oracle7中,通过跟踪CKPT进程我们可以看到,当我们手工执行检查点时:









C:\\orant\\BIN>SVRMGR23.EXE
复制

Oracle Server Manager Release 2.3.4.0.0 - Production
复制

Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.
复制

Oracle7 Workgroup Server Release 7.3.4.0.0 - Production
With the distributed option
PL/SQL Release 2.3.4.0.0 - Production
复制

SVRMGR> connect internal
Connected to an idle instance.
SVRMGR> startup
ORACLE instance started.
Total System Global Area      99967716 bytes
Fixed Size                       35760 bytes
Variable Size                 58808116 bytes
Database Buffers              40960000 bytes
Redo Buffers                    163840 bytes
Database mounted.
Database opened.
SVRMGR> alter system checkpoint;
Statement processed. 
复制


Oracle后台CKPT进程如下动作:









WAIT #0: nam='control file sequential read' ela= 0 p1=1 p2=1 p3=1
WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=4 p3=1
WAIT #0: nam='control file parallel write' ela= 0 p1=2 p2=2 p3=2
WAIT #0: nam='control file parallel write' ela= 0 p1=2 p2=2 p3=2
WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=5 p3=1
WAIT #0: nam='db file sequential read' ela= 0 p1=1 p2=1 p3=1
WAIT #0: nam='db file single write' ela= 0 p1=1 p2=1 p3=1
WAIT #0: nam='control file parallel write' ela= 0 p1=2 p2=2 p3=2
WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=6 p3=1
WAIT #0: nam='control file sequential read' ela= 0 p1=0 p2=8 p3=1
WAIT #0: nam='db file sequential read' ela= 0 p1=2 p2=1 p3=1
WAIT #0: nam='db file single write' ela= 0 p1=2 p2=1 p3=1
WAIT #0: nam='control file parallel write' ela= 0 p1=2 p2=2 p3=2
WAIT #0: nam='control file parallel write' ela= 0 p1=2 p2=2 p3=2
WAIT #0: nam='db file sequential read' ela= 0 p1=3 p2=1 p3=1
WAIT #0: nam='db file single write' ela= 0 p1=3 p2=1 p3=1
WAIT #0: nam='control file parallel write' ela= 0 p1=2 p2=2 p3=2
WAIT #0: nam='db file sequential read' ela= 0 p1=4 p2=1 p3=1
WAIT #0: nam='db file single write' ela= 0 p1=4 p2=1 p3=1
WAIT #0: nam='control file parallel write' ela= 0 p1=2 p2=2 p3=2
WAIT #0: nam='control file parallel write' ela= 0 p1=2 p2=2 p3=2
WAIT #0: nam='rdbms ipc message' ela= 0 p1=300 p2=0 p3=0 
复制


注意,这里的等待事件 "db file single write" 既是对于数据文件头的更新,以刷新数据文件记录的检查点信息.

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论