Operating System - HP-UX
1819913 Members
2035 Online
109607 Solutions
New Discussion юеВ

Re: Set ulimit -d to unlimited for user

 
Todd Carlisle
Advisor

Set ulimit -d to unlimited for user

I have read a lot, but, I cannot figure out how I can set ulimit -d to unlimited for a user. I know I can set it for root. I know it is not best practices, but, it is a development server and the dev group wants to have the dev account have ulimit -d unlimited. How can I make this happen for them? I have played with the profile, but get errors.

$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4194300
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 2048
$ulimit -d unlimited
sh: ulimit: The specified value exceeds the user's allowable limit.


10 REPLIES 10
Suraj K Sankari
Honored Contributor

Re: Set ulimit -d to unlimited for user

HI,
What is the output of
$ulimit

in the above output ulimit -a is showing uplimited....

>>ulimit -d unlimited
sh: ulimit: The specified value exceeds the user's allowable limit.

giving error because its already set to unlimited.....

for more about ulimit see the below link

http://www.umanitoba.ca/cgi-bin/man.cgi?section=2&topic=ulimit

Suraj
Kapil Jha
Honored Contributor

Re: Set ulimit -d to unlimited for user

U r not able to increase data size because its to the maximum value.
Check this value should be equal to your kernel paramter maxdsiz.

How can you have a process data size greater than the value set in kernel ;)

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Dennis Handly
Acclaimed Contributor

Re: Set ulimit -d to unlimited for user

You can't set "ulimit -d" to unlimited for anybody, including root. You are limited by maxdsiz or maxdsiz_64bit.

Unless you are using 64 bit applications, your 4 Gb maxdsiz can't be achieved in practice. And would require special linker and chatr(1) options to get more than 1 Gb.
Todd Carlisle
Advisor

Re: Set ulimit -d to unlimited for user

Thank you for the responses! The maxdsize_64 is set to 4396972765184, that is a little larger than 4G. When I perform a ulimit as root, I can set it to unlimited:
# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 2048

the output of #ulimit is unlimited for either root or the user.

Any further ideas on how I can get the user account to have unlimited data?
Steven E. Protter
Exalted Contributor

Re: Set ulimit -d to unlimited for user

Shalom,

The root limits are impacting the user. It is not possible to set this limit higher than that set for root.

So make the setting for root and then perhaps other issues being taken care of you can set it for the user. Within the limits of the kernel parameters, which you have set already.

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
Todd Carlisle
Advisor

Re: Set ulimit -d to unlimited for user

The root is set to unlimited, but, the user can still not go above 4GB. It does not look like I can increase user to unlimited.
Dennis Handly
Acclaimed Contributor

Re: Set ulimit -d to unlimited for user

>root is set to unlimited, but the user can still not go above 4GB. It does not look like I can increase user to unlimited.

Again, you can not be unlimited, not even for root. Your limit is maxdsiz/maxdsiz_64bit, or you can be smaller.
Note: Once beyond 4 Gb, ulimit can't display the limit correctly.

What size do you want to use for your 64 bit applications?
Todd Carlisle
Advisor

Re: Set ulimit -d to unlimited for user

Thank you for the clarification. It would be great if we could set the ulimit above 4GB. The maxdsiz_64 is currently set to the max, 4396972765184. I have asked the developers to begin using the server as configured and let me know if there are performance issues.

Is there a way to increase it above 4GB and confidently let the developer know it is higher than 4GB?
Dennis Handly
Acclaimed Contributor

Re: Set ulimit -d to unlimited for user

>It would be great if we could set the ulimit above 4GB.

You could write a program but that may not be that helpful. You should just use kctune(1m) to get the value.

>The maxdsiz_64 is currently set to the max, 4,396,972,765,184.

This size isn't reasonable. Do you have that many disk drives for swap?

>Is there a way to increase it above 4GB and confidently let the developer know it is higher than 4GB?

Use kctune(1m) to list it.
Or write your own getrlimit(2) program. Compile with +DD64.
Todd Carlisle
Advisor

Re: Set ulimit -d to unlimited for user

we set the ulimit as high as we could. It seems the 4G limit is working well for the developers.