1847403 Members
3097 Online
110264 Solutions
New Discussion

ulimit

 
SOLVED
Go to solution
Lee Huei
Regular Advisor

ulimit

Hi,

can stack size be set to unlimited value ?


thks
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: ulimit

Hi,

No. It can only be set upto the value of the kernel parameter maxssiz_64bit (for 64bit OSes). To find the maxssiz values, use

kmtune -l -q maxssize(_64bit)

Increasing the kernel parameter means recompiling the kernel and rebooting the system.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Lee Huei
Regular Advisor

Re: ulimit

hi,

how about data size? can it be set to unlimited value?

thks
Sridhar Bhaskarla
Honored Contributor

Re: ulimit

Hi,

Nop. Though it may say 'unlimited' still it is limited to the kernel parameter maxdsiz(_64bit).

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sยภเl Kย๓คг
Respected Contributor

Re: ulimit

Mico
It is not possible to set the stack size to unlimited.
It is only possible to set to the maximum value of stack size
"maxssiz" is in the case of a 32 bit os
and "maxssiz_64bit" in the case of a 64 bit os
regards
SK
Your imagination is the preview of your life's coming attractions
Mei Jiao
Respected Contributor
Solution

Re: ulimit

As for sh-posix shell, the sh is only a 32-bit binary, therefore 'stack' size is bound to kernel parameter 'maxssiz'.

To verify this, you can run the 'file' command against the binary files:
If it's PA-RISC1.1 and/or SOM, then it's 32-bit.
If it's PA-RISC2.0 and/or ELF, then it's 64-bit.

Therefore, I believe the stack size is reference to the maxssiz only as it's a 32-bit binary even though the OS is 64-bit OS Kernel Bits.

I have done this testing yesterday. Kindly correct me if I'm wrong.
Mei Jiao
Respected Contributor

Re: ulimit

Sridhar,

# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited <----
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) 392192

I also think that data size cannot be set to 'unlimited', however I saw the output as above. After seeing your message, although the above shows 'unlimited', data size still limited by maxdsiz right?

Thank you.
Sridhar Bhaskarla
Honored Contributor

Re: ulimit

Hi Mei,

Yes. Just because it displays the data segment size as 'unlimited', it doesn't mean you can create one with more than maxdsiz(_64bit) size. You cannot exceed system wide limits. Moreover, one can only reduce the values using ulimit. So, if your SystemsAdministrator decided to give you only half of maxdsiz, then you cannot increase it beyond that value without the intervention of your SA.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try