Oracle12.2版本中后台进程 SCM0 CPU 100% 问题

DLM(Distributed Lock Management ) 统计收集和管理子进程(SCM0)负责收集和管理与全局排队服务(GES:global enqueue service)和全局缓存服务(GCS: global cache service)相关的统计信息。如果在数据库中启用了DLM统计信息收集时,ora_scm0_sid进程才会存在。

在12.2版本,即使默认启用了收集 DLM statistics,但在该版本中也禁用了使用这些统计服务相关的功能。就像是先占个坑之余,还会额外占用资源 显著的现象就是scm0进程占用CPU 100% (Bug 24713002 : 'RAC PERF: SCM0 GETS VERY BUSY DURING CACHE FUSION, EVERY FG KJBCROPEN POSTS SCM0' )

问题现象

ps -ef|grep ora_scm0 |grep -v grep

top -p <scm pid>

处理措施

检查配置参数

select * from (
select x.ksppinm param, y.ksppstvl value
from x$ksppi x , x$ksppcv y
where x.indx = y.indx
and x.ksppinm like '\_%' escape '\'
order by x.ksppinm
) where param ='_dlm_stats_collect';

调整

-- 关闭DLM
alter system set "_dlm_stats_collect" = 0 scope = spfile sid = '*';

重启DB服务

在线上环境中,不能立刻重启DB服务的情形中,可以通过执行kill -9 <os pid of SCM0>命令终止SCM0进程,它会重新生成一个新进程

检查确认

select * from (
select x.ksppinm param, y.ksppstvl value
from x$ksppi x , x$ksppcv y
where x.indx = y.indx
and x.ksppinm like '\_%' escape '\'
order by x.ksppinm
) where param ='_dlm_stats_collect';

推荐配置

建议在安装12C R2时关闭DLM

alter system set "_dlm_stats_collect" = 0 scope = spfile sid = '*';

附录

参考文档

12.2 RAC DB Background process SCM0 consuming excessive CPU (Doc ID 2373451.1)

原文地址:https://www.cnblogs.com/binliubiao/p/15639854.html