System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

how to increase the ulimit -s (stack value) 8192 to maximum on hp ux 11.11

SOLVED
Go to solution

how to increase the ulimit -s (stack value) 8192 to maximum on hp ux 11.11

Hi All, I want to increase the value of my stack limit size 8192KB to 81920 or unlimited.Could you please help me out to resolve this issue.Below are some information that will help you to understand this problem.

[root] uname -a
HP-UX test01 B.11.11 U 9000/800 1549607670 unlimited-user license
[root] model
9000/800/rp8420
[root] echo $SHELL
/sbin/sh
[root] ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 60

[root] ulimit -Sa
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 60
[root] ulimit -Ha
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) 2200

[root] more resource.h |grep -i rlim_infinity
# define RLIM_INFINITY RLIM64_INFINITY
# define K_RLIM_INFINITY RLIM_INFINITY
# define RLIM_INFINITY (uint64_t) 0x7fffffffffffffffL
# define RLIM_INFINITY (uint64_t) 0x7fffffffffffffffLL
# define RLIM_INFINITY (uint32_t) 0x7fffffff

Whenever I try to set it using the command [root]ulimit -s
it says:e.g.
[root] ulimit -s 81920
sh: ulimit: The specified value exceeds the user's allowable limit.

On the other hand If i try to set it lower value ulimit -s
it works fine.please find the attachment for kernel parameter information.

Could You please let me know how I can set it? Which kernel parameters need to be changed to accomplish it or it is not possible in my case?
Thanks much in advanced.
7 REPLIES
Aneesh Mohan
Honored Contributor
Solution

Re: how to increase the ulimit -s (stack value) 8192 to maximum on hp ux 11.11

Hi

You can change the stack value by tunning the below parameter ,but I don`t think you can put unlimited .

maxssiz
maxssiz_64bit

Aneesh
Johnson Punniyalingam
Honored Contributor

Re: how to increase the ulimit -s (stack value) 8192 to maximum on hp ux 11.11

To set the latter larger, you may have to use kctune/kmtune to set maxfiles_lim to 4096

kmtune |grep maxfiles

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Dennis Handly
Acclaimed Contributor

Re: how to increase the ulimit -s (stack value) 8192 to maximum on hp ux 11.11

>Which kernel parameters need to be changed to accomplish it

As Aneesh mentioned those are maxssiz*.

How big do you plan to make it?
Note: making it very large will reduce maxdsiz.
81 Mb is probably fine.

>Johnson: To set the latter larger, you may have to use kctune/kmtune to set maxfiles_lim

There is no direct connection between maxssiz and maxfiles_lim.

Re: how to increase the ulimit -s (stack value) 8192 to maximum on hp ux 11.11

Thanks all for your help. Do I need to reboot this server to get effected these changed kernel parameters values? could you please let me know how I can accomplish it using this kmtune command as till now I've not changed any kernel parameter value (probably first time I'm going to change these values). How much impact/risk does it have after changing these value. This hp ux box is in production and oracle database is running on it. Before changing these value do I need to stop database/applications or online I can change it.I think I cann't use this kctune command as it is running on hp ux 11.11.

Thank you in advance.
Dennis Handly
Acclaimed Contributor

Re: how to increase the ulimit -s (stack value) 8192 to maximum on hp ux 11.11

>Do I need to reboot this server to get effected these changed kernel parameters values?

Yes. But if you were on 11.23 where maxssiz is a dynamic tunable, you could just change it.

>Before changing these value do I need to stop database/applications or online I can change it.

You have to regen a kernel, so everything must be stopped.
pradeep233
Occasional Visitor

Re: how to increase the ulimit -s (stack value) 8192 to maximum on hp ux 11.11

Hi Aneesh,

 

I tried to increase the stack limit.  you mentioned to change the stack value by tunning the below parameter

maxssiz
maxssiz_64bit

 

How to change this value? Could you give me the commands to change it?

 

finuat01:/home/pwxuser#ulimit -a

time(seconds)       unlimited

file(blocks)         unlimited

data(kbytes)         1048576

stack(kbytes)       131072

memory(kbytes)       unlimited

coredump(blocks)     4194303

nofiles(descriptors) 2048

finuat01:/home/pwxuser#ulimit -sa

time(seconds)       unlimited

file(blocks)        unlimited

data(kbytes)         1048576

stack(kbytes)       131072

memory(kbytes)       unlimited

coredump(blocks)     4194303

nofiles(descriptors) 2048

finuat01:/home/pwxuser#ulimit -s 524288

sh: ulimit: The specified value exceeds the user's allowable limit.

finuat01:/home/pwxuser#ulimit -s 262144

sh: ulimit: The specified value exceeds the user's allowable limit.

Dennis Handly
Acclaimed Contributor

Re: how to increase the ulimit -s (stack value) 8192 to maximum on HP-UX 11.11

>you mentioned to change the stack value by tuning the below parameter

 

You need to use kmtune(1m) to change those kernel parms.

Your current value, 131 MB should be plenty big enough, unless you have a poorly written Fortran program.