Operating System - HP-UX
1753447 Members
4880 Online
108794 Solutions
New Discussion юеВ

Re: Ulimit with respect to Oracle

 
SOLVED
Go to solution
Greg Stark_1
Frequent Advisor

Ulimit with respect to Oracle

We have our Oracle ulimits set like this on all but one of our boxes:

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(kbytes) 32768
coredump(blocks) 2097151
nofiles(descriptors) unlimited

On one of the boxes they are like this:

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 2097152
memory(kbytes) unlimited
coredump(blocks) 2097151
nofiles(descriptors) 2000

On the oddball box, we recently had an Oracle process/session go awry and consume large amounts of memory and eventually stop the box.

My question is in regards to the ulimit -m setting and how/if this may have prevented our issue if it were set to 32k like the other boxes?

Thanks,
Greg
7 REPLIES 7
RAC_1
Honored Contributor
Solution

Re: Ulimit with respect to Oracle

It would have saved you. The -v option (memeory) is useful, when you have high memeory usage and want to restrict a program.
There is no substitute to HARDWORK
Greg Stark_1
Frequent Advisor

Re: Ulimit with respect to Oracle

Did you mean "-m"? Also, on a side note, this is an AIX box in question, but I would imagine ulimit is the same.

So what does the 32k setting actually refer to? I know Oracle can create sessions and PIDS that use much more than 32k of memory even when this ulimit option is set to 32k?

Also, just to confirm, it is my understanding that if I wanted to change the oddball box to 32k, it would require a reboot or at least a stop/start of Oracle for it to take effect. Is this a true statement?

RAC_1
Honored Contributor

Re: Ulimit with respect to Oracle

sh-posix ulimit should be same as on any other unix. /usr/bin/sh or similar.

Unless oracle changes it before starting any of it's scripts/programs, what you set will apply.
In any case, kernel limits for stack, data, no. of open files can not be overriden.
There is no substitute to HARDWORK
Greg Stark_1
Frequent Advisor

Re: Ulimit with respect to Oracle

Thanks for the info. Can you expand on what 32k refers to? 32k of what?
RAC_1
Honored Contributor

Re: Ulimit with respect to Oracle

32k is 32*1024*1024 bytes. With that ulimit set, process started with that limit can not get memeory more than that.

That acts as a soft limit for memeory requirement of a program.

ulimit -Sa -> soft limits
ulimit -Ha -> hard limits

For details man sh-posix
There is no substitute to HARDWORK
Greg Stark_1
Frequent Advisor

Re: Ulimit with respect to Oracle

Ok, now I'm a little more confused, what is the diff between a soft and hard limit?

Here is the normal config:

3DP06001:oracle > ulimit -Sa
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(kbytes) 32768
coredump(blocks) 2097151
nofiles(descriptors) unlimited

3DP06001:oracle > ulimit -Ha
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) unlimited

And here is the oddball config:

3DVP5781:oracle > ulimit -Sa
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 2097152
memory(kbytes) unlimited
coredump(blocks) 2097151
nofiles(descriptors) 2000

3DVP5781:oracle > ulimit -Ha
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) unlimited

Is the hard limit really what matters and essentially these boxes are configured the same?

RAC_1
Honored Contributor

Re: Ulimit with respect to Oracle

Whichever has less value, wins. so if soft limit is less than hard limit (it allows you to set it that way), then soft limit values applies, else hard limit values.
There is no substitute to HARDWORK