Operating System - HP-UX
1821547 Members
1926 Online
109633 Solutions
New Discussion юеВ

Re: Oracle recommends to set ulimit -s 1048576

 
SOLVED
Go to solution
skalai
Occasional Contributor

Oracle recommends to set ulimit -s 1048576

Oracle recommends to set ulimit -s 1048576, on HPUX 11iv2 system .

#ulimit -s 1048576
ksh: ulimit: exceeds allowable limit

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

So the maximum for ulimit -s , is 392192 , only .This is checked with #man maxssiz.

Is it possible to set ulimit -s 1048576 (as viewed from ulimit -a from shell prompt)?

Thanks
19 REPLIES 19
Horia Chirculescu
Honored Contributor

Re: Oracle recommends to set ulimit -s 1048576

Hello Skalai

If you have 64bits Oracle version, then it's maxssiz_64. Increase this value.

This parameter is static. It means that you must restart your server in order to use the new value.

Horia.
Best regards from Romania,
Horia.
skalai
Occasional Contributor

Re: Oracle recommends to set ulimit -s 1048576

Thanks for the reply.

But maxssiz_64bit is already set to the value recommended by Oracle .

maxdsiz_64bit 4294967296 Default Immed
maxssiz 134217728 134217728 Immed

The issue is when trying to set #ulimit -s 1048576 .

Ulimit can be set to the value of maxssiz only and not that of maxssiz_64bit , since the shell itself is 32bit .

But Oracle recommends to set -s 1048576 .

Thanks in advance
Prasanth Thomas
Valued Contributor

Re: Oracle recommends to set ulimit -s 1048576

Hello Kalai,

Please check the current value for by giving the kctune command. If the value is 392192 then you have to reset with your required value and reboot the server, before doing this activity please take the back up of kctune. Please let me know the o/p of . And i think you can make the value as unlimit by giving the below command

Regards,
Prasanth Thomas.
Michal Kapalka (mikap)
Honored Contributor

Re: Oracle recommends to set ulimit -s 1048576

hi,

there was a book :

"Best practices for Oracle on HPUX"

http://h21007.www2.hp.com/dspp/files/unprotected/database/HP3KOracle.ppt

but this link is not accessible any more.

you could try to find it on the internet,

but on one slide there are some recommended value, so i will send it as attachment of this response.

hope it will help you.

i'm surpriced why HP removed this great docu from their web page.

mikap

Michal Kapalka (mikap)
Honored Contributor

Re: Oracle recommends to set ulimit -s 1048576

hi,

second attachment.

mikap
skalai
Occasional Contributor

Re: Oracle recommends to set ulimit -s 1048576

Below are the current values:

kctune |grep maxss
maxssiz 401604608 401604608 Immed
maxssiz_64bit 1073741824 1073741824 Immed

ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2097154
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 2048

ulimit -s 1048576
sh: ulimit: The specified value exceeds the user's allowable limit.


ulimit -s 392193
sh: ulimit: The specified value exceeds the user's allowable limit.

The current and max.value of maxssiz = 401604608 -> 401604608/1024=392192 -> so this will be max.for ulimit -s .

But Oracle recommends to set -s 1048576 . I do not understand why they say this and how to set it .

Thanks

Horia Chirculescu
Honored Contributor

Re: Oracle recommends to set ulimit -s 1048576

>Ulimit can be set to the value of maxssiz only and not that of maxssiz_64bit , since the shell itself is 32bit .

"the shell itself is 32 bit" ?!
In this case it is important what kind of ORACLE executable you have installed (32 or 64bits). If you have 64 bit, then you should look at maxssiz_64.

By default, maxssiz is 0x800000 (8M) and maxssiz_64 is 0x10000000 (256M). (observe ratio 1:32)

Horia.
Best regards from Romania,
Horia.
Prasanth Thomas
Valued Contributor

Re: Oracle recommends to set ulimit -s 1048576

Please go through the below link. I am looking in to this issue and keep you posted.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1265101413704+28353475&threadId=1043924

Regrads,
Prasanth Thomas.
Prasanth Thomas
Valued Contributor

Re: Oracle recommends to set ulimit -s 1048576

Are you ruuning the command from root user right?.
what about # ulimit -s unlimit

regards,
Prasanth Thomas.
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.