Operating System - HP-UX
1752806 Members
6412 Online
108789 Solutions
New Discussion юеВ

Re: Oracle recommends to set ulimit -s 1048576

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor
Solution

Re: Oracle recommends to set ulimit -s 1048576

>Oracle recommends to set ulimit -s 1048576

Doing this may break your system. No application should need that amount of stack space. (Except perhaps Fortran.).

>I believe the value of stack reported in the output of ulimit -a, is limited to the maximum of maxssiz and not that of maxssiz_64bit

Right, that's why you should ignore it and just look at the kctune(1m) output. Or write your own 64 bit program to query getrlimit(RLIMIT_STACK, &rl)

+DD32:
data: S: 0x8000000 H: 0x8000000
data: S: 131072 Kb H: 131072 Kb
+DD64:
data: S: 0x40000000 H: 0x40000000
data: S: 1048576 Kb H: 1048576 Kb

>I do not understand why they say this and how to set it.

Why not ask them?
skalai
Occasional Contributor

Re: Oracle recommends to set ulimit -s 1048576

Thanks for the replies .

Oracle executable is 64bit .

All of these commands tried as root as well non-root user

Tried for unlimited option
# ulimit -s unlimited
ksh: ulimit: exceeds allowable limit
#ulimit -s 1048576
ksh: ulimit: exceeds allowable limit
#ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2097152
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) 4194303

Yes , I too believe that too high value for ulimit ├в s ,is not a good thing.

In some of the document I read that 4194304 , is the value to set for unlimited in Ksh . I tried this value and set successfully but no command can be executed .

#ulimit -s 4194304
#
After that stack was reported as 0 size .

#ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2097160
stack(kbytes) 0
memory(kbytes) unlimited
coredump(blocks) 4194303


And this caused the issue of NOT able to execute any command

# man ksh

Pid 7702 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxssiz.
Memory fault(coredump)

#

Yes , I have asked Oracle regarding these queries , yet to get the reply .

Thanks .
WayneHP
Frequent Advisor

Re: Oracle recommends to set ulimit -s 1048576

Please set it in your init files(.profile .cshrc etc) for the shell that you are using.

I is most likely set there already to a smaller size or the generic /etc/profile /etc/cshrc is setting it as you log in.

It appears you cannot change it to a large size after it was set smaller.

log out and back in and check with ulimit -a and ulimit -Ha

Horia Chirculescu
Honored Contributor

Re: Oracle recommends to set ulimit -s 1048576

>Tried for unlimited option
# ulimit -s unlimited
ksh: ulimit: exceeds allowable limit
#ulimit -s 1048576
ksh: ulimit: exceeds allowable limit
#ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2097152
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) 4194303

?Yes , I too believe that too high value for ulimit ├Г┬в├В ├В s ,is not a good thing.

>In some of the document I read that 4194304 , is the value to set for unlimited in Ksh . I tried this value and set successfully but no command can be executed .

If possible, please post a link of the document you are talking about. I doubt that someone from Oracle would recommend this setting.

Horia.
Best regards from Romania,
Horia.
Dennis Handly
Acclaimed Contributor

Re: Oracle recommends to set ulimit -s 1048576

>All of these commands tried as root as well non-root user

You need to write a 64 bit program to set and display the 64 bit umask values.
You can NOT use sh/ksh if you want the show/set the corresponding 64 bit values.

If you look at my output above, if you set maxssiz_64bit, you are done.

>this caused the issue of NOT able to execute any command

So don't do that. :-)
WayneHP
Frequent Advisor

Re: Oracle recommends to set ulimit -s 1048576

What does ulimit -Ha show? The hard limits?
skalai
Occasional Contributor

Re: Oracle recommends to set ulimit -s 1048576

No . ulimit is not set in any system profile or user profile files . I logged out and logged in and checked this . The value of ulimit ├в s , never get increased beyond 392192 .

I wanted to try to set as unlimited as well ,but unlimited set in 11iv3 not in 11iv2 .

> I doubt that someone from Oracle would recommend this setting.

Oracle recommends to set stack as 1048576 .ie ulimit ├в s 1048576

Hardlimit also gives the same error
ulimit -sH 1048576
sh: ulimit: The specified value exceeds the user's allowable limit.

ulimit -aH
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) 4096
WayneHP
Frequent Advisor

Re: Oracle recommends to set ulimit -s 1048576

Can you please send me the link to the Oracle doc you are refering to and also include the output of "kctune -g".

For data and stack, the global limits are directly derived from the maxdsiz/maxdsiz_64bit, maxssiz/maxssiz_64bit kernel tunables. Processes get the global limits as their hard limit if the parent did not modify (lower) the hard limit. Soft limits start as the hard limit and can be modified by processes as well. If the parent modified the hard limit, that limit is propagated to the child (if possible, cases like 64-->32 exec don't always allow this, in which case the more restrictive limit is applied (32-bit system limit vs. parent

The Oracle install doc for 10g

http://download.oracle.com/docs/cd/B19306_01/install.102/b25293.pdf

for example states on page 2-13

Parameter Recommended Formula or Value
-------------------------------------------
ksi_alloc_max (nproc*8)
executable_stack 0
max_thread_proc 1024
maxdsiz 1073741824 (1 GB)
maxdsiz_64bit 2147483648 (2 GB)
maxssiz 134217728 (128 MB)
maxssiz_64bit 1073741824 (1 GB)
maxuprc ((nproc*9)/10)
msgmap (msgtql+2)
msgmni (nproc)
msgseg 32767
msgtql (nproc)
ncsize (ninode+1024)
nfile (15*nproc+2048)
nflocks (nproc)
ninode (8*nproc+2048)
nkthread (((nproc*7)/4)+16)
nproc 4096
semmni (nproc)
semmns (semmni*2)
semmnu (nproc-4)
semvmx 32767
shmmax The size of physical memory or 1073741824 (0X40000000),
whichever is greater.
Note: To avoid performance degradation, the value should
be greater than or equal to the size of the available
memory.
shmmni 512
shmseg 120
vps_ceiling 64

If this was a 10g install and you followed the install guide your stack size will be fine and there would be no need to use the limit command.
Shoghi Martinez G.
Honored Contributor

Re: Oracle recommends to set ulimit -s 1048576

WayneHP
Frequent Advisor

Re: Oracle recommends to set ulimit -s 1048576

A great Power point preentation.

Which still states to go get the latest install guide from Oracle on slide 14 for the kernel parameters.