当前位置: 首页 > BASIC, INSTALL > 正文

ORACLE安装内核参数配置_linux平台

下面列出ORACLE安装时,sysctl.conf需要更改的参数。

#modify vm

echo "vm.dirty_ratio=5               

vm.dirty_background_ratio=1       

vm.dirty_writeback_centisecs=100

vm.dirty_expire_centisecs=500       

vm.drop_caches=3               

vm.swappiness=100               

vm.vfs_cache_pressure=163">>/etc/sysctl.conf

 

#modify net

echo "net.core.rmem_default=262144

net.core.rmem_max=4194304

net.core.wmem_default=262144

net.core.wmem_max=2097152

net.ipv4.ip_local_port_range = 9000 65500" >>/etc/sysctl.conf

 

#modify kernel

echo "fs.aio-max-nr = 1048576

fs.file-max = 1536000

kernel.shmall = 7864320

kernel.shmmax = 32212254720

kernel.shmmni = 4096

kernel.sem=3000 1536000 3000 512 ">> /etc/sysctl.conf

#modify private network rp_filter

echo "net.ipv4.conf.eth3.rp_filter = 0

net.ipv4.conf.eth2.rp_filter = 0

net.ipv4.conf.bond1.rp_filter = 0">>/etc/sysctl.conf && tail -3 /etc/sysctl.conf

 

#modify big page

echo "vm.nr_hugepages = 23100">>/etc/sysctl.conf && tail -1 /etc/sysctl.conf

1shmmax

说明

 

The maximum size(in bytes) of a single shared memory segment(sga).

 

配置

 

通过介绍是配置操作系统上所有的SGA内存的和,也就是所有共享内存的和,如果此参数小于共享内存的和,那么会出现下面的情况:

SHMMAX is the maximum size of a single shared memory segment set in bytes.. Ideally, we would like SGA_TARGET to fit in one shared memory segment at startup by having SGA_TARGET < SHMMAX . If SGA_TARGET > SHMMAX , then Oracle will try to use contiguous multi-segment to use to fit the SGA_TARGET. If it is not able to do so, then it will use non-contiguous multi-segment allocation and in this Oracle has to grab the free memory segments fragmented between used spaces.

 

kernel.shmmax = nnnnn

2shmall

说明

 

 This parameter sets the total amount of shared memory pages that can be used system wide. Hence, shmall should always be at least ceil(shmmax/page_size).如果直接大页,可以不需要配置此参数

 

配置

 

$ getconf PAGE_SIZE

4096

SHMMAX/PAGE_SIZE

 

kernel.shmall = 2097152

 

3shmmin

说明

 

The minimum size(in bytes) of a single shared memory segment.

 

配置

 

默认值就可以了

 

kernel.shmmin =  4096

 

4file-max

 

说明

 

所有进程能同时打开的文件总数

 

配置

 

512 x processes

 

fs.file-max = 6815744

 

5ip_local_port_range

说明

 

端口号范围

 

配置

 

11G环境

ip_local_port_range = 9000 65500

11G之前环境

ip_local_port_range = 1024 65000

 

net.ipv4.ip_local_port_range = 9000 65500

 

6aio-max-nr

说明:

 

异常的IO最大大小,MOS说在rhel 4,5已经取消此参数,但是在rhel 6rhel 5里面肯定有此参数

 

配置:

ORACLE建议配置为1048576

 

fs.aio-max-nr = 1048576

7sem信号量参数

说明:

 

kernel.sem = SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value

 

NAME  | DESCRIPTION                                      | MIN VALUE

——-+————————————————–+————-

SEMMSL | maximum number of semaphores in a semphore set   | 250(process+10)

SEMMNS | maximum number of semphores in the system        | 32000(semmsl*semmni)

SEMOPM | maximum number of operations per semop(P) call   | 100(process+10)

SEMMNI | maximum number of semaphore sets in system       | 128

配置

 

kernel.sem=3000 1536000 3000 512

8,配置参数

These values determine how much kernel buffer memory is allocated per socket opened for network reads and writes:

 

* The _default values determine how much memory is consumed per socket immediately at socket creation.

* The _max values determine how much memory each socket is allowed to consume dynamically, if the memory requirements grow beyond the defaults.

 

Therefore, the best practice recommendation is to define lower default values (i.e. 256k) in order to conserve memory when possible, but have larger max values (1MB or greater) to allow for network performance gains if more memory is needed for a given socket.

 

 

#modify net

echo "net.core.rmem_default=262144

net.core.rmem_max=4194304

net.core.wmem_default=262144

net.core.wmem_max=2097152 " >>/etc/sysctl.conf

9,虚拟内存

文件系统一些参数配置

vm.dirty_ratio=5        文件系统缓存占内存的百分比

vm.dirty_background_ratio=3        当脏数据达到内存百分之多少时,开始写出        

vm.dirty_writeback_centisecs=100        写出唤醒的时间间隔,单位毫秒

vm.dirty_expire_centisecs=500        缓冲区数据被LRU考虑写出的时间,单位毫秒

vm.drop_caches=3        释放已经使用的cache

vm.swappiness=100        表示系统进行交换行为的程度,数值(0-100)越高,越可能发生磁盘交换

vm.vfs_cache_pressure=163        表示内核回收用于directoryinode cache内存的倾向,这个值越大,回收的倾向越严重

 

#modify vm

echo "vm.dirty_ratio=5               

vm.dirty_background_ratio=1       

vm.dirty_writeback_centisecs=100

vm.dirty_expire_centisecs=500       

vm.drop_caches=3               

vm.swappiness=100               

vm.vfs_cache_pressure=163">>/etc/sysctl.conf

9,私有网卡

RAC私有网络配置

echo "net.ipv4.conf.eth3.rp_filter = 0

net.ipv4.conf.eth2.rp_filter = 0

net.ipv4.conf.bond1.rp_filter = 0">>/etc/sysctl.conf && tail -3 /etc/sysctl.conf

10,大页配置

大页配置

#这个是配置大页使用的(值为sga(M)/2+1

#注意这里SGA为主机上所有实例的SGALINUX每一个大页支持2M。大页不支持AMM配置内存方式

vm.nr_hugepages=23100

本文固定链接: http://www.htz.pw/2015/03/20/oracle%e5%ae%89%e8%a3%85%e5%86%85%e6%a0%b8%e5%8f%82%e6%95%b0%e9%85%8d%e7%bd%ae_linux%e5%b9%b3%e5%8f%b0.html | 认真就输

该日志由 huangtingzhong 于2015年03月20日发表在 BASIC, INSTALL 分类下, 通告目前不可用,你可以至底部留下评论。
原创文章转载请注明: ORACLE安装内核参数配置_linux平台 | 认真就输
关键字: