Linux下安裝Oracle database內核參數設置

來源:互聯網
上載者:User

標籤:tin   hmm   nic   space   example   name   byte   sga   tco   

參考:1529864.1
**************************************************
RAM                                  Swap Space
Between 1 GB and 2 GB       1.5 times the size of RAM
Between 2 GB and 16 GB      Equal to the size of RAM
More than 16 GB                  16 GB
**************************************************
1.設置內核參數/etc/sysctl.conf
III. Environment:

   1. Below are the Minmum Recommended Kernel Parameter settings required for Database Software Installation. Modify your kernel settings in /etc/sysctl.conf as follows.

NOTE: If the current value for any parameter is higher than the value listed, do not change the value of that parameter.
這裡注意如果參數已經比下面的大了,就不要改該參數了
kernel.shmall = 1/2 of physical memory in pages, this will be the value 2097152. See Note 301830.1 for more information.
該參數的確定是根據如下確認的
Set SHMALL equal to the sum of all the SGAs on the system, divided by the page size
即SHMALL=SGA(BYTES)/PAGE_SIZE
$ getconf PAGE_SIZE
4096
For example, if the sum of all the SGAs on the system is 16Gb and the result of  ‘$ getconf PAGE_SIZE‘ is 4096 (4Kb) then set shmall to 4194304 pages
這裡假設SGA=16G
那麼SHMALL=16*1024*1024/4096=4194304
自動SGA管理設置為物理內存的0.4(oracle默認為物理內存40%)
我們的系統常見的物理內存由24GB 32GB
24GB SHMALL=24*1024*1024*1024*0.4/4096=2516582
32GB SHMALL=32*1024*1024*1024*0.4/4096=3355443

kernel.shmmax = 1/2 of physical memory in bytes. This would be the value 2147483648 for a system with 4GB of physical RAM.
這裡設置為物理內存的一半,或者稍大


For 64-bit Linux Systems :
    Minimum: 536870912 (512 MB)
    Maximum: A value that is 1 byte less than the physical memory
    Recommended: More than half the physical memory

See My Oracle Support Note 567506.1 for additional information about configuring shmmax.

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576

Note: This value limits concurrent outstanding requests and should be set to avoid I/O subsystem failures.

net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

Note: The below Kernel Parameter "panic_on_oops=1" is being Introduced and required from 12.1.0.2.0 onwards.
12.1.0.2.0以後的參數
kernel.panic_on_oops=1
****************************************
2.啟用內核參數
sysctl -p
3.設置用戶限制
a) /etc/security/limits.conf
************************************************
用法如下:
#<domain>        <type>  <item>  <value>
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#<item> can be one of the following:
#        - nproc - max number of processes
#        - nofile - max number of open files
#        - stack - max stack size (KB)
**********************************************
oracle              soft    nproc    2047
oracle              hard   nproc   16384
oracle              soft    nofile    1024
oracle              hard   nofile    65536
oracle              soft    stack    10240
oracle              hard   stack    10240
或者
@dba  soft  nproc    2047
@dba  hard  nproc   16384
@dba  soft  nofile   4096
@dba  hard  nofile  65536
@dba  soft  stack   10240
@dba  hard  stack   32768
修改後立即生效
b) /etc/pam.d/login
session required pam_limits.so
c)/etc/profile
if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
       ulimit -u 16384
       ulimit -n 65536
    else
       ulimit -u 16384 -n 65536
    fi
fi
文中第8點提到默認情況SELinux是enforcing,這個在12c安裝是可以不用再修改為disable了。
8. By default, RHEL 6 x86_64 Linux is installed with SELinux as "enforcing". This is fine for the Oracle Database 12.1 installation process.

Linux下安裝Oracle database內核參數設置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.