为Oracle 用户设置shell限制
为提高oracle性能,必须为oracle用户增加下列shell限制:
|
Shell Limit |
Item in limits.conf |
Hard Limit |
|
Maximum number of open file descriptors |
nofile |
65536 |
|
Maximum number of processes available to a single user |
nproc |
16384 |
增加shell 限制:
添加下列行到/etc/security/limits.conf 文件:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
添加或编辑/etc/pam.d/login 文件,当下面的条目不存在时:
session required pam_limits.so
取决于Oracle用户缺省的shell环境,为缺省的shell启动文件作下列更改:
对于Bourne, Bash, or Korn shell, 添加下列行到/etc/profile 文件 (SUSE Linux 则添加到/etc/profile.local):
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
