Setting kernel parameters

Setting the appropriate ulimit values on your operating system can affect how the Oracle database performs.

About this task

Follow these commands on different operating systems to set ulimits as root user:

Procedure

  • ulimit -n 65536

    Do not restart the system after this task or close session. If needed, set the ulimits again.

  • Add or update the following lines to /etc/security/limits.conf file:
    *   soft   nofile    65536
    *   hard   nofile    65536
    *   soft   nproc     65536
    *   hard   nproc     65536
  • Update the following parameters in /etc/security/limits file:
    default:
    fsize = -1
    nofiles = 65536

If the limits.conf file is not available, then run system configuration by using the following steps:

  • To configure the kernel, run the following commands as root on the database and application servers:
    # /var/install/sbin/system_configure

    The system_configure command must be run on the global zone.

  • Update the following kernel parameters by using smitty:
    # smit chgsys
    Verify that the values that are shown for the following parameters are set correctly:
    1. Maximum number of PROCESSES allowed per user is greater than or equal to 16384.
    2. ARG/ENV list size in 4 K byte blocks is greater than equal to 128.

    If required, update the existing value. To exit from smitty, press enter and F10.

    Restart the system after this task by using the following command:
    # shutdown -Fr
    Make sure that parameters are set correctly by using the following commands:
    
    #  lsattr -E -l sys0 -a maxuproc
       maxuproc 16384 Maximum number of PROCESSES allowed per user True
    
    #  lsattr -E -l sys0 -a ncargs
       ncargs 256 ARG/ENV list size in 4K byte blocks True
    Make sure that the values are correctly set as follows:
    
    maxuprocs               16384
    ncargs                  128
    tcp_ephemeral_low       32768
    tcp_ephemeral_high      65535
    udp_ephemeral_low       32768
    udp_ephemeral_high      65535
    
  • Update the /etc/sysctl.conf file with the following parameters. If the parameters are listed in the file, make sure that the values are correctly set as follows:
    fs.file-max = 6815744
    kernel.sem = 250 32000 100 128
    kernel.shmmni = 4096
    kernel.shmall = 1073741824
    kernel.shmmax = 4398046511104
    kernel.panic_on_oops = 1
    net.core.rmem_default = 262144
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048576
    net.ipv4.conf.all.rp_filter = 2
    net.ipv4.conf.default.rp_filter = 2
    fs.aio-max-nr = 1048576
    net.ipv4.ip_local_port_range = 9000 65500
    
    
    Restart the system after this task by using the following command:
    # shutdown -r now
    Make sure that parameters are set correctly by using the following commands:
    # sysctl -a | grep net.ipv4.ip_local_port_range
  • Make sure that the kernel parameter values are correctly set as follows:
    
    project.max-sem-ids                100
    process.max-sem-nsems              256
    project.max-shm-memory           This value varies according to the RAM size.
    project.max-shm-ids                100
    tcp_smallest_anon_port             9000
    tcp_largest_anon_port              65500
    udp_smallest_anon_port             9000
    udp_largest_anon_port              65500