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

oracle等待事件之gc current multi block request

原创 陈超峰 2020-11-20
3655

gc cr/current multi block request在单实例中,对于全表扫描和快速全索引扫描,oracle会一次性读取多个数据块以节约CPU资源,在RAC中也一样,oracle会将多个数据块读入一个消息,除此之外,它和gc cr/current request等待事件并无区别。

gc cr/current request,该等待事件记录了从其他节点的缓存请求数据的时间,该等待事件较高通常意味着RAC节点间通信速度太慢,或者SQL未经优化导致请求了过多的数据,这也会进一步造成从其他节点读取了不必要的数据,对于前者可以使用oradebug确定RAC通信使用的网络,如下所示:
SQL> oradebug setmypid
Statement processed.
SQL> oradebug ipc
IPC information written to the trace file
SQL> oradebug tracefile_name
/home/u01/app/oracle/diag/rdbms/hnybdb3/hnybdb31/trace/hnybdb31_ora_77771.trc
上述命令会生成一个跟踪文件,其中记录了RAC内联网络使用的协议,
Dumping all vports in virtual queue 0x7fac50162ac8 for context 0x7fac50162098
No virtual ports found for context 0x7fac50162098
Dumping all UDP ports for context 0x7fac50162098
UDP PORT 0x7fac501ad9d8, [MPT.UDP] Dump
ID: 0x0 Type: UDP PT Opts: [] Flags: [MPT], Address: 169.254.29.146:59673, MPT: Yes
Last DataReady time 446065:10:37.725.725920 Last Unrel msg rcvd time 446065:10:37.725.725920
ACNH Dump
PCNH Dump
CTRL SENGINE Dump
Ver: 1 mtu: 0xfde8 pflags: 0x0
min_exp_timer: 100000 max_exp_timer: 3000000 exp_timer_fac: 5
skgxpt: 0x7fac501ada30 flags 0x2
0 ACNHs in pending send list
DATA SENGINE Dump
Ver: 1 mtu: 0xfde8 pflags: 0x0
min_exp_timer: 100000 max_exp_timer: 3000000 exp_timer_fac: 5
skgxpt: 0x7fac501ada30 flags 0x2
0 ACNHs in pending send list
UDP PORT 0x7fac501ad9d8, [MPT.UDP] End Dump

从上述跟踪文件的内容可知,私有网络169.254.29.146被用来作为节点间通信网络,并使用的是UDP。如果Top SQL中有未优化的SQL,需要先进行优化。

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

评论