1837948 Members
2089 Online
110124 Solutions
New Discussion

modifying nfile param

 
SOLVED
Go to solution
Todd McDaniel_1
Honored Contributor

modifying nfile param

I have a problem with my nfile maxing out around 90/95%... and I get many errors from my Patrol monitoring software.

My current nfile is set at 59712...

I know that nfile requires a very small amount of memory for its reservation so I am looking at increasing my nfile to 80k-100k...

My current memory is 71.2GB... so I dont think it will be a problem...

Just wanted advice about my choice of an arbitrary value of 80k... I was picking it based on being at almost 50-60k and increasing by 30% so that I would fall somewhere around 62.5-75%... Probably around 69% at my current running number of nfiles used during peak time.

Unix, the other white meat.
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: modifying nfile param

Hi:

Well, if you need it, increase it. You've done the math -- given your current usage, ~65-75% utilization leaves a comfortable cushion.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: modifying nfile param

With that much memory, 80K for nfile should be absolutely no problem. If you are still tied to the formula based upon NPROC, I would clobber the formula and plug the numerical value in directly. Your box sounds like it really doesn't "fit" the default computation method. It is also possible that a given process might be opening many files so you might need to bump up maxfiles as well.
If it ain't broke, I can fix that.
Todd McDaniel_1
Honored Contributor

Re: modifying nfile param

Okaym I will go ahead and increase the param to 80k.

Maybe you can explain what "useful"means in this statement from the description from maxfiles kernel parm...

quote:
To be useful, the value assigned to maxfiles must be less than the value of maxfiles_lim. maxfiles_lim is useful only if it does not exceed the limits imposed by nfile and ninode.

end quote...

My maxfiles is 2048
My maxfiles_lim is 1024
My ninode is 37332

Should I also increase maxfiles_lim or only maxfiles parm?
Unix, the other white meat.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: modifying nfile param

In this context, "useful" means that the per process number of file descriptors can come into play only if there are sufficient files and inodes left to accomodate the request.

Suppose that nfile = 3000, and 2000 were in use. If maxfiles were 2048, a new process couldn't open more than 1000 files because that's all the global resources available.

Ulimit allows a process to increase the number of allowed files up to the "hard" limit value. The initial value is the "soft" limit.

By the way, if your ninode valus is large, you can safely reduce it to about 1000-1200 or so -- and save resources. Ninode only applies to hfs filesystems and I'll bet your only hfs filesystem is /stand. You can build very, very complex kernels with "only" 1000 files.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: modifying nfile param

Hi (againi):

First, 'maxfiles' is also called the "soft limit" defining the maximum number of files a process can open. This boundry can be increased.

'maxfiles_lim' is the upper point, on an individual, per-process-basis, to which a process can grow the boundry for the maximum number of files. It's called teh "hard-limit" for the process.

'nfile' imposes the overall, system-wide limitation on the maximum number of files that can be open simultaneously, regardless of any per-process limits.

Hence, you want the following relationship:

nfile > maxfiles_lim > maxfiles

Regards!

...JRF...