Oracle Wait Interface学习笔记(3) Common Wait Events(5)

(OWI学习笔记索引)

Common wait Events in RAC

Global cache cr request

When a session is looking for a consistent read (CR) copy of the buffer cached by the remote instance, it waits on the global cache cr request event till the buffer is available in the local instance. Normally the holder constructs the CR version of the buffer and ships it to the requesting instance through the high speed interconnect.

10g开始,global cache cr request更名为gc cr request waits.

该事件可能存在以下几种情况:

l   所需bufferCR copy被发送到提交requestinstance, v$sysstat中的globalcache cr blocks received统计数量增1

l   If the buffer is not cached by the remote instance (but mastered by the remote instance),远程instance将该buffer的权限赋予request instance. Session就能够从磁盘直接读取该数据块,global cache gets统计数量增1

l   如果该buffercr copy数量达到了_fairness_threshold参数的限制,the remote instance downgrades the lock to null mode and flushes the redo to the disk. The session can do the disk I/O to get the block from the disk.

关于参数_FAIRNESS_THRESHOLD的解释:

The behavior. of the write-to-read transfer is determined by the _FAIRNESS_THRESHOLD parameter,which was introduced in Oracle 8.1.5 and defaults to 4. Prior to the introduction of this parameter,when Instance A held a block in exclusive mode and Instance B requested a read-only copy of that block, Instance A would downgrade its exclusive lock to a shared lock and send the block to Instance B,which would also set a shared lock on the block. However, if Instance A is performing frequent updates on the block, it will need to reacquire the block and set an exclusive lock again. If this process is repeated frequently, then Instance A will be continually interrupted, as it has to downgrade the exclusive lock to a shared lock and wait until Instance B has finished reading the block before it can convert the shared lock back into an exclusive lock.
The _FAIRNESS_THRESHOLD parameter modifies this behavior. When this parameter is set,Instance A will no longer downgrade the exclusive lock. Instead, it sends a null lock to Instance B,and then it can continue processing. However, if instance B requests the block _FAIRNESS_THRESHOLD times, by default 4, then Instance A will revert to the original behavior—it will downgrade the exclusive lock to a shared lock and ship the block to Instance B, which will also set a shared lock on the block.

如果遇到RAC中的global cache cr request等待事件过长的情况,可以考虑

alter system set "_fairness_threshold" = 3
or even lower, like 1, or 0 to disable downgrading the lock.
Record the data_requests and fairness_down_converts in v$cr_block_server before and after the change. (After the change, let the database run for a while and record the numbers.)
Note:181489.1 Tuning Inter-Instance Performance in RAC and OPS

后两种情况,在global cache cr requtest事件后一般会出现db file sequential reads and/or db file scattered read waits.

参数:P1-file number,P2-block number,P3-lock element number

查看内部参数的方法:

select
  x.ksppinm  name,
  y.ksppstvl  value,
  y.ksppstdf  isdefault,
  decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE')  ismod,
  decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE')  isadj
from
  sys.x$ksppi x,  sys.x$ksppcv y
where
  x.inst_id = userenv('Instance') and
  y.inst_id = userenv('Instance') and
  x.indx = y.indx and
  x.ksppinm like '%_&par%'
order by
  translate(x.ksppinm, ' _', ' ');
/

 

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

转载于:http://blog.itpub.net/55472/viewspace-433002/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值