×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Changing ulimit on "max user processes"
2

Changing ulimit on "max user processes"

Changing ulimit on "max user processes"

(OP)
Hi.  Running AIX 433-10 (oslevel -r).  I'm having an intermittent problem with Oracle, creating the error:

WARNING: ORA-12540: TNS:internal limit restriction exceeded

One of the web pages I found offered the following suggestion for an HP user:

"This error points to a resource limit in the HP kernel.
Try increasing the following kernel settings.
Max number of procs per user/system wide, maxuprc/nproc
Max number of open files per user/system wide, maxfiles/nfile
You can use "sysdef" to see the current settings."

With that in mind, I logged on as myself, to see where I stood on limitations:
 $ ulimit -a
 core file size (blocks)     1048575
 data seg size (kbytes)      131072
 file size (blocks)          1048575
 max memory size (kbytes)    32768
 open files                  2000
 pipe size (512 bytes)       64
 stack size (kbytes)         32768
 cpu time (seconds)          unlimited
 max user processes          128
 virtual memory (kbytes)     unlimited


The "max user processes" seemed kind of low at 128, especially since Oracle *may* be trying to run many more than that (I've no idea, I'm just guessing and trying what the gent above suggested), so I su'd to root (using 'su -' so I'd get the full login with environment), and ran 'ulimit -a' to see where root stood on limitations:
 # ulimit -a
 core file size (blocks)     1048575
 data seg size (kbytes)      131072
 file size (blocks)          1048575
 max memory size (kbytes)    32768
 open files                  2000
 pipe size (512 bytes)       64
 stack size (kbytes)         32768
 cpu time (seconds)          unlimited
 max user processes          262144
 virtual memory (kbytes)     unlimited


That looked like a much friendlier "max user processes" number, so I su'd to oracle (again using 'su - oracle' to process the full login and get oracle's environment), and ran 'ulimit -a' to see what oracle's limitations were:
 $ ulimit -a
 core file size (blocks)     1048575
 data seg size (kbytes)      131072
 file size (blocks)          1048575
 max memory size (kbytes)    32768
 open files                  2000
 pipe size (512 bytes)       64
 stack size (kbytes)         32768
 cpu time (seconds)          unlimited
 max user processes          128
 virtual memory (kbytes)     unlimited


So oracle has the same limitations that I have.  I decided I'd like to bump up the "max user processes" by a considerable margin to see if it would help.  Wanting to learn the AIX syntax for their 'ulimit' command, I went to:
http://hpcf.nersc.gov/vendor_docs/ibm/cm...


It looked simple enough.  Just run:
'ulimit -[letter_code_for_limit_you_want_changed] newlimit'

No worries.  Easy.  Now, what letter code is "max user processes" according to this man page?  Hmmmmm...  oh, that's right!  There ISN'T one!  >

-a Lists all of the current resource limits.
-c The size of core dumps, in number of 512-byte blocks.
-d The size of the data area, in number of K bytes.
-f Sets the file size limit in blocks
-H Says that the hard limit for the given resource is set.
-m The size of physical memory, in number of K bytes.
-n Limit on number of file descriptors a process may have.
-s Specifies the stack size, in number of K bytes.
-S Says that the soft limit for the given resource is set.
-t The number of seconds to be used by each process.

So nothing about the "max user processes".  The page *does* say that some limits are set by default in /etc/security/limits, so I went there to see what I could learn:
 * Sizes are in multiples of 512 byte blocks, CPU time is
 * in seconds
 * fsize      - soft file size in blocks
 * core       - soft core file size in blocks
 * cpu        - soft per process CPU time limit in seconds
 * data       - soft data segment size in blocks
 * stack      - soft stack segment size in blocks
 * rss        - soft real memory usage in blocks
 * nofiles    - soft file descriptor limit
 * fsize_hard - hard file size in blocks
 * core_hard  - hard core file size in blocks
 * cpu_hard   - hard per process CPU time limit in seconds
 * data_hard  - hard data segment size in blocks
 * stack_hard - hard stack segment size in blocks
 * rss_hard   - hard real memory usage in blocks
 * nofiles_hard - hard file descriptor limit
 *
 * The following table contains the default hard values if
 * the hard values are not explicitly defined:
 *
 *   Attribute        Value
 *   ==========    ============
 *   fsize_hard    set to fsize
 *   cpu_hard      set to cpu
 *   core_hard         -1
 *   data_hard         -1
 *   stack_hard        -1
 *   rss_hard          -1
 *   nofiles_hard      -1
 *
 * NOTE:  A value of -1 implies "unlimited"
  default:
        fsize = 2097151
        core = 2097151
        cpu = -1
        data = 262144
        rss = 65536
        stack = 65536
        nofiles = 2000

Again, nada.  It *does* say that "The following table contains the default hard values if the hard values are not explicitly defined:"...  but defined WHERE?

Another quick search determines that this whole time I've *not* been running AIX's ulimit command, but rather have been running the 'bash' internal ulimit command.  So now I run the AIX ulimit command for each user, and get the following output:

Myself:
 $ /usr/bin/ulimit -a
 time(seconds)        unlimited
 file(blocks)         2097151
 data(kbytes)         131072
 stack(kbytes)        32768
 memory(kbytes)       32768
 coredump(blocks)     2097151
 nofiles(descriptors) 2000

root:
 # /usr/bin/ulimit -a
 time(seconds)        unlimited
 file(blocks)         2097151
 data(kbytes)         131072
 stack(kbytes)        32768
 memory(kbytes)       32768
 coredump(blocks)     2097151
 nofiles(descriptors) 2000

oracle:
 $ /usr/bin/ulimit -a
 time(seconds)        unlimited
 file(blocks)         2097151
 data(kbytes)         131072
 stack(kbytes)        32768
 memory(kbytes)       32768
 coredump(blocks)     2097151
 nofiles(descriptors) 2000


Well, that looks the same for all three users.  And this just brings up another question:  which 'ulimit' is operative here?  Am I operating under the restrictions of the 'bash internal ulimit', or the 'AIX /usr/bin/ulimit'?  Either way, I can't seem to change the bash setting for 'ulimit -u' (I get this error message:  bash: ulimit: cannot modify limit: A system call received a parameter that is not valid.).  And in the AIX ulimit, there "ain't no sech animal"  

Can anyone point me in the right direction?  As you can tell by this novella, I'm more than willing to do the work and dig for my own answers.  But a URL explaining 'bash internal ulimit' vs. 'AIX /usr/bin/ulimit', and how to make changes, especially to the 'max user processes' variable would be ever so handy.

Thank you!

Unca Xitron

RE: Changing ulimit on "max user processes"

max user processes is set smit/system environments/ change show characteristics of operating system, not ulimit.

You should get with your DBA to find out what an estimate of the number of processes oracle may run at one time. (there is a parm for the database for processes. the max user processes on the AIX system should be higher than that number.)

You do not have to boot the box when you change max user processes (unlike on an HP).

RE: Changing ulimit on "max user processes"

Normally there are three things we change for oracle. the system maxuproc and oracle's fsize and data segment size. These are the commands we use:

chdev -l sys0 -a maxuproc=512
chuser fsize=-1 data=-1 oracle

Hope that helps.

RE: Changing ulimit on "max user processes"

(OP)
Thank you both so much!  Excellent information!

Unca Xitron

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close