ORACLE安裝核心引數配置_linux平臺

531968912發表於2016-12-13

面列出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

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25462274/viewspace-2130389/,如需轉載,請註明出處,否則將追究法律責任。

相關文章