Chinaunix首页 | 论坛 | 博客
  • 博客访问: 412229
  • 博文数量: 148
  • 博客积分: 3191
  • 博客等级: 中校
  • 技术积分: 1232
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-11 15:25
文章分类

全部博文(148)

文章存档

2011年(148)

我的朋友

分类: 系统运维

2011-08-17 16:47:13

1、需要修改用户能打开的最大进程数目
默认每个用户最大只能打开128个进程数目,而oracle用户一般需要打开上千个进程。
#chdev -l sys0 -a maxuproc=’2000′
sys0 changed
以上修改,可以通过如下命令来查看
#lsattr -El sys0

2、修改用户限制
主要是Oracle用户,可以通过如下命令查看当前限制
$ulimit -a
time(seconds)        unlimited
file(blocks)         4194302
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     4194302
nofiles(descrīptors)   4000
具体信息可以参考如下文件
#more /etc/security/limits
……
default:
        fsize = 2097151
        core = 2097151
        cpu = -1
        data = 262144
        rss = 65536
        stack = 65536
        nofiles = 2000
……
oracle:
        fsize = 4194302
        core = 4194302
        data = -1
        rss = -1
        stack = -1
        nofiles=4000
注意,-1是无限制
要修改如上限制,可以采用命令如
#chuser data=’-1′ rss=’-1′ stack=’-1′ oracle
#chuser nofiles=4000 oracle
或者是smit chuser来操作

3、修改系统参数
主要是性能需要内存管理
#vmo -p -o strict_maxperm=0 (default)
#vmo -p -o strict_maxclient=1 (default)
#vmo -p -o lru_file_repage=0
#vmo -p -o v_pinshm=1 #Oracle需要,pin住SGA的需要
#vmo -p -o minperm%=5 (physical RAM <32 GB)  #百分比% ,文件系统cache最小内存使用
minperm%=10 (physical RAM >32 GB but <64 GB)
minperm%=20 (physical RAM >64 GB)
#vmo -p -o maxclient%=maxperm% #百分比% ,jfs2与nfs最大文件系统cache使用
#vmo -p -o maxperm%=90 #百分比% ,普通文件系统最大文件系统cache使用
maxpin%=percent_of_real_memory
(IBM does not recommend decreasing the maxpin% value.  See the "Support for pinned memory" link in the References section below.)
Where "percent_of_real_memory" = ( (size of SGA / size of physical memory) *100) + 3
and
Set Oracle database parameter LOCK_SGA to TRUE in the pfile/spfile
and
Sum of all SGAs on the system do not exceed approximately 60% of physical memory
其中,-p表示修改对当前与重新启动生效,如果只能重新启动或者重新连接生效的,将提示重起或者重新连接后生效,如果是-r参数,则表示只是重新启动后生效。修改结果可以参考文件
#more /etc/tunables/nextboot
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.

# bos520 src/bos/usr/sbin/perf/tune/nextboot 1.1

# Licensed Materials - Property of IBM

# (C) COPYRIGHT International Business Machines Corp. 2002
# All Rights Reserved

#
US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

# IBM_PROLOG_END_TAG
vmo:
        minfree = "1440″
        maxfree = "1536″
        maxperm% = "20″
        maxclient% = "20″
        minperm% = "5″
        v_pinshm = "1″
ioo:
        j2_nBufferPerPagerDevice = "512″
no:
        routerevalidate = "1″
        tcp_finwait2 = "240″
        tcp_recvspace = "262144″
        tcp_sendspace = "262144″
        rfc1323 = "1″
 
4、设置AIXTHREAD_SCOPE=S
控制争用作用域。P 意味着基于进程的争用作用域(M:N)。S 意味着基于系统的争用作用域(1:1)。
echo $AIXTHREAD_SCOPE(这是由内部打开的,因此初始的缺省值不可以由命令 echo 看到)
AIXTHREAD_SCOPE={P|S},用命令export AIXTHREAD_SCOPE = {P|S} 更改会在 shell 中立即生效。在退出这个 shell 之前一直有效。当加上命令 AIXTHREAD_SCOPE={P|S} 到文件 /etc/environment 时会产生持久的变化

在ORACLE 9i+Aix 4.3 or Aix 5.1的环境下,设置该变量可以大幅度的减少进程内存的使用量,在Aix 5.2以上,请参考另外一种方法,IY49415+Oracle patch p3028673,详细信息参考oracle bug 3028673
 
阅读(1283) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~