Shell Limits for Oracle User

To improve the performance of the Oracle software on Linux systems you must increase the following limits for the oracle user.

Item Hard Limit Description
nofile 65536 Maximum number of open file descriptors
nproc 16384 Maximum number of processes available to a single user

Linux

Perform following steps to increase the shell limits.

  1. Verify current shell limit for nofile as root.

    # ulimit –n
     
  2. Verify current shell limit for nproc as root.

    # ulimit –u

     

  3. Add following lines to /etc/security/limits.conf file.
    oracle soft nproc  2047
    oracle hard nproc  16384
    oracle soft nofile 1024
    oracle hard nofile 65536
  4. Add or edit the following line in the /etc/pam.d/login file, if it does not already exist.
     
    1. session required /lib/security/pam_limits.so

    Depending on the oracle user's default shell, make the following changes to the default shell start-up file. Add the following lines to the /etc/profile file.

    if [ $USER = "oracle" ]; then
       if [ $SHELL = "/bin/ksh" ]; then
          ulimit -p 16384
          ulimit -n 65536
       else
          ulimit -u 16384 -n 65536
       fi
    fi
    umask 022
    

     

  1. Create or edit the /etc/sysctl.conf file and add or edit the file with the following:
    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.shmall = 2097152
    kernel.shmmax = 536870912
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    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 = 1048586