1833108 Members
2822 Online
110051 Solutions
New Discussion

ulimit settings !

 
SOLVED
Go to solution
rveri
Super Advisor

ulimit settings !

Hi All ,

Here is the ulimit outout:

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

we want to set the data , and stack value to unlimited , how we can do that.

Thanks,
15 REPLIES 15
Giri Sekar.
Trusted Contributor

Re: ulimit settings !

Hi:

Both the data and the stack are in reference to Kernel Parameters. Data (maxdsiz) and Stack (maxssiz).

Thanks

Giri Sekar.
"USL" Unix as Second Language
Patrick Wallek
Honored Contributor

Re: ulimit settings !

Those can't be set to unlimited as they are basically controlled by your maxdsize and maxssize kernel parameters.

You really don't want those to be unlimited anyway. Why do you need an unlimited stack size or data size? That would be a real easy way to crash a machine, or at least make it very unresponsive.
rveri
Super Advisor

Re: ulimit settings !

Here is maxdsiz values ...
Please advice:

maxdsiz 1073741824 - 1073741824
maxdsiz_64bit 0x80000000 - 0X80000000
--------------------------------------------

Pls advice.
rveri
Super Advisor

Re: ulimit settings !

Hi Patrick,

Last week one job, batch cycle experienced an oracle error related to memory usuage .
After the Oracle tech reviewed our Unix and Oracle environments, he suggested to change kernel parameters data=unlimited and stack=unlimited.

Is that going to be okay with unlimited . Or we can increase the maxdsiz_64bit to 50% .

Pls advice.
Giri Sekar.
Trusted Contributor

Re: ulimit settings !

OK..Do man 1 ld. The maximum value for maxdsiz (for 11.0) is 1.9 Gig. But it will be required to compile and link (executable) with EXEC_MAGIC. Without EXEC_MAGIC the max value for maxdsiz would be approx 900Meg. For maxssiz i think it would be 80 Meg. So you may want to start with 50-60 % of these values and see the performance and then make decision on permanent values.

Thanks

Giri Sekar.
"USL" Unix as Second Language
Adisuria Wangsadinata_1
Honored Contributor
Solution

Re: ulimit settings !

Hi Rveri,

Check the url below for document about 'Sys Adm: min, max, and default ulimit values' (docID : KBRC00017143) :

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000079973196

As you already know the data max determined by maxdsiz and stack(kbytes) max determined by maxssiz.Here are kernel parameter info, you can check the url below :

http://docs.hp.com/en/939/KCParms/KCparam.MaxDsiz.html

http://docs.hp.com/en/939/KCParms/KCparam.MaxSsiz.html

Hope this information can help you.

Cheers,
AW


now working, next not working ... that's unix
morganelan
Trusted Contributor

Re: ulimit settings !

If you see the data and stack size using ulimit as unlimited, it does not mean you can create them with more than maxsimum acceptable value that allows by kernel.Changing kernel parameters to improper or inappropriate values or combinations of values can cause data loss, system panics, or other (possibly very obscure and/or difficult to diagnose) operating anomalies, depending on which parameters are set to what values.
Kamal Mirdad
A. Clay Stephenson
Acclaimed Contributor

Re: ulimit settings !

No matter what you think, you absolutely positively do not want to set these to unlimited (even if you could) --- and especially not maxssiz --- and here's why not. I talk in 32-bit land speak now although the principle is the same regardless. Both the data and stack are allocated from the same quadrant. Let's suppose that your set maxdsiz to 1GB and maxssiz to 800MB (again, for simplicity in 32-bit applications). Because 800MB is already reserved for the stack (whether used or not) only 200MB would remain for data! (and actually a little bit less). Only extremely poorly written programs ever require stacks larger than 64MB --- even in 64-bit land so set maxssiz to 32 MB and maxssiz_64bit to 64MB. If your programmers need bigger stacks than that, apply a baseball bat to the cranium.
If it ain't broke, I can fix that.
rveri
Super Advisor

Re: ulimit settings !

Thanks All ,

What is the Maximum value can be set for MAXDSIZ_64bit :

OS is hp-ux B.11.11 9000/800
---------------------------------

http://docs.hp.com/en/939/KCParms/KCparam.MaxSsiz.html



This link says : Max can be :
1073741824 , But I am already having 2147483648 set. Thats greater than this value , and planning to add 50% more , to make it 3221225472.

It looks confusing after I found the link.

http://docs.hp.com/en/939/KCParms/KCparam.MaxSsiz.html

Pls advice,
Thanks.
Raj D.
Honored Contributor

Re: ulimit settings !

Seems you visited the wrong link :

Here it is :

http://docs.hp.com/en/939/KCParms/KCparam.MaxDsiz.html

And max can be set as follows:
maxdsiz_64bit for 64-bit processors:

Minimum
0x400000 (4 Mbytes)
Maximum
4396972769279
Default
0x4000000 (64 Mbytes)

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Patrick Wallek
Honored Contributor

Re: ulimit settings !

maxdsiz_64bit for 64-bit processors:

Minimum
0x400000 (4 Mbytes)
Maximum
4,396,972,769,279 bytes = 4 TB
Default
0x4000000 (64 Mbytes)

http://docs.hp.com/en/939/KCParms/KCparam.MaxDsiz.html

rveri
Super Advisor

Re: ulimit settings !

Thanks all ,

Here is the ulimit -a output:of our hpux 11.11

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

so I guess :

'data' shows --> maxdsiz_64bit value.
'stack' shows --> maxssiz_64bit value.

maxdsiz_64bit values is = 0x80000000 = 2147483648= 2GB , But its showing 1GB. ??

Also maxssiz_64bit value is :
maxssiz 0x12c00000 - 0X12C00000
maxssiz_64bit 0x40000000 - 0X40000000

But its showing : 307MB in ulimit. ??
Seems its showing the 32bit parameters (ie. maxssiz and maxdsiz) ...

Little Confusing.. it should show the 64 bit parameter , as the OS is 64bit.

Can any one explain.. little bit..

thanks,


Raj D.
Honored Contributor

Re: ulimit settings !

ulimit is shows data value for maxdsiz , and stack value for maxsiz values, if it is 64 bit OS it will use the maxdsiz_64bit and maxdsiz_64bit values.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Patrick Wallek
Honored Contributor

Re: ulimit settings !

You've got to keep in mind though that just because the OS is 64-bit, not all processes are 64-bit.

If you run a 32-bit program, then the program will use the parameters from maxssiz, maxdsiz and maxtsiz.

If the program is 64-bit, then it will use the 64-bit parameters - maxdsiz_64, maxssiz_64 and maxtsiz_64.
rveri
Super Advisor

Re: ulimit settings !

Thanks Patrick , thanks all....