oracle安装内核参数设置

安装oracle内核参数说明及设置

kernel.shmmax

说明:

  • Linux进程可以分配的单独共享内存段的最大值(byte)

  • 64位的linux操作系统,设置应该大于SGA_MAX_TARGET或MEMORY_MAX_TARGET的值/或者1/2的物理内存大小。如果设置太小,SGA会分配多个内存段,影响性能,最好将SGA放在一个共享内存段中

  • 32位的linux操作系统,最大只能到4G

查看

# grep MemTotal /proc/meminfo
# cat /proc/sys/kernel/shmmax

修改 — 三种方式,推荐第二种

# echo 21474836480 > /proc/sys/kernetbl/shmmax
# sysctl -w kernel.shmmax=21474836480
# echo "kernel.shmmax=21474836480" >> /etc/sysctl.conf

查看共享内存段的个数

ipcs -sa

kernel.shmall

  • 设置共享内存段的页数

  • 共享内存段是共享内存页大小的整数倍

  • 设置大小:shmall >= shmmax/Page size

  • page size: linux 一般为4096bite(4k)

  • 命令:

    getconf PAGESIZE

查看大小:

# cat /proc/sys/kernel/shmall

kernel.shmmni

  • 是共享内存段的最大数量

  • shmmni缺省值4096 足够

oracle support 说明:

  1. Modify your kernel settings in /etc/sysctl.conf as follows. If the current value for any parameter is higher than the value listed in this table, do not change the value of that parameter. Range values (such as net.ipv4.ip_local_port_range) must match exactly.

    kernel.shmall = half the size of physical memory in pages (If the server supports multiple databases, or uses a large SGA, then set this parameter to a value that is equal to the total amount of shared memory, in 4K pages, that the system can use at one time.)

    kernel.shmmax = 1/2 of physical RAM in bytes. This would be the value 2147483648 for a system with 4Gb of physical RAM. (refer Note 567506.1 for additional information about configuring shmmax.)

    kernel.shmmni = 4096

    kernel.sem = 250 32000 100 128

    fs.file-max = 512 x processes (for example 6815744 for 13312 processes)

    fs.aio-max-nr = 1048576

    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

    vm.hugetlb_shm_group = (for example 1000 if /etc/group line for oinstall is 1000)

    1. To activate these new settings into the running kernel space, run the “sysctl –p” command as root.

    2. Set Shell Limits for the oracle User. Assuming that the “oracle” Unix user will perform the installation, do the following:

    a) Add the following settings to /etc/security/limits.conf

    oracle soft nproc 2047
    
    oracle hard nproc 16384
    
    oracle soft nofile 1024
    
    oracle hard nofile 65536
    
    oracle soft stack 10240
    
    oracle hard stack 10240
    

    b) Add or edit the following line in the /etc/pam.d/xdm file, if it does not already exist:

    session required pam_limits.so
    

    c) Add or edit the following line in the /etc/pam.d/su file, if it does not already exist:

    session required pam_limits.so 
    
    1. The gcc and g++ RPM items above will ensure that the correct gcc / g++ versions are installed. It is also required that you ensure that these correct gcc / g++ versions are active, and in-use. Ensure that the commands “gcc –version” and “g++ –version” each return “4.3.x”.

    2. The hostname command should return the fully qualified hostname as shown

below:

% hostname -f

  hostname.domainname
  1. If any Java packages are installed on the system, unset the Java environment variables, for example JAVA_HOME.

  2. The oracle account used to install Oracle Database 12.1, should not have the Oracle install related variables set by default. For example setting ORACLE_HOME, PATH, LD_LIBRARY_PATH to include Oracle binaries in .profile, .login file and /etc/profile.d should be completely avoided.

    a.) Setting ORACLEBASE(notORACLE_HOME) is recommended, since it eases a few prompts in the OUI runInstaller tool.

    b.) following the successful install, it is recommended to set ORACLEHOME,andtosetPATH to include ORACLEHOME/binatthebeginningofthePATH string.

  3. Log in as Oracle user and start the installation as follows:

    ./runInstaller

    a.) it is best practice not to use any form of “su” to start the runInstaller, in order to avoid potential display-related problems.

    b.) When performing the Oracle Database 12.1 installation, make sure to use the “runInstaller” version that comes with Oracle Database 12.1 software.

    c.) When performing any subsequent Oracle Database 12.1 patchset, make sure to use the “runInstaller” version that comes with the patchset.

参考:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/chap-Oracle_9i_and_10g_Tuning_Guide-Setting_Shared_Memory.html





posted @ 2017-04-25 20:39  hao_xiaoyu  阅读(3097)  评论(0编辑  收藏  举报