隐藏参数_high_priority_processes与oradism

来源:互联网 发布:象过河仓库软件免费版 编辑:程序博客网 时间:2024/05/16 23:38

转载连接:http://www.askmaclean.com/archives/%E9%9A%90%E8%97%8F%E5%8F%82%E6%95%B0_high_priority_processes%E4%B8%8Eoradism.html

运行在操作系统上的进程存在2种系统时序优先级模式:即 实时模式 Real Time(RT) mode, 与分时模式 Time Sharing(TS) mode.
绝大多数Oracle进程运行在TS模式下:

[oracle@rh1 ~]$ ps -efc|grep ora_|grep -v greporacle    8510     1 TS   23 Mar27 ?        00:00:02 ora_pmon_PRODoracle    8512     1 TS   23 Mar27 ?        00:00:00 ora_psp0_PRODoracle    8514     1 TS   23 Mar27 ?        00:00:00 ora_mman_PRODoracle    8516     1 TS   23 Mar27 ?        00:00:02 ora_dbw0_PRODoracle    8518     1 TS   23 Mar27 ?        00:00:04 ora_lgwr_PRODoracle    8520     1 TS   23 Mar27 ?        00:00:04 ora_ckpt_PRODoracle    8522     1 TS   23 Mar27 ?        00:00:08 ora_smon_PRODoracle    8524     1 TS   23 Mar27 ?        00:00:00 ora_reco_PRODoracle    8526     1 TS   23 Mar27 ?        00:00:34 ora_cjq0_PRODoracle    8528     1 TS   23 Mar27 ?        00:00:06 ora_mmon_PRODoracle    8530     1 TS   24 Mar27 ?        00:00:07 ora_mmnl_PRODoracle    8538     1 TS   23 Mar27 ?        00:00:00 ora_arc0_PRODoracle    8540     1 TS   23 Mar27 ?        00:00:00 ora_arc1_PRODoracle    8548     1 TS   23 Mar27 ?        00:00:00 ora_qmnc_PRODoracle    8555     1 TS   23 Mar27 ?        00:00:00 ora_q000_PRODoracle    8559     1 TS   23 Mar27 ?        00:00:00 ora_q001_PRODoracle   30500     1 TS   23 22:10 ?        00:00:00 ora_j000_PROD

如上所示所有进程均运行在TS模式下且priority均为23|24.
Oracle一般不推荐使用RT模式,因为虽然个别进程可以通过这种方式获得更多的CPU资源,但往往系统的瓶颈并非CPU,即尽管CPU使用率高了,但实际系统TPS并未得到提升。
在10gr2版本后RAC中的LMS进程成为唯一一个使用RT模式的Oracle进程,我们可以通过查询参数_high_priority_processes了解相关信息:

SQL> col name format a40SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE  2   FROM SYS.x$ksppi x, SYS.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 '%priority%';NAME                                     VALUE---------------------------------------- ----------_high_priority_processes                 LMS*_os_sched_high_priority                  1

_high_priority_processes通过进程功能名进行匹配,下面我们将提高LGWR及PMON进程的优先级:

SQL> alter system set "_high_priority_processes"='LMS*|LGWR|PMON' scope=spfile;System altered.SQL> startup force;ORACLE instance started.Total System Global Area  281018368 bytesFixed Size                  2083336 bytesVariable Size             150996472 bytesDatabase Buffers          121634816 bytesRedo Buffers                6303744 bytesDatabase mounted.Database opened.SQL> !ps -efc|grep ora_|grep -v greporacle   31441     1 RR   41 22:50 ?        00:00:00 ora_pmon_PRODoracle   31445     1 TS   23 22:50 ?        00:00:00 ora_psp0_PRODoracle   31447     1 TS   23 22:50 ?        00:00:00 ora_mman_PRODoracle   31449     1 TS   23 22:50 ?        00:00:00 ora_dbw0_PRODoracle   31451     1 RR   41 22:50 ?        00:00:00 ora_lgwr_PRODoracle   31455     1 TS   23 22:50 ?        00:00:00 ora_ckpt_PRODoracle   31457     1 TS   23 22:50 ?        00:00:00 ora_smon_PRODoracle   31459     1 TS   22 22:50 ?        00:00:00 ora_reco_PRODoracle   31461     1 TS   23 22:50 ?        00:00:01 ora_cjq0_PRODoracle   31463     1 TS   23 22:50 ?        00:00:01 ora_mmon_PRODoracle   31465     1 TS   24 22:50 ?        00:00:00 ora_mmnl_PRODoracle   31471     1 TS   24 22:50 ?        00:00:00 ora_p000_PRODoracle   31473     1 TS   24 22:50 ?        00:00:00 ora_p001_PRODoracle   31475     1 TS   24 22:50 ?        00:00:00 ora_arc0_PRODoracle   31477     1 TS   22 22:50 ?        00:00:00 ora_arc1_PRODoracle   31481     1 TS   23 22:50 ?        00:00:00 ora_qmnc_PRODoracle   31488     1 TS   23 22:50 ?        00:00:00 ora_q000_PRODoracle   31490     1 TS   23 22:50 ?        00:00:00 ora_q001_PRODoracle   31500     1 TS   23 22:50 ?        00:00:00 ora_j000_PROD

好了lgwr和pmon进程也进入实时模式了,同时priority值上升到了41.
注意:
Oracle默认仅允许LMS进程(11g中多了VKTM进程)使用RT模式是有它的原因的,所以如果不是Oracle support 推荐,您没有任何修改隐式参数的理由。
其次根据Oracle文档[ID 602419.1]的描述,oradism文件(该文件位于$ORACLE_HOME/bin目录下)不正确的权限将导致RT模式无法被正确使用,该文件默认属于root用户并具有s权限。如下测试:

[oracle@rh1 bin]$ ls -la oradism-r-sr-s---  1 root oinstall 14931 Mar 11  2008 oradism[oracle@rh1 bin]$ su - rootPassword:[root@rh1 ~]# chown oracle:oinstall /s01/oracle/product/10.2.0/db_1/bin/oradism[root@rh1 ~]# exitlogout[oracle@rh1 bin]$ ls -la oradism-r-xr-x---  1 oracle oinstall 14931 Mar 11  2008 oradism[oracle@rh1 bin]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.4.0 - Production on Sun Mar 28 23:07:03 2010Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startup;ORACLE instance started.Total System Global Area  281018368 bytesFixed Size                  2083336 bytesVariable Size             150996472 bytesDatabase Buffers          121634816 bytesRedo Buffers                6303744 bytesDatabase mounted.Database opened.SQL> col name format a35;SQL> col value format a10;SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE  2   FROM SYS.x$ksppi x, SYS.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 '%priority%';NAME                                VALUE----------------------------------- ----------_high_priority_processes            LMS*|LGWR|PMON_os_sched_high_priority             1SQL> !ps -efc|grep ora_|grep -v greporacle   31994     1 TS   23 23:07 ?        00:00:00 ora_pmon_PRODoracle   31998     1 TS   23 23:07 ?        00:00:00 ora_psp0_PRODoracle   32000     1 TS   23 23:07 ?        00:00:00 ora_mman_PRODoracle   32002     1 TS   23 23:07 ?        00:00:00 ora_dbw0_PRODoracle   32004     1 TS   24 23:07 ?        00:00:00 ora_lgwr_PRODoracle   32008     1 TS   22 23:07 ?        00:00:00 ora_ckpt_PRODoracle   32010     1 TS   23 23:07 ?        00:00:00 ora_smon_PRODoracle   32012     1 TS   22 23:07 ?        00:00:00 ora_reco_PRODoracle   32014     1 TS   23 23:07 ?        00:00:01 ora_cjq0_PRODoracle   32016     1 TS   23 23:07 ?        00:00:01 ora_mmon_PRODoracle   32018     1 TS   24 23:07 ?        00:00:00 ora_mmnl_PRODoracle   32026     1 TS   24 23:07 ?        00:00:00 ora_arc0_PRODoracle   32028     1 TS   23 23:07 ?        00:00:00 ora_arc1_PRODoracle   32032     1 TS   23 23:07 ?        00:00:00 ora_qmnc_PRODoracle   32045     1 TS   23 23:07 ?        00:00:00 ora_q000_PRODoracle   32065     1 TS   23 23:08 ?        00:00:00 ora_q001_PRODoracle   32072     1 TS   23 23:08 ?        00:00:00 ora_j000_PROD

that’s great, 显然oradism不仅为Oracle实例提供了内存资源控制功能,还包括了进程优先级分配的权限。
我们应当再次声明hidden parameter不应“滥用”于production environment.


0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 指环扣松了怎么办图解 塑料放久了发粘怎么办 橡胶时间久了粘怎么办 胶的手机套变黄怎么办 手机壳硅胶变黄怎么办 硅胶手机壳大了怎么办 硅胶手机壳变大了怎么办 硅胶手机壳有点大怎么办 硅胶手机壳粘手怎么办 透明手机壳变黄怎么办? 耳机胶套经常掉怎么办 硅胶手机壳粘毛怎么办 耳机海绵套坏了怎么办 沙发垫海绵坏了怎么办 汽车坐海绵坏了怎么办 苹果手机边框有缝隙怎么办 孕期牙套子掉了怎么办 平果充电线不匹配怎么办 苹果六外壳掉漆怎么办 苹果平板充电没反应怎么办 苹果平板黑屏没反应怎么办 苹果平板卡机了怎么办 苹果7plus掉漆怎么办 皮的手机壳脏了怎么办 小米5x边边裂开怎么办 荣耀8的后盖摔了怎么办 hp打印机卡了纸怎么办 华为荣耀9进水了怎么办 小米5x屏幕脱胶怎么办 小米5x后盖松动怎么办 苹果手机没电了怎么办 荣耀9的后盖裂了怎么办 手机一直在开机画面怎么办华为 华为手机一直显示开机画面怎么办 华为p7手机开不了机怎么办 华为荣耀8弯了怎么办 手机壳掉漆了怎么办 华为5a手机音量小怎么办 华为5a手机声音小怎么办 苹果屏幕磨花了怎么办 白色磨砂手机壳脏了怎么办