暂无图片
19.4 row cache mutex / pin S wait on X 大量CPU阻塞
我来答
分享
张冲
2020-07-01
19.4 row cache mutex / pin S wait on X 大量CPU阻塞
暂无图片 10M

19.4 rac 出现大量等待事件:row cache mutex / pin S wait on X ,awr在附件

现环境参数 session_cached_cursors 为50,且每个instance 使用率为 100%

image.png

请问有大佬有好的方法解决问题吗

我来答
添加附件
收藏
分享
问题补充
6条回答
默认
最新
张冲
暂无图片 评论
暂无图片 有用 0
张冲
上传附件:awr.html
暂无图片 评论
暂无图片 有用 0
Moone

1、你这个库硬解析较高,和session_cached_cursors没关系(66.3/s)
2、主要blocking_session是220,等待事件为cursor: pin S wait on X
image.png
从ash参数看:
image.png
SQL> SELECT decode(trunc(&&P3/4294967296),
2 0,trunc(&&P3/65536),
3 trunc(&&P3/4294967296)) LOCATION_ID
4 FROM dual;
Enter value for p3: 21474836480
old 1: SELECT decode(trunc(&&P3/4294967296),
new 1: SELECT decode(trunc(21474836480/4294967296),
old 2: 0,trunc(&&P3/65536),
new 2: 0,trunc(21474836480/65536),
old 3: trunc(&&P3/4294967296)) LOCATION_ID
new 3: trunc(21474836480/4294967296)) LOCATION_ID

LOCATION_ID

      5

SQL> SELECT MUTEX_TYPE, LOCATION
2 FROM x$mutex_sleep
3 WHERE mutex_type like ‘Cursor Pin%’
4 and location_id=&&LOCATION_ID;
Enter value for location_id: 5
old 4: and location_id=&&LOCATION_ID
new 4: and location_id=5

MUTEX_TYPE

LOCATION

Cursor Pin
kkslce [KKSCHLPIN2]

SQL> SELECT decode(trunc(&&P2/4294967296),
2 0,trunc(&&P2/65536),
3 trunc(&&P2/4294967296)) SID_HOLDING_MUTEX
4 FROM dual;
Enter value for p2: 944892805120
old 1: SELECT decode(trunc(&&P2/4294967296),
new 1: SELECT decode(trunc(944892805120/4294967296),
old 2: 0,trunc(&&P2/65536),
new 2: 0,trunc(944892805120/65536),
old 3: trunc(&&P2/4294967296)) SID_HOLDING_MUTEX
new 3: trunc(944892805120/4294967296)) SID_HOLDING_MUTEX

SID_HOLDING_MUTEX

          220

大量session是220阻塞的,所以要通过ash裸数据看220会话的cursor: pin S wait on X参数是什么?如果也是220,则可能是死锁了!

3、等待row cache mutex的参数
cachid:10,dc_users
image.png
kqrpre - kernel query dictionary/row cache read a parent cache object
kqrGetClusterLock - kernel query dictionary/row cache get a row cache lock in cluster mode (cluster version of kqrget)
kqreqd - kernel query dictionary/row cache enqueue delete

这个等待可能是cursor: pin S wait on X阻塞的。

建议:
1、通过ash裸数据分析最终阻塞源
2、降低sql硬解析数量。

暂无图片 评论
暂无图片 有用 0
weizhao.zhang (anbob)

Bug 30623138

暂无图片 评论
暂无图片 有用 0
张冲

谢谢各位大佬解答

暂无图片 评论
暂无图片 有用 0
Uncopyrightable

有得解释是,21C以后版本解决游标问题,或者更新最新补丁试试;

https://www.modb.pro/doc/21113

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
附件列表
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏