This discussion is archived
2 Replies Latest reply: Dec 3, 2013 8:34 AM by RichS RSS

Oracle Linux 6.4 and the ulimit case statement... Needed anymore?

RichS Newbie
Currently Being Moderated

We've all seen this code block for years in .bash_profile scripts for the oracle user:


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


After setting up a test system with Oracle Linux 6.4 I noticed the following response from ulimit:


    $ ulimit

    unlimited


Question: Assuming that we're using Oracle Linux 6.4 and the oracle user isn't really going to be changing their shell from the default (\bin\bash) do we really need this anymore?

  • 1. Re: Oracle Linux 6.4 and the ulimit case statement... Needed anymore?
    RichS Newbie
    Currently Being Moderated

    I'm preparing a document that will have a complete step by step guide to setting up everything for an Oracle 12c DB on Oracle Linux 6.4 using Virtualbox and I'm wondering if I can drop this part out of the editing of the .bash_profile script... Any ideas?

     

    Thanks,

     

    Rich

  • 2. Re: Oracle Linux 6.4 and the ulimit case statement... Needed anymore?
    RichS Newbie
    Currently Being Moderated

    Well, I've done a bit of research...

     

    The database documentation for a Linux install has the following:

    Resource Shell LimitResourceSoft LimitHard Limit

    Open file descriptors

    nofile

    at least 1024

    at least 65536

    Number of processes available to a single user

    nproc

    at least 2047

    at least 16384

    Size of the stack segment of the process

    stack

    at least 10240 KB

    at least 10240 KB, and at most 32768 KB

     

    A generic new user created without anything set for ulimit has the following settings under Oracle Linux 6.5 (a 6.4 that was yum updated to 6.5).

     

    ulimit -Sn

    1024

    ulimit -Hn

    4096

    ulimit -Su

    1024

    ulimit -Hu

    47574

    ulimit -Ss

    8192

    ulimit -Hs

    unlimited

     

    However, the oracle user, created with yum install oracle-rdbms-server-12cR1-preinstall command has the following values:

     

    ulimit -Sn

    65536

    ulimit -Hn

    65536

    ulimit -Su

    16384

    ulimit -Hu

    16384

    ulimit -Ss

    10240

    ulimit -Su

    16384

     

    This is because there is a file that the preinstall script puts into /etc/security/limits.d/ directory named oracle-rdbms-server.12cR1-preinstall.conf.

     

    So, we really don't need to put this into our .bash_profile anymore.

     

    Finally, the whole 'use this if you are using ksh as your shell' is actually wrong too. The -p setting for ulimit is actually a read only parameter in ksh or bash for that matter.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points