点击上方"蓝字"

关注我们,享更多干货!

Oracle希望在数据库主机CPU使用率枯竭时,尽可能让核心的几个后台进程可以最大优先级获取CPU, 当然CPU过高会导致I/O 响应时间变长和网络延迟增加,也会间接影响数据的整体性能。

从Oracle 10g开始是有隐藏参数_high_priority_processes控制哪些进程是高优先级,19c参数中除了_high_priority_processes,还增加了_highest_priority_processes控制高优先级。在10.2版本中,Oracle缺少_high_priority_processes对RAC的核心进程LMS*设置高优先级,在11g版本中对LMS*|VKTM设置高优先级,在19c版本中_highest_priority_processes对VKTM是最高优先级,且提供了更多对LMS*|LM*|LCK0|GCR*|CKPT|DBRM|RMS0|LGWR|CR*|RMV*配置高优先级 。

记得在10.2.0.3前有个bug会导致使用CPU进程过高。最近有客户19c RAC遇到CPU使用率超过90%时GC问题较为突出,在查看LMS时,没有在RT模式的状态引起了注意,在19c中LMS还是有一些变化,下面进行了简单的记录。

在Linux平台上,进程的内核调用模式分为三类:

  • TS – SCHED_OTHER (SCHED_NORMAL) ,这是分时调度策略,缺省的通用级别;

  • FF – SCHED_FIFO,这是实时调度策略,先进先出;

  • RR – SCHED_RR,实时调度策略,时间片轮转;

先看一个正常环境 Oracle 19c RAC 2-nodes on RHEL 7.8

db alert log

Starting background process CLMN
CLMN started with pid=3, OS id=28714
Starting background process PSP0
PSP0 started with pid=4, OS id=28731
Starting background process IPC0
2021-03-23 10:07:32.440000 +08:00
IPC0 started with pid=5, OS id=29420
Starting background process VKTM
Starting background process GEN0
VKTM started with pid=6, OS id=29445 at elevated (RT) priority
VKTM running at (1)millisec precision with DBRM quantum (100)ms
Starting background process MMANStarting background process LMD1
LMD0 started with pid=23, OS id=29631
* Load Monitor used for high load check
* New Low - High Load Threshold Range = [130560 - 174080]
LMS1 started with pid=26, OS id=29640_29663 at elevated (RT) priority
LMS0 started with pid=24, OS id=29635_29662 at elevated (RT) priority
LMS2 started with pid=28, OS id=29646_29666 at elevated (RT) priority
Starting background process LMD2
LMD1 started with pid=36, OS id=29659
LMS3 started with pid=30, OS id=29649_29667 at elevated (RT) priority
LMS4 started with pid=32, OS id=29651_29672 at elevated (RT) priority
LMS5 started with pid=34, OS id=29653_29677 at elevated (RT) priority
Starting background process LMD3
LMD2 started with pid=37, OS id=29681
LMD3 started with pid=38, OS id=29686
Starting background process RMS0
RMS0 started with pid=39, OS id=29689oracle@anbob_com:/home/oracle>  ps -efc|grep vktm
grid      34874      1 RR   41 Jun03 ?        00:06:20 asm_vktm_+ASM1
oracle    42358      1 RR   41 Jun03 ?        00:05:24 ora_vktm_anbob1
grid      58462      1 RR   41 Jun03 ?        00:06:18 mdb_vktm_-MGMTDB

Note:
使用ps-c选项查看进程优先级时, vktm是RR mode。

oracle@anbob_com:/home/oracle> ps -efc|grep lms
oracle    35148  90946 TS   19 16:02 pts/3    00:00:00 grep --color=auto lms
oracle    66573      1 TS   19 May21 ?        04:32:32 ora_lms0_anbob1
oracle    66576      1 TS   19 May21 ?        04:29:41 ora_lms1_anbob1
oracle    66578      1 TS   19 May21 ?        04:26:33 ora_lms2_anbob1
oracle    66581      1 TS   19 May21 ?        04:26:51 ora_lms3_anbob1
oracle    66586      1 TS   19 May21 ?        04:25:38 ora_lms4_anbob1
oracle    66589      1 TS   19 May21 ?        04:28:44 ora_lms5_anbob1
oracle    66596      1 TS   19 May21 ?        04:25:44 ora_lms6_anbob1
oracle    66599      1 TS   19 May21 ?        04:50:02 ora_lms7_anbob1
oracle    66603      1 TS   19 May21 ?        04:22:42 ora_lms8_anbob1
oracle    66609      1 TS   19 May21 ?        04:21:31 ora_lms9_anbob1
oracle    66615      1 TS   19 May21 ?        04:25:41 ora_lmsa_anbob1
oracle    66620      1 TS   19 May21 ?        04:29:43 ora_lmsb_anbob1
grid     129022      1 TS   19 May14 ?        00:36:49 asm_lms0_+ASM1

Note:
使用ps-c选项查看进程优先级时,lms还是TS Mode。在12c版本及之前PS也是显示RR mode,如下:

# sqlplus -V
SQL*Plus: Release 12.2.0.1.0 Production# ps -eLfc |head -n 1;ps -eLfc|grep lms
UID        PID  PPID   LWP NLWP CLS PRI STIME TTY          TIME CMD
grid     14661     1 14661    1 RR   41  2019 ?        1-08:14:40 asm_lms0_+ASM1
oracle   62106     1 62106    1 RR   41  2019 ?        17-22:45:22 ora_lms0_weejar1
oracle   62109     1 62109    1 RR   41  2019 ?        18-10:30:26 ora_lms1_weejar1
oracle   62111     1 62111    1 RR   41  2019 ?        18-00:13:16 ora_lms2_weejar1
oracle   62113     1 62113    1 RR   41  2019 ?        17-22:02:20 ora_lms3_weejar1
oracle   62115     1 62115    1 RR   41  2019 ?        17-22:07:53 ora_lms4_weejar1

检查oradism文件

oracle@anbob_com:/home/oracle> ls -l $ORACLE_HOME/bin/oradism
-rwsr-x--- 1 root oinstall 147848 Apr 17 2019 /oracle/app/oracle/product/19c/db_1/bin/oradism

正常。
Note:
For 10gR2 and 11gR1 installations, verify that the oradism executable matches the following ownership and permissions “-rwsr-sr-x 1 root dba oradism” and make sure the lms is running in Real Time mode.

检查Oracle_HOME文件系统挂载点

oracle@anbob_com:/home/oracle> cat /proc/mounts|grep oracle
/dev/mapper/fusioncube-oracle /oracle ext4 rw,relatime,stripe=16,data=ordered 0 0

正常。

AWR中LMS

RAC Statistics
Begin   End
Number of Instances:    2   2
Number of LMS’s:    12  12
Number of realtime LMS’s:   12  12  (0 priority changes)

检查后台进程

SQL> select 'LMS', INST_ID,PRIORITY,COUNT(*) TOTAL FROM GV$BGPROCESS where name like 'LMS%' GROUP BY INST_ID,PRIORITY ;'LMS'     INST_ID PRIORITY              TOTAL
------ ---------- ---------------- ----------
LMS             1 RT                       12
LMS             2 RT                       12

种种显示当前LMS进程是RT模式,但PS显示进程还是TS,难道是显示问题?还是Oracle有新特性改变?

答案是的确发生了新变化,从18c开始LMS进程改为线程模式。

oracle@anbob_com:/home/oracle> ps -eLfc |head -n 1;ps -eLfc|grep lms
UID         PID   PPID    LWP NLWP CLS PRI STIME TTY          TIME CMD
oracle    66573      1  66573    4 TS   19 May21 ?        00:00:08 ora_lms0_anbob1
oracle    66573      1  66580    4 RR   41 May21 ?        03:15:29 ora_lms0_anbob1
oracle    66573      1  67219    4 TS   19 May21 ?        00:23:08 ora_lms0_anbob1
oracle    66573      1  67240    4 TS   19 May21 ?        00:53:41 ora_lms0_anbob1
oracle    66576      1  66576    4 TS   19 May21 ?        00:00:08 ora_lms1_anbob1
oracle    66576      1  66582    4 RR   41 May21 ?        03:12:36 ora_lms1_anbob1
oracle    66576      1  67270    4 TS   19 May21 ?        00:23:09 ora_lms1_anbob1
oracle    66576      1  67301    4 TS   19 May21 ?        00:53:43 ora_lms1_anbob1
oracle    66578      1  66578    4 TS   19 May21 ?        00:00:08 ora_lms2_anbob1
oracle    66578      1  66591    4 RR   41 May21 ?        03:10:10 ora_lms2_anbob1
oracle    66578      1  67339    4 TS   19 May21 ?        00:22:52 ora_lms2_anbob1
...

OK.

再看另一个问题环境Oracle 19.4 2-nodes RAC on RHEL 7.5

RAC Statistics
Begin   End
Number of Instances:    2   2
Number of LMS’s:    40  40
Number of realtime LMS’s:   0   0   (0 priority changes)SQL> select * from v$bgprocess where name like 'LMS%';
PADDR              PSERIAL# NAME  DESCRIPTION                      PRIORITY     CON_ID
---------------- ---------- ----- -------------------------------- -------- ----------
0000001E01B628A0          1 LMS0  global cache service process     TS                0
0000001E01B65360          1 LMS7  global cache service process     TS                0
0000001E01B67E20          1 LMSE  global cache service process     TS                0
0000001E01B6A8E0          1 LMSL  global cache service process     TS                0
0000001E01B6D3A0          1 LMSS  global cache service process     TS                0
0000001E01B6FE60          1 LMSZ  global cache service process     TS                0
0000001E21AC8498          1 LMS3  global cache service process     TS                0
0000001E21ACAF58          1 LMSA  global cache service process     TS                0
0000001E21ACDA18          1 LMSH  global cache service process     TS                0
0000001E21AD04D8          1 LMSO  global cache service process     TS                0
0000001E21AD2F98          1 LMSV  global cache service process     TS                0
0000001E41A66B58          1 LMS6  global cache service process     TS                0
...

db alert log

2021-06-03T10:50:19.500768+08:00
LMON started with pid=22, OS id=98747
Starting background process LMD0
2021-06-03T10:50:19.527437+08:00
LMD0 started with pid=23, OS id=98749
Starting background process LMD1
2021-06-03T10:50:19.528918+08:00
* Load Monitor used for high load check
* New Low - High Load Threshold Range = [230400 - 307200]
2021-06-03T10:50:19.703222+08:00
Errors in file /u01/oracle/diag/rdbms/anbob1/anbob11/trace/anbob11_lms0_98751_98758.trc  (incident=873064):
ORA-00800: soft external error, arguments: [Set Priority Failed], [LMS0], [Check traces and OS configuration], [Check Oracle document and MOS notes], []
Incident details in: /u01/oracle/diag/rdbms/anbob1/anbob11/incident/incdir_873064/anbob11_lms0_98751_98758_i873064.trc
2021-06-03T10:50:19.711460+08:00
Error attempting to elevate LMS0's priority: no further priority changes will be attempted for this process
LMS0 started with pid=24, OS id=98751_98758
2021-06-03T10:50:19.800751+08:00
Errors in file /u01/oracle/diag/rdbms/anbob1/anbob11/trace/anbob11_lmsd_98808_98825.trc  (incident=873065):
ORA-00800: soft external error, arguments: [Set Priority Failed], [LMSD], [Check traces and OS configuration], [Check Oracle document and MOS notes], []
2021-06-03T10:50:19.815049+08:00
Error attempting to elevate LMSD's priority: no further priority changes will be attempted for this process
LMSD started with pid=50, OS id=98808_98825
2021-06-03T10:50:19.924836+08:00
LMD1 started with pid=104, OS id=98950
2021-06-03T10:50:19.924929+08:00
Starting background process LMD2
2021-06-03T10:50:19.944617+08:00
Errors in file /u01/oracle/diag/rdbms/anbob1/anbob11/trace/anbob11_lmsb_98797_98815.trc  (incident=873066):
ORA-00800: soft external error, arguments: [Set Priority Failed], [LMSB], [Check traces and OS configuration], [Check Oracle document and MOS notes], []
2021-06-03T10:50:19.945838+08:00
Error attempting to elevate LMSB's priority: no further priority changes will be attempted for this process
Starting background process LMD3
2021-06-03T10:50:19.949748+08:00

Note:
这套环境的LMS进程运行在TS模式,是因为在实例启动时遇到了ORA-800错误[Set Priority Failed]失败了。

检查oradism

oracle@anbob1a:/home/oracle/scripts_oracle$ ls -l $ORACLE_HOME/bin/oradism
-rwxr-x--- 1 oracle oinstall 147848 Apr 17 2019 /u01/oracle/product/bin/oradism

对于这个环境的owner和权限都是错的,修正后重启实例就可以解决。

也可以root用户使用chrt在线修改进程为RR mode。

# chrt -r -p 1 [lms pid]

墨天轮原文链接:https://www.modb.pro/db/69811复制链接至浏览器或点击文末阅读原文查看)

关于作者

张维照,云和恩墨技术总监,Oracle ACE-A。2006年起从事数据库管理工作,2009年起从事ORACLE DBA维护工作,十余年来专注于Database 技术和架构的研究,热衷于oracle数据库故障诊断、性能优化、内部原理、新特性的学习与分享,在BLOG分享大量的学习和案例经验。从事过多套TB级省级工商、医疗、交通、人社、政府、电信运营商等行业数据库项目从业经验。

END

推荐阅读:267页!2020年度数据库技术年刊

推荐下载:2020数据技术嘉年华PPT下载

2020数据技术嘉年华近50个PPT下载、视频回放已上传墨天轮平台,可在“数据和云”公众号回复关键词“2020DTC”获得!

你知道吗?我们的视频号里已经发布了很多精彩的内容,快去看看吧!↓↓↓

点击下图查看更多 ↓

云和恩墨大讲堂 | 一个分享交流的地方

长按,识别二维码,加入万人交流社群

请备注:云和恩墨大讲堂

  点个“在看”

你的喜欢会被看到❤

LMSn没有运行在RT (real time) 模式Oracle 19c RAC?相关推荐

  1. oracle19c只使用pdb模式,oracle 19c CDB vs pdb 创建

    概念理解 CDB就是一个容器(或者说实例instance),PDB就是传统的database概念, CDB可以包含多个pdb 来自官方文档:Administrator's Guide--> Mu ...

  2. 怎么在本地运行umi框架的生产模式

    怎么在本地运行umi框架的生产模式 第一种 先使用build进行编译构建, 在webstorm软件上可以在package.json文件上点击运行;或者直接在命令行上敲max build进行构建, 构建 ...

  3. 苹果双系统运行oracle失败,oracle 11gR2 RAC for linux x86_64 grid运行root.sh 失败问题处理...

    昨天一个朋友问到我,在oracle 11gR2 RAC for linux x86_64安装过程中,grid用户运行root.sh在第一节点可以成功,但在第二节点不成功,报错如下: CRS-2674: ...

  4. CentOS Stream 8 安装Oracle 19C (静默模式)

    CentOS Stream 8 安装Oracle 19C (静默模式) 1.提前准备工作 说明:必须严格遵守用户规则去创建目录,否则会导致缺少目录权限进而影响安装! 安装以下软件包最新版本(注意:如果 ...

  5. oracle数据库方案模式,Oracle数据库技术服务方案.doc

    Oracle技术服务方案书 第 PAGE 2 页/总 NUMPAGES 8 页 Oracle数据库技术服务方案 (V1.0) 目录 TOC \o "1-3" \h \z HYPER ...

  6. oracle rac dns 配置,oracle 11gR2 rac scan ip 配置(DNS模式)

    oracle 11gR2 rac scan ip 配置(DNS模式) oracle 11gR2 grid的集群,scan ip 采用的是DNS模式,安装完成后 状态如下: [grid@rac1 bin ...

  7. vi编辑器服务器维护,vi编辑器有哪几种工作模式及如何转换_网站服务器运行维护,vi编辑器,工作模式...

    整理分享一些 Linux思维导图(值得收藏)_网站服务器运行维护 本篇文章整理分享了一些 Linux思维导图(值得收藏).有一定的参考价值,有需要的朋友可以参考一下,希望对大家有所帮助. vi编辑器有 ...

  8. 计算机睡眠状态游戏还在运行,win10睡眠主机还在运行正常嘛_win10睡眠模式主机还运行如何处理-win7之家...

    在运行win10系统过程中,有些用户会给电脑设置睡眠状态,以此保护电脑中硬件的损耗,但是最近有的用户发现自己的win10电脑在进入睡眠模式之后,主机却依旧在运行着,这样就导致设置的睡眠状态毫无意义了, ...

  9. thinksnsv4.6运行php,ThinkSNS开启调试模式

    首先说下开启调试模式完整操作. 1.\config\config.inc.php配置文件中增加两个键值对 'APP_DEBUG' => true, 'SHOW_PAGE_TRACE' => ...

最新文章

  1. 腾讯天衍实验室联合微众银行研发医疗联邦学习 AI利器让脑卒中预测准确率达80%
  2. (Excel)常用函数公式及操作技巧之四:文本与页面设置(二)
  3. 关于she'll脚本中echo -e使用sh命令执会显示参数-e-的问题
  4. 使用ViewModel模式简化WPF TreeView
  5. mac上如何安装oracle,在mac上安装oracle instant client 和 sqlplus
  6. 你想让自己的产品像病毒一样疯传吗
  7. 1.Nginx 简介
  8. MySQL—Install/Remove of the Service Denied
  9. 微信团购小程序怎么做?一般要多少钱?
  10. 韩学东 中科院计算机,视觉导航技术综述医.pdf
  11. PRN(20200908):Frosting Weights for Better Continual Training
  12. php 2个数组并集,php中数组的并集、交集和差集函数介绍_PHP教程
  13. 最小二乘法(Least square method)
  14. Android Google登录接入
  15. 闲置硬盘自制nas私有云_旧笔记本电脑diy nas私有云
  16. BZOJ4833: [Lydsy1704月赛]最小公倍佩尔数-数论
  17. 【Matlab代码】显示多幅图像
  18. opengl纹理颠倒,rgb通道错位等。详解rgba,bgra,argb等内存序
  19. 基于Java毕业设计宠物医院管理系统源码+系统+mysql+lw文档+部署软件
  20. C8051F环境搭建

热门文章

  1. linux 访问驱动器_Linux上的访问控制列表和外部驱动器:您需要了解的内容
  2. raspberry pi_在Raspberry Pi上使用Mathematica进行高级数学运算
  3. asp代理商源代码_广告代理商的源代码是什么样的?
  4. 演变模型_开放组织的演变
  5. 适用于大型项目的TinyCircuits,硬件需求较小
  6. Bootstrap 导入插件
  7. es6 Atomics对象
  8. 计算机病毒小学教师资格证面试,小学信息技术人教版四年级上册第15课《病毒防治及时做》优质课公开课教案教师资格证面试试讲教案...
  9. amd平台linux驱动安装失败,ati闭源驱动安装失败,问题解觉不了。
  10. 2怎么开机_MacBook如何取消开盖自动开机