1833861 Members
1966 Online
110063 Solutions
New Discussion

ulimit values

 
SOLVED
Go to solution
Narendra Uttekar
Regular Advisor

ulimit values

Hi,
Current ulimit values are as below,
hostname:[/]# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 4096

I want to set values to unlimited for data,stack,coredump and nofiles.

Thanks,
Narendra
12 REPLIES 12
R.K. #
Honored Contributor
Solution

Re: ulimit values

Hi Narendra,

Check for the hard limits set on your server by
# ulimit -aH

And then you can set values by following commands:
# ulimit -n <-- nofiles
# ulimit -c unlimited <-- coredump

For data ulimit see:
http://fixunix.com/hp-ux/143649-changing-data-ulimit-kernel.html

For Stack ulimit see:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1076377


Hope this helps !!

- R.K.
Don't fix what ain't broke
inukoti
Frequent Advisor

Re: ulimit values

Hi narendra,

all values not shown as unlimited cannot be stated as limited, because the stack size represented by kernel parameter maxssiz and maxssiz_64bit have a maximum value around ~ 400MB if you want to change u need to change the kernel param and then reboot.

In your case if user would like to have all unlimited values.
you should login as root to do the following

ulimit -d unlimited
ulimit -s unlimited
ulimit -n unlimited
ulimit -c unlimited

Have fun

bobby
Narendra Uttekar
Regular Advisor

Re: ulimit values

Please can you tell me what kernel parameter value i will need to set so that i can set all the values for ulimit as unlimited.
maxdsiz and maxdsiz_64bit -- what value?
maxssiz and maxssiz_64bit -- what value?
maxfiles and maxfiles_limit -- what value?
I don't have problem to re-build the kernel and to restart the server.
inukoti
Frequent Advisor

Re: ulimit values

Hi narendra,
execute the values below as stated with root access

ulimit -d unlimited
ulimit -s unlimited
ulimit -n unlimited
ulimit -c unlimited

Log in as a normal user or su -
and execute ulimit -a and check if every thing is unlimited .
If you didnot get the results try to change the kernel params

if you logged in as root ,execute
kcweb (11.23) or https://your-machine:2301/ (11.31)
> tunables > browse params and change . Max values will be shown at that page.

bobby
Taifur
Respected Contributor

Re: ulimit values

Hi Narendar

You ca check below link,


http://docs.hp.com/en/B2355-90693/ulimit.2.html

RGds//
Taifur
Narendra Uttekar
Regular Advisor

Re: ulimit values

I am having HP-UX 11.11 . And when i checked with kmtune it shows only current and planned values not MAX values.

Please let me know how to check the MAX values so that i can set the same.
Jeff Schussele
Honored Contributor

Re: ulimit values

Your current value *is* your current max value.
Your planned value is your max value after your next reboot.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Narendra Uttekar
Regular Advisor

Re: ulimit values

I want to set all the values for ulimit as unlimited. For that what values i will need set to make change in kernel paramter as below,
maxdsiz and maxdsiz_64bit -- what value?
maxssiz and maxssiz_64bit -- what value?
maxfiles and maxfiles_limit -- what value?
Jeff Schussele
Honored Contributor

Re: ulimit values

You simply set those kernel parameters to values higher than approx 1.75 times actual memory.

This of course requires that you have the kernel parameter swapmem_on set to 1 (on).
Even though the ulimit -a won't specifically say "unlimited" the values at that setting implicitly set them as such.

I must caution you on this approach as a runaway process or poorly coded apps could exhaust all memory & you'd come to a grinding halt.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: ulimit values

Shalom,

maxdsiz and maxdsiz_64bit -- what value?
maxssiz and maxssiz_64bit -- what value?
maxfiles and maxfiles_limit -- what value?

The answer depends on how you use your server.

If you have a big Oracle server running large SGA values of between 2 GB and 8 GB can be called for.

I likex maxfiles and maxfiles_limit to be at least 4000. But again it depends on how the server is used.

maxuprc, the maximum process for any non-root user comes to play as well.

http://docs.hp.com/en/1219/tuningwp.html

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
Dennis Handly
Acclaimed Contributor

Re: ulimit values

>I want to set all the values for ulimit as unlimited.

You can't, don't even try. Why are you even asking about this? Do you have a specific application and limit you need to make larger?

>to make change in kernel parameter as below,
>maxdsiz and maxdsiz_64bit -- what value?
>maxssiz and maxssiz_64bit -- what value?
>maxfiles and maxfiles_limit -- what value?

You can't set maxdsiz larger than 4 Gb.
Setting maxssiz larger, subtracts away from maxdsiz, so don't change that.

Making maxfiles_limit very large may make your system unbootable. That's what happened the last time someone asked a question exactly like yours.
Narendra Uttekar
Regular Advisor

Re: ulimit values

Thanks for the solution.