偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

LMSn沒有運(yùn)行在RT (real time) 模式Oracle 19c RAC?

數(shù)據(jù)庫 Oracle
Oracle希望在數(shù)據(jù)庫主機(jī)CPU使用率枯竭時(shí),盡可能讓核心的幾個(gè)后臺(tái)進(jìn)程可以最大優(yōu)先級獲取CPU, 當(dāng)然CPU過高會(huì)導(dǎo)致I/O 響應(yīng)時(shí)間變長和網(wǎng)絡(luò)延遲增加,也會(huì)間接影響數(shù)據(jù)的整體性能。

[[413582]]

本文轉(zhuǎn)載自微信公眾號「數(shù)據(jù)和云」,作者張維照 。轉(zhuǎn)載本文請聯(lián)系數(shù)據(jù)和云公眾號。

Oracle希望在數(shù)據(jù)庫主機(jī)CPU使用率枯竭時(shí),盡可能讓核心的幾個(gè)后臺(tái)進(jìn)程可以最大優(yōu)先級獲取CPU, 當(dāng)然CPU過高會(huì)導(dǎo)致I/O 響應(yīng)時(shí)間變長和網(wǎng)絡(luò)延遲增加,也會(huì)間接影響數(shù)據(jù)的整體性能。

從Oracle 10g開始是有隱藏參數(shù)_high_priority_processes控制哪些進(jìn)程是高優(yōu)先級,19c參數(shù)中除了_high_priority_processes,還增加了_highest_priority_processes控制高優(yōu)先級。在10.2版本中,Oracle缺少_high_priority_processes對RAC的核心進(jìn)程LMS*設(shè)置高優(yōu)先級,在11g版本中對LMS*|VKTM設(shè)置高優(yōu)先級,在19c版本中_highest_priority_processes對VKTM是最高優(yōu)先級,且提供了更多對LMS*|LM*|LCK0|GCR*|CKPT|DBRM|RMS0|LGWR|CR*|RMV*配置高優(yōu)先級 。

記得在10.2.0.3前有個(gè)bug會(huì)導(dǎo)致使用CPU進(jìn)程過高。最近有客戶19c RAC遇到CPU使用率超過90%時(shí)GC問題較為突出,在查看LMS時(shí),沒有在RT模式的狀態(tài)引起了注意,在19c中LMS還是有一些變化,下面進(jìn)行了簡單的記錄。

在Linux平臺(tái)上,進(jìn)程的內(nèi)核調(diào)用模式分為三類:

  • TS – SCHED_OTHER (SCHED_NORMAL) ,這是分時(shí)調(diào)度策略,缺省的通用級別;
  • FF – SCHED_FIFO,這是實(shí)時(shí)調(diào)度策略,先進(jìn)先出;
  • RR – SCHED_RR,實(shí)時(shí)調(diào)度策略,時(shí)間片輪轉(zhuǎn);

先看一個(gè)正常環(huán)境 Oracle 19c RAC 2-nodes on RHEL 7.8

db alert log

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

Note:

使用ps-c選項(xiàng)查看進(jìn)程優(yōu)先級時(shí), vktm是RR mode。

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

Note:

使用ps-c選項(xiàng)查看進(jìn)程優(yōu)先級時(shí),lms還是TS Mode。在12c版本及之前PS也是顯示RR mode,如下:

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

檢查oradism文件

  1. oracle@anbob_com:/home/oracle> ls -l $ORACLE_HOME/bin/oradism 
  2. -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文件系統(tǒng)掛載點(diǎn)

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

正常。

AWR中LMS

  1. RAC Statistics 
  2. Begin   End  
  3. Number of Instances:    2   2 
  4. Number of LMS’s:    12  12 
  5. Number of realtime LMS’s:   12  12  (0 priority changes) 

檢查后臺(tái)進(jìn)程

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

種種顯示當(dāng)前LMS進(jìn)程是RT模式,但PS顯示進(jìn)程還是TS,難道是顯示問題?還是Oracle有新特性改變?

答案是的確發(fā)生了新變化,從18c開始LMS進(jìn)程改為線程模式。

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

OK.

再看另一個(gè)問題環(huán)境Oracle 19.4 2-nodes RAC on RHEL 7.5

  1. RAC Statistics 
  2. Begin   End  
  3. Number of Instances:    2   2 
  4. Number of LMS’s:    40  40 
  5. Number of realtime LMS’s:   0   0   (0 priority changes) 
  6.  
  7. SQL> select * from v$bgprocess where name like 'LMS%'
  8. PADDR              PSERIAL# NAME  DESCRIPTION                      PRIORITY     CON_ID 
  9. ---------------- ---------- ----- -------------------------------- -------- ---------- 
  10. 0000001E01B628A0          1 LMS0  global cache service process     TS                0 
  11. 0000001E01B65360          1 LMS7  global cache service process     TS                0 
  12. 0000001E01B67E20          1 LMSE  global cache service process     TS                0 
  13. 0000001E01B6A8E0          1 LMSL  global cache service process     TS                0 
  14. 0000001E01B6D3A0          1 LMSS  global cache service process     TS                0 
  15. 0000001E01B6FE60          1 LMSZ  global cache service process     TS                0 
  16. 0000001E21AC8498          1 LMS3  global cache service process     TS                0 
  17. 0000001E21ACAF58          1 LMSA  global cache service process     TS                0 
  18. 0000001E21ACDA18          1 LMSH  global cache service process     TS                0 
  19. 0000001E21AD04D8          1 LMSO  global cache service process     TS                0 
  20. 0000001E21AD2F98          1 LMSV  global cache service process     TS                0 
  21. 0000001E41A66B58          1 LMS6  global cache service process     TS                0 
  22. ... 

db alert log

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

Note:

這套環(huán)境的LMS進(jìn)程運(yùn)行在TS模式,是因?yàn)樵趯?shí)例啟動(dòng)時(shí)遇到了ORA-800錯(cuò)誤[Set Priority Failed]失敗了。

檢查oradism

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

對于這個(gè)環(huán)境的owner和權(quán)限都是錯(cuò)的,修正后重啟實(shí)例就可以解決。

也可以root用戶使用chrt在線修改進(jìn)程為RR mode。

  1. # chrt -r -p 1 [lms pid] 

關(guān)于作者

 

張維照,云和恩墨技術(shù)總監(jiān),Oracle ACE-A。2006年起從事數(shù)據(jù)庫管理工作,2009年起從事ORACLE DBA維護(hù)工作,十余年來專注于Database 技術(shù)和架構(gòu)的研究,熱衷于oracle數(shù)據(jù)庫故障診斷、性能優(yōu)化、內(nèi)部原理、新特性的學(xué)習(xí)與分享,在BLOG分享大量的學(xué)習(xí)和案例經(jīng)驗(yàn)。從事過多套TB級省級工商、醫(yī)療、交通、人社、政府、電信運(yùn)營商等行業(yè)數(shù)據(jù)庫項(xiàng)目從業(yè)經(jīng)驗(yàn)。

 

責(zé)任編輯:武曉燕 來源: 數(shù)據(jù)和云
相關(guān)推薦

2023-10-10 09:26:18

2022-08-03 08:03:01

OracleRPM形式

2023-09-04 08:44:00

2010-04-14 17:57:52

Oracle數(shù)據(jù)庫

2022-01-19 08:33:17

Oracle數(shù)據(jù)庫AutoUpgrad

2023-10-11 08:59:05

2022-01-13 08:30:06

Convert Datoracle數(shù)據(jù)庫

2017-09-20 16:29:19

2018-12-16 16:21:08

HadoopKubernetes容器

2010-05-07 16:13:07

Oracle歸檔模式

2010-03-01 10:24:20

Oracle RAC

2014-01-07 13:07:44

YARN計(jì)算框架

2010-04-12 15:28:38

Oracle RAC

2010-04-22 10:30:11

Oracle RAC

2022-06-20 05:25:54

裂腦Oracle RAC數(shù)據(jù)庫

2013-04-19 09:51:21

HadoopOpenStackSavanna

2010-03-11 14:32:34

Ubuntu Twea

2017-09-05 10:44:51

OracleRAC磁盤

2014-06-11 09:48:00

GroovyAndroid

2019-02-25 08:40:28

Linux磁盤IO
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號