1833759 Members
2193 Online
110063 Solutions
New Discussion

Re: maxssize Syntax

 
DareDevil_1
Advisor

maxssize Syntax

hi,

please let me know how to set the maxssize at user level or is it advisable to change it at kernel level??

read in a HP doc tht its better to define maxssize in the application.
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: maxssize Syntax

Shalom,

maxssiz is a kernel parameter. It can not be set by a user, only root.

kctune to see if root can set it dynamically.

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
AwadheshPandey
Honored Contributor

Re: maxssize Syntax

maxssize can be set by root only and normal user can not change this parameter. value of maxssize should set as required by application.
It's kind of fun to do the impossible
DareDevil_1
Advisor

Re: maxssize Syntax

thanks for your timely response.please tell me what they mean in this doc,

http://docs.hp.com/en/B2355-60105/maxssiz.5.html

Wim Rombauts
Honored Contributor

Re: maxssize Syntax

The doucment is about the maxssiz, maxssiz_64bit kernel parameters.

A said in above entries, they can only be set at system level by root.

The more inmportant question is : why do you want to change it ? Did you receive application errors, or software documentation to increase the parameter ?
DareDevil_1
Advisor

Re: maxssize Syntax

hi,

reason for changing: one day suddenly the application we are running on that server crashed for no reason and wont come up coz stack size is less.would reboot of the server help?
Wim Rombauts
Honored Contributor

Re: maxssize Syntax

Yes, a reboot can help, but maybe it won't.
It doesn't hurt to increase maxssiz or maxssiz64 (but don't increase too much, ad 25% or so), but you should find the cause of the problem : Why does it suddenly need more stack size while it has been running fine for so long ?
A. Clay Stephenson
Acclaimed Contributor

Re: maxssize Syntax

First of all, the default ulimit (8MiB) can be a bit small so your probably do want to increase the kernel tunable, maxssiz, up to something like 32-64MiB. Even the 64-bit counterpart, maxssiz_64bit very seldom needs to be larger than about 128MiB --- and that is very generous. Well written code almost never needs stacks any larger than this; if you find that you do need stacks larger than these values then almost certainly the code is badly written --- although there could be exceptions (e.g. intentionally, highly recursive algorithms). Most often when larger stacks than ~ 32-64MiB are needed, you are fixing the symptoms rather than fixing the problem --- bad code. If you have set you stack size up to 32-64MiB and you need larger ones for a few applications then one way to have you cake and eat it too is to set maxssiz to some larger value. This will be a global value. You can then use ulimit -S s smaller_value to reduce the stack for users on an individual basis in their .profiles --- or a file sourced by their .profiles.

One major drawback to a larger stack size -- especially for 32-bit applications -- is that the stack and data segment are allocated from the same quadrant. This means that however large you make maxssiz, you reduce the data segment by that much -- even if the run-time stack never approaches the limit.

If it ain't broke, I can fix that.