1836585 Members
2132 Online
110102 Solutions
New Discussion

ulimit -d unlimit

 
Fredy_5
Occasional Advisor

ulimit -d unlimit

I have a problem .. I am running a process in hpux11 but it fails in the execution, the supplier says that I have to place the ulimit-d unlimit .. but me it does not work .. in the documentation says that there is no form of doing it .. it is true???
6 REPLIES 6
Mel Burslan
Honored Contributor

Re: ulimit -d unlimit

ulimit -d is used to specify the allocation of data area size and it is limited by the memory you have and is dependent on maxdsiz and maxdsiz_64 kernel parameters. Most probably SAP implementers are telling you to set it to unlimited as it was in my case, but it is just to cover their inefficient and buggy coding practices more than anything else in my opinion. As these kernel parameters depend on the amount of physical memory you have, I can not exactly tell you what to set them to, to make the application people happy.

Yo can read a little more about my Problem and Clay Stephenson's explanation for my particular case here:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=860078

Hope this helps a little. I know it is not gonna be much but better than nothing I hope.
________________________________
UNIX because I majored in cryptology...
Fredy_5
Occasional Advisor

Re: ulimit -d unlimit

I have the same server with some memori (8gb) ... I can double the value to 2 gigas to the maxdsize?? I do not have problems on having done it??
thanks...
Steven E. Protter
Exalted Contributor

Re: ulimit -d unlimit

[8443#] ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 162144
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 200
nofiles(descriptors) 4096


You can increase data with ulimit -d

[8445#] ulimit -d 262144
Wed Jun 1 20:15:59 2005:/etc/cmcluster
[8446#] ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 262144
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 200
nofiles(descriptors) 4096
Wed Jun 1 20:15:59 2005:/e

This can be done in /etc/profile as well

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
Fredy_5
Occasional Advisor

Re: ulimit -d unlimit

hello... using these commands allows me to place the value in limitless.. but alone I can execute it with the root... as I can make it with a normal user???

# ulimit -dH unlimited
> # ulimit -aH
> time(seconds) unlimited
> file(blocks) unlimited
> data(kbytes) unlimited
> stack(kbytes) 131072
> memory(kbytes) unlimited
> coredump(blocks) unlimited
> nofiles(descriptors) 60000

Jeff Schussele
Honored Contributor

Re: ulimit -d unlimit

Hi Fredy,

Check the hard limit with ulimit -Hd then check the soft limit with ulimit -d
If they're the same that's the problem. a "normal" user cannot increase the value past the hard limit - only root can.
If it's less then it can be increased - but only to the hard limit.

One option - as SEP points out - would be to set the limit in the /etc/profile
But keep in mind it would then apply to *all* users logging in.

Rather one should really find out just *what* the application really needs & set the maxdsiz and/or maxdsiz_64bit values accordingly. It's a little dangerous giving every user the capability to chew up all the RAM in a system. One runaway process could take the whole system right down.

My $0.02,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Bill Hassell
Honored Contributor

Re: ulimit -d unlimit

The ulimit command is very limited in ksh...use /usr/bin/sh (the POSIX shell) so you can control ulimit values. (the latest patches for ksh now allow ulimit options)

Very important: maxdsiz is only for 32bit programs and without the latest patches, your 11.00 system won't allow 32bit programs to grow larger than 960megs (or 1750megs with compiler options). With patches, 11.00 allows the use of the chatr -q3p enable option giving 32bit applications access to just under 3Gb. But only 11.11 OS allows 32bit programs to access up to 3700megs. NOTE: 32bit programs can never access large amounts of RAM (more than 3.7Gb). Only 64bit programs can request and use dozens of Gb of RAM.

Also note that maxdsiz must increased to allow 32bit programs to access more than the default (only 67megs on 11.00), *but* maxdsiz_64 must be larger than maxdsiz. For 11.00, set maxdsiz to 2Gb and maxdsiz_64 to 6Gb. Then have /etc/profile set a 'soft' limit for ulimit as in:

ulimit -Sd 50000

For ordinary users, their programs will run out of RAM at 50megs, but powerusers or database logins can change the value to a higher value. Programmers and DB admins must read the white papers about handling program memory limits.


Bill Hassell, sysadmin