1752805 Members
5567 Online
108789 Solutions
New Discussion юеВ

Ulimit value

 
SOLVED
Go to solution
ThanseerK
Occasional Contributor

Ulimit value

I have a hp ux 11.23 system. I need to increase the nofiles ulimit value to double the size.
ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2015464
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 4096

I can able to increase it using the command #ulimit -n 8192
But it is changing it to the old value once i exited from the shell. Can anyone suggest the procedure for setting this value permanently.
6 REPLIES 6
Matti_Kurkela
Honored Contributor

Re: Ulimit value

For one user only: add the ulimit command into the .profile script for that user.

For all users: add the ulimit command to /etc/profile.

For all users, may require a reboot: adjust the "maxfiles" kernel parameter to set it to a new system-wide default.

MK
MK
Kapil Jha
Honored Contributor

Re: Ulimit value

for user specific change .profile
for all users change in profile file.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
ThanseerK
Occasional Contributor

Re: Ulimit value

Hi Matty,

Thanks for your reply.

Does this maxfiles is static or dynamic. My sam window doesn't show whether it is static or not.
Don Morris_1
Honored Contributor

Re: Ulimit value

Static.

http://docs.hp.com/en/B2355-60103/maxfiles.5.html

(or you could just do "man maxfiles" on your v2 box... all public tunables on v2 and higher are supposed to have man pages provided for just this reason).
Bill Hassell
Honored Contributor
Solution

Re: Ulimit value

There are two kernel parameters for nofiles: maxfiles and maxfiles_lim. The maxfiles value is what ulimit -a reports without modification. You can raise the value up to the hard limit of maxfiles_lim. However, your system manager may have followed poor documentation from an application vendor which said to make maxfiles=maxfiles_lim. That of course defeats the entire purpose of having a soft limit (maxfiles) for most users and processes, and a hard limit (maxfiles_lim).

If you need 8192 files open at the same time inside one process, then maxfiles_lim must be raised to at least 8192. maxfiles and maxfiles_lim are dynamic and can be changed without a reboot.


Bill Hassell, sysadmin
ThanseerK
Occasional Contributor

Re: Ulimit value

i have used sam to change the maxfiles_lim and maxfiles_size parameters and after reboot my system is fine now