ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle 11g 在solaris 10 上内核参数的设置

Oracle 11g 在solaris 10 上内核参数的设置

原创 Linux操作系统 作者:xchui702 时间:2011-06-22 13:34:11 0 删除 编辑

Solaris 8,9 内核参数的设置是通过/etc/system来完成的,修改后需要重新启动OS.

Solaris 10 采用资源控制的方法,此时有部分参数在/etc/system中的设置将不再起作用。 Oracle 官方文档的原话如下:

On Solaris 10, verify that the kernel parameters shown in the following table are set to values greater than or equal to the minimum value shown. The table also contains the resource controls that replace the /etc/system file for a specific kernel parameter. As Oracle Database does not set project information when starting proceses, some /etc/system processes that are deprecated but not removed must still be set for Oracle Database.

Note:

On Solaris 10, you are not required to make changes to the /etc/system file to implement the System V IPC. Solaris 10 uses the resource control facility for its implementation. However, Oracle recommends that you set both resource control and /etc/system/ parameters. Operating system parameters not replaced by resource controls continue to affect performance and security on Solaris 10 systems. For further information, contact your Sun vendor.
 
需要设置的参数如下:
Parameter Replaced by Resource Control Minimum Value
noexec_user_stack NA 1
semsys:seminfo_semmni project.max-sem-ids 100
semsys:seminfo_semmns NA 1024
semsys:seminfo_semmsl process.max-sem-nsems 256
semsys:seminfo_semvmx NA 32767
shmsys:shminfo_shmmax project.max-shm-memory 4294967295
shmsys:shminfo_shmmni project.max-shm-ids 100

 

具体在实施过程中,最好把这些参数都在/etc/systems做设置,也可只设NA相关的条目;然后对于非NA项目更改project,进行资源控制。

对于/etc/system设置如下:

set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=25600
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10

对于project 设置如下:

id -p oracle

uid=1001(oracle) gid=101(oradba) projid=3(default)
看出它使用的default的project.

创建一个project, 用来控制oracle 的用户资源

#:/export/home/oracle\> projadd -U oracle user.oracle

 

永久性的设置一下资源控制:

projmod -sK "project.max-shm-memory=(privileged,4G,deny)" user.oracle projmod -sK "project.max-shm-ids=(privileged,100,deny)" user.oracle
projmod -sK "process.max-sem-nsems=(privileged,256,deny)" user.oracle
projmod -sK "project.max-sem-ids=(privileged,100,deny)" user.oracle

查看设置的结果:

root@# # cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.oracle:100::oracle::process.max-sem-nsems=(privileged,256,deny);project.max-sem-ids=(privileged,100,deny);project.max-shm-ids=(privileged,100,deny);project.max-shm-memory=(privileged,4294967296,deny)

验证修改结果:

#:/export/home/oracle\> prctl -n project.max-shm-memory -i process $$
process: 24431: -bash
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged      4.00GB      -   deny                                 -

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/674865/viewspace-700482/,如需转载,请注明出处,否则将追究法律责任。

下一篇: Oracle PGA 的使用
请登录后发表评论 登录
全部评论

注册时间:2011-05-16

  • 博文量
    38
  • 访问量
    121415