HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

ulimit and maxssiz

 
SOLVED
Go to solution
Neupert
Occasional Advisor

ulimit and maxssiz

Hi,

maybe I'm confusing things here but on my HP-UX B.11.31 I set maxssiz as well as maxssiz_64bit to a larger value. 'ulimit -a' shows that the stack size didn't change at all. However, setting 'ulimit -s unlimited' takes effect to the session I'm in but not for other users logging later on, the stack size there remains quite small.

My question: what is the maximum stack size valid on my system? Can I trust 'ulimit' or rather 'kcusage' which tells me that the stack size is larger than 'ulimit' shows? And if 'kcusage' would be the one, what's 'ulimit' good for on HP-UX?

Cheers,
Steff
8 REPLIES
Steven E. Protter
Exalted Contributor

Re: ulimit and maxssiz

Shalom,

ulimit is short for user limit.

You need to set kernel AND user limit in order to make a change impact the user session.

You can run your ulimit command in /etc/profile or in individual user profiles to make these changes permanent.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: ulimit and maxssiz

kcusage is the kernel limit. Each user that logs in can set a different value for ulimit up to the kernel's global limit. ulimit (as well as the maxssiz* values) are fences to prevent bad programs from consuming all of memory.


Bill Hassell, sysadmin
Neupert
Occasional Advisor

Re: ulimit and maxssiz

Hi Steven,

thank you for replying. My question is related to oracle so I guess I need to grant the 'LIMIT' privilege to the user 'oracle' and put 'ulimit -s unlimited' into his profile in order to make shure, the DB starts with unlimited 'maxssize'. Sounds weird to me... But since the DB will be started as user 'oracle', the user-limit needs to be adjusted. Is that correct?


Cheers,
Steff

Re: ulimit and maxssiz

You should be very cautious about increasing maxssiz, typically only maxdsiz needs to be increased.
Increasing maxssiz will decrease maxdsiz for a 32 bit process.

What are your current values for maxssiz and maxssiz_64bit?
Neupert
Occasional Advisor

Re: ulimit and maxssiz

Both are set to the max:

maxssiz: 401'604'608
maxssiz_64bit: 2'147'483'648

Since oracle uses large contigouous memory blocks it needs large stacks and this server runs a very large datawarehouse.

Now, if the user-limit for the stack size ('ulimit') whis is: 392'192 prevents the process exceed this value, that I have a problem.

I'm still confused what parameter applies.
Solution

Re: ulimit and maxssiz

>Both are set to the max: maxssiz: 401 Mb maxssiz_64bit: 2 Gb

These are way too big, unless dealing with Fortran.

>Since oracle uses large contiguous memory blocks it needs large stacks and this server runs a very large data warehouse.

The stack should only be used for control flow and computation, not memory blocks. Those should be stored in the heap or SGA.

>if the user-limit for the stack size ulimit which is: 392,192 prevents the process exceed this value, that I have a problem.

That's 392,192 * 1024. This probably matches your 402 Mb but way too big.

>I'm still confused what parameter applies.

The smallest.
Neupert
Occasional Advisor

Re: ulimit and maxssiz

Size matters? Hmm. OK, put both max stack sizes to lowest possible values and will keep an eye on their usage. The usage remains low up to now... Thanks for the hint.

Re: ulimit and maxssiz

>put both max stack sizes to lowest possible values and will keep an eye on their usage. The usage remains low up to now.

You don't want them so low such that you have to keep changing them. kcusage(1m) will help you keep track.