1825771 Members
2104 Online
109687 Solutions
New Discussion

Re: nfile increase

 
SOLVED
Go to solution
Mauro Livi
Valued Contributor

nfile increase

Hi all,
Quick question, we have an RP7440 running HPUX 11.11, and in looking at a sar -v (below) it seems as though it may be time for me to increase the nfile kernel setting. Our limit is 22693 and though it usually operates at about 14K, I've seen it go above 18K as shown below).
Seems to me that I can safely increase to say 35K or 40K since I have plenty of memory on this machine. Nproc setting seems to be fine. Just wanted to get your 2 cents.
Thanks in advance to all those who reply.

07:47:51 text-sz ov proc-sz ov inod-sz ov file-sz ov
07:47:52 N/A N/A 611/4116 0 3309/34976 0 14946/22693 0
11:37:50 N/A N/A 670/4116 0 3442/34976 0 18027/22693 0
16 REPLIES 16
James R. Ferguson
Acclaimed Contributor
Solution

Re: nfile increase

Hi Mauro:

Increase 'nfile' as noted. There is very little overhead to inflating the value. Note that:

nfile >= 2*maxfiles_lim

Regards!

...JRF...
Mauro Livi
Valued Contributor

Re: nfile increase

Thanks JRF,
Yeah, my maxfiles_lim is 2048 so I should be ok by increasing it as I've mentioned.

Thanks
Mauro
Mauro Livi
Valued Contributor

Re: nfile increase

BTW,
If I increase nfile to 40K as mentioned above, is it a good idea to increase npty, nstrpty and nstrtel? All those are set to 60. I'd rather not change a bunch of kernels at once, so I was thinking just changing nfile.
I am running HPUX 11.11 with 32GB RAM.

Thanks
Mauro
Mauro Livi
Valued Contributor

Re: nfile increase

Scratch my last question...I don't think that telnet/tty streams allowed would be an issue.
Thanks
Mauro
Dennis Handly
Acclaimed Contributor

Re: nfile increase

>I don't think that telnet/tty streams allowed would be an issue.

Right, probably not related. But if they are close to the limit, you might want to do both at once.
Mauro Livi
Valued Contributor

Re: nfile increase

One last question on this. As stated earlier, my current nfile setting is 22693. Not sure why my predecessor would have set it this way (I mean why not 22K or 20K), so I'm wondering, is there any correlation to another kernel that I'm not aware of? (other than the
nfile >= 2*maxfiles_lim that JRF previously mentioned).
As far as I know, I should be able to just set my nfile to 40K.

Thanks
Mauro
James R. Ferguson
Acclaimed Contributor

Re: nfile increase

Hi:

A formula like:

((16*(Nproc+16+MaxUsers)/10)+32+2*(Npty+Nstrpty)

...used to be used to establish a value for 'nfile'. These antics are deprecated and now a simple value is used. The parameter limits the number of slots in a kernel table representing open files. The memory overhead for each slot is very small and hence there is very little penalty to you for inflating the 'nfile' value.

Interestingly, in the case of 'nfile' in 11.31 and later, this kernel parameter is being obsolesced:

http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c02266682/c02266682.pdf

Regards!

...JRF...
Mauro Livi
Valued Contributor

Re: nfile increase

Thanks for your input JRF...always valuable.
Ok then, I'm just going to set it to 40K and go on with life.

Thanks again
Mauro
Steven E. Protter
Exalted Contributor

Re: nfile increase

Shalom,

Sorry I missed this one. The formula designers did not use real world data when making their calculations.

Myself and Bill Hassell recommend removing formulas from the Kernel and setting real world values.

I agree with the decision to go 40K for now. Glance can be used to monitor high water marks so you can proactively set these values.

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
Mauro Livi
Valued Contributor

Re: nfile increase

Thanks SEP,
Yeah I've been watching it and it's gotten to about 75%-80% of nfile. I'll increase it as discussed and keep an eye on it.

Thanks
Mauro
James R. Ferguson
Acclaimed Contributor

Re: nfile increase

Hi (again):

> SEP: The formula designers did not use real world data when making their calculations.

Really? I think not. The formula were an attempt to constrain interrelated settings to consistent values and scales thereby lifting some of the human choices that would lead to needless resource consumption when one parameter was grossly inflated but otherwise limited by a second related parameter's value.

...JRF...
Mauro Livi
Valued Contributor

Re: nfile increase

Sorry...just noticed I quoted the machine as being an rp7440...the machine I was talking about is an rp4440...PA-RISC, HPUX 11.11. I assume this changes nothing and I can proceed with changing the said nfile to a flat 40K value.

Thanks
Mauro
Steven E. Protter
Exalted Contributor

Re: nfile increase

With regards to Kernel Formulas.

I'm part of the Bill Hassell school on this. He explains it much better than I. His course on system building, which is on one of my websites as a ppt file specifically recommends ripping out the formulas.

There may be exceptions, or formulas you can not bypass. I will let Bill speak for himself if he chooses to weigh in.

Regards,

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
Mauro Livi
Valued Contributor

Re: nfile increase

Thanks SEP...will review the ppt.
Bottom line in my case is that I should be able to change it to a specific value (i.e 40K) as it currently set to something which I feel is too low. Like I said, I'll set it and monitor and if needs be, I'll adjust it.
Seems like a pretty "safe" way to go.

Thanks
Mauro
Bill Hassell
Honored Contributor

Re: nfile increase

Way too much discussion about this parameter -- it needs to be larger than you'll ever need. Make it 50000 or 75000. I have seen 11.11 running just fine with nfile well over one million (do to a very bad application design but it works). The upside is that nfile=75000 means your applications will without file descriptor limitations (assuming no major changes to the environment) and the downside is that the kernel will be a few megs larger.

An example of a bad formula is ninode. IT should have a value in the 2-10k range. Lots of systems have crazy values like 50k or 100k due to a useless formula.HP-UX systems range from a simple D-class box with 256MB of RAM to a superdome with 64 procesors and 256 GB of RAM. The formula design was done more than a decade ago and it wasn't right then... Requirements for a simple web server are very different than for a PeopleSoft or SAP server. So as a sysadmin, you look at the overall environment, review the application and database requirements and then monitor limits with tools like sar, ipcs and glance.


Bill Hassell, sysadmin
Mauro Livi
Valued Contributor

Re: nfile increase

Increased the parameter as mentioned without incident.

Thanks to all who contributed.

Mauro