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

changing ulimit settings on HP UX v 11.23

evans amartey
Occasional Visitor

changing ulimit settings on HP UX v 11.23

We have setup our server with the following ulimit settings

# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 2048

We need to change the stack and data size to unlimited for all users permanently.

My service provider claims it is not possible please show me how to do it?
7 REPLIES
R.O.
Esteemed Contributor

Re: changing ulimit settings on HP UX v 11.23

I think you can do it by defining the "ulimit" values you want in /etc/profile"

Regards
"When you look into an abyss, the abyss also looks into you"
R.O.
Esteemed Contributor

Re: changing ulimit settings on HP UX v 11.23

1. ulimit -a
Display all configured values.
2. ulimit -c
Sets core file size
3. ulimit -d
Sets data seg size
4. ulimit -n
Sets Open Files
5. ulimit -s
Sets stack size
6. ulimit -u
Sets max user processes
7. ulimit -t
Sets cpu time
8. ulimit -v
Sets virtual memory
9. ulimit -p
Sets pipe size

Regards,
"When you look into an abyss, the abyss also looks into you"
Steven E. Protter
Exalted Contributor

Re: changing ulimit settings on HP UX v 11.23

Shalom,

Changes for all users is generally done in /etc/profile

sprotte@gitop2:/home/sprotte $ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4294967292
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303

ulimit -d for data
You may find just using a really big number solves the problem.

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
Don Morris_1
Honored Contributor

Re: changing ulimit settings on HP UX v 11.23

Your service provider is correct, v2 will not allow Infinite limits for data/stack -- you can only adjust the maxdsiz/maxdsiz_64bit and maxssiz/maxssiz_64bit to adjust the default hard limits for all users (you can use ulimit/profile to set limits below those values, but that's the only way to raise them). [v3 will allow setting Infinite limits with the appropriate patch level (there's a thread with the number, I don't recall it off hand) -- although since the tunable limits still are actually applied, this is just a feel good white lie from the kernel in practicality.]

Standard obligatory warning, the stack size is reserved from private space -- so don't set maxssiz too high for no good reason, it means you have less space for data and other private objects.
Dennis Handly
Acclaimed Contributor

Re: changing ulimit settings on HP UX v 11.23

>data(kbytes) 1048576
>stack(kbytes) 8192
>We need to change the stack and data size to unlimited for all users permanently.

>My service provider claims it is not possible

That's correct, what Don said.
That said, your values can be increased a lot.
You can increase maxdsiz to 4 Gb and maxssiz to 80 Mb for a start.

>Don: this is just a feel good white lie from the kernel in practicality.

Now that you have explained it this way ... :-)

Possibly this thread but no patch ID:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1402022
evans amartey
Occasional Visitor

Re: changing ulimit settings on HP UX v 11.23

Thanks Guys! I'l try and give you feedback.
Alzhy
Honored Contributor

Re: changing ulimit settings on HP UX v 11.23

sprotte@gitop2:/home/sprotte $ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4294967292
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303

How can I have the above "ulimit -d" (4TB right?) setting on HP-UX 11.31?

I can't seem to set it beyond maxdsiz value of 4GB.
Hakuna Matata.