隐藏参数_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.
- 隐藏参数_high_priority_processes与oradism
- _high_priority_processes进程的优先级设置
- 函数重载,覆盖与隐藏;参数缺省值;运算符重载
- 隐藏URL参数
- 如何隐藏地址栏参数
- oracle隐藏参数查询
- 查看oracle隐藏参数
- 获取Oracle隐藏参数
- 查看oracle 隐藏参数
- IE8 隐藏命令行参数
- oracle查看隐藏参数
- oracle 查看隐藏参数
- 隐藏参数this
- oracle parameter-隐藏参数
- Oracle 查看隐藏参数
- 查看隐藏参数
- 查询隐藏参数
- oracle查看隐藏参数
- JAVA基础:八进制,十六进制表示
- 2.动态setBackground后导致Padding无效。
- atoi函数源代码
- 排序1+5:各种排序算法的总结和比较
- 图像放大并进行BiCubic插值 Matlab/C++代码
- 隐藏参数_high_priority_processes与oradism
- pyton+eclipse开发环境建立笔记
- 在Shell里面判断字符串是否为空 ,文件存在,目录存在
- ADO 驱动 Microsoft Data Access Components (MDAC) 2.8 SP1
- Struts2多文件上传
- 如何将pps转换成ppt?
- 姚笛出轨门后未影响拍戏《飞哥大英雄》
- 迭代器模式
- 用C语言在NDS上编写程序