Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2837773
  • 博文数量: 599
  • 博客积分: 16398
  • 博客等级: 上将
  • 技术积分: 6875
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-30 12:04
个人简介

WINDOWS下的程序员出身,偶尔也写一些linux平台下小程序, 后转行数据库行业,专注于ORACLE和DB2的运维和优化。 同时也是ios移动开发者。欢迎志同道合的朋友一起研究技术。 数据库技术交流群:58308065,23618606

文章分类

全部博文(599)

文章存档

2014年(12)

2013年(56)

2012年(199)

2011年(105)

2010年(128)

2009年(99)

分类: Oracle

2012-12-25 15:16:46

在操作系统上我们可以通过renice命令来设置进程的优先级,使得进程能优先获得CPU时间片。
ORACLE里有个参数_high_priority_processes 也可以有限设置进程的优先级,一般我们可能为将LGWR
进程加入到这个参数里面。

在我的RAC测试环境中,这个参数将LMS进程加入进来。


SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
  2   FROM x$ksppi x, x$ksppcv y
  3   WHERE x.inst_id = USERENV ('Instance')
  4   AND y.inst_id = USERENV ('Instance')
  5   AND x.indx = y.indx
  6  AND x.ksppinm LIKE '%_high_priority_processes%'
  7  /

NAME                           VALUE      DESCRIB
------------------------------ ---------- ------------------------------
_high_priority_processes       LMS*       High Priority Process Name Mask                                          
如果LMS进程如果长时间没有得到CPU时间片,很有可能发生脑裂,优先得到CPU时间片,就可以减少发生脑裂的概率。

如果需要设置多个进程,多个进程之间用|分割,*代表通配符。
如下:

SQL> alter system set "_high_priority_processes"='LMS*|LGWR|PMON' scope=spfile;

System altered.

SQL> startup force nomount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area 1.0737E+10 bytes
Fixed Size                  2101912 bytes
Variable Size            1.0586E+10 bytes
Database Buffers          134217728 bytes
Redo Buffers               14671872 bytes
SQL> show parameter _high_priority_processes

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
_high_priority_processes             string
LMS*|LGWR|PMON
SQL> set linesize 100
SQL> _high_priority_processes
SP2-0734: unknown command beginning "_high_prio..." - rest of line ignored.
SQL> show parameter _high_priority_processes

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
_high_priority_processes             string                 LMS*|LGWR|PMON


阅读(2646) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~