gc current block pin time gc current block flush time 疑惑

非常简单的记录,没有可读性,留作一个疑惑。


第一个节点更新数据块
第二个节点更新同样的数据块
由于是更新操作,因此需要块的current block
第二个节点像第一个节点要求current block,再发送前,第一个节点需要pin住此块,把log buffer内的内容写磁盘。
统计量里的gc current block pin time gc current block flush time分别对应了此种情况。但是我模拟的情况,发现并没有发生统计量的增加。


节点1:
test@ILSP>select
  2          statistic#,
  3          name,
  4          value
  5  from
  6          v$sysstat where statistic# in (215,216);


STATISTIC# NAME                                                                  VALUE
---------- ---------------------------------------------------------------- ----------
       215 gc current block pin time                                                68
       216 gc current block flush time                                            7019


test@ILSP>        update t_one set v1='10' where n1=265 and rownum=1;


1 row updated.


test@ILSP>
test@ILSP>select
  2          statistic#,
  3          name,
  4          value
  5  from
  6          v$sysstat where statistic# in (215,216);


STATISTIC# NAME                                                                  VALUE
---------- ---------------------------------------------------------------- ----------
       215 gc current block pin time                                                68
       216 gc current block flush time                                            7019


节点2:       
test@ILSP>select
  2          statistic#,
  3          name,
  4          value
  5  from
  6          v$sysstat where statistic# in (215,216);


STATISTIC# NAME                                                                  VALUE
---------- ---------------------------------------------------------------- ----------
       215 gc current block pin time                                                67
       216 gc current block flush time                                            6906


test@ILSP>        update t_one set v1='10' where n1=266 and rownum=1;


1 row updated.


test@ILSP>
test@ILSP>select
  2          statistic#,
  3          name,
  4          value
  5  from
  6          v$sysstat where statistic# in (215,216);


STATISTIC# NAME                                                                  VALUE
---------- ---------------------------------------------------------------- ----------
       215 gc current block pin time                                                67
       216 gc current block flush time                                            6906
       
但是,另一个场景却发生了:       


test@ILSP>begin
  2  for i in 1 ..100000 loop
  3  UPDATE  wxh_tbd SET object_name=20 where rowid='AAAVaMAAEAAABDjAAA';
  4  commit write immediate wait;
  5  end loop;
  6  end;
  7  /




test@ILSP>begin
  2  for i in 1 ..10000 loop
  3  UPDATE  wxh_tbd SET object_name=20 where rowid='AAAVaMAAEAAABDjAAB';
  4  commit write immediate wait;
  5  end loop;
  6  end;
  7  /


sys@ILSP>select
  2          statistic#,
  3          name,
  4          value
  5  from
  6          v$sysstat where statistic# in (215,216);


STATISTIC# NAME                                                                  VALUE
---------- ---------------------------------------------------------------- ----------
       215 gc current block pin time                                                72
       216 gc current block flush time                                            7502


2 rows selected.


sys@ILSP>/


STATISTIC# NAME                                                                  VALUE
---------- ---------------------------------------------------------------- ----------
       215 gc current block pin time                                                73
       216 gc current block flush time                                            7545


2 rows selected.


sys@ILSP>/


STATISTIC# NAME                                                                  VALUE
---------- ---------------------------------------------------------------- ----------
       215 gc current block pin time                                                73
       216 gc current block flush time                                            7570


2 rows selected.


sys@ILSP>/


STATISTIC# NAME                                                                  VALUE
---------- ---------------------------------------------------------------- ----------
       215 gc current block pin time                                                74
       216 gc current block flush time                                            7591


我的版本是11.2.0.3,我的猜想,可能是ORACLE做了优化,再发送current block前检查下对应的日志有没有写磁盘,如果已经写磁盘了,就不需要再去做pin和flush的操作了。
       

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

转载于:http://blog.itpub.net/22034023/viewspace-1427402/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值