Operating System - HP-UX
1836627 Members
1918 Online
110102 Solutions
New Discussion

Re: Kernel parameter Maxfiles_lim

 
Mridul Dutta
Advisor

Kernel parameter Maxfiles_lim

Hi Friends,

We have a process on one our node that has a large number open files, but there are no warning messages in /var/opt/messages.

I have increased maxfiles_lim size to 1024 .

After increasing the kernel parameter still i m getting the following without having any warnings :

TimeStamp = 2007-12-05:16:27:27 Pid = 2573 Open Files = 4115
TimeStamp = 2007-12-05:16:27:27 3104 2573 FIFO
TimeStamp = 2007-12-05:16:27:27 997 2573 REG


Regards

Mridul
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: Kernel parameter Maxfiles_lim

There are 3 limits in play and you have changed only one.

1) NFILE --- the system-wide number of open files NOTE: 3 processes having /etc/passwd open count as 1 file for this parameter.

2) maxfiles -- the per-process maximum number of files soft limit. In this case, the same process having /etc/passwd open 3 times counts as 3.

3) maxfiles_lim -- the per-process maxnumber of files hard limit. The files are counted the same as for maxfiles. A process with proper permissions can increase the number of open files from the soft limit upto the hard limit.

I really don't see a question in what you have posted but normally nfile >> maxfiles_lim so 4115 system-wide open files is not unusual at all.
If it ain't broke, I can fix that.
Mridul Dutta
Advisor

Re: Kernel parameter Maxfiles_lim

As i have changed maxfiles_lim to 1024 but still it showing more then 4000 file opening without any warning messagese.


should i changed all three parameter to get a warning messages when it crossed 1024 limit.
A. Clay Stephenson
Acclaimed Contributor

Re: Kernel parameter Maxfiles_lim

You should get a warning message (actually a failed system call) when the process exceeds maxfiles. The process can then request to increase the allowed per-process number of files upto maxfiles_lim. When that limit is reached, an open() system call again fails.

How a process handles a failed open() is strictly up to the developer. I've seen code that blindly assumes everything works and goes on trying to read and write from/to a bogus file descriptor.


It would really helped if you identified the source of these messages. You should also note that just because there is a message that says "open Files = 4115" that does not necessarily mean that 4115 files are open. That message means precisely what the developer coded and no more and no less. It could mean that you drank 4115 bottles of Coca-cola this year.
If it ain't broke, I can fix that.
Venkatesh BL
Honored Contributor

Re: Kernel parameter Maxfiles_lim

Is this process running with root privileges? If so, I don't think these limits are applicable to root.
Mridul Dutta
Advisor

Re: Kernel parameter Maxfiles_lim

processes are not running by root