Re: nfile kernel parameter

 
SOLVED
Go to solution
Shivkumar
Super Advisor

nfile kernel parameter

what is nfile kernel tuning parameter ? how to calculate it ?

Thanks,
Shiv
11 REPLIES 11
Warren_9
Honored Contributor

Re: nfile kernel parameter

hi

nfile
= maximum number of open file
= (16*(NPROC+16+MAXUSERS)/10+32+2*(NPTY+NSTRPTY+NSTRTEL))

GOOD LUCK!
Indira Aramandla
Honored Contributor

Re: nfile kernel parameter

Hi Shiv,

nfile defines the max. no. of open files in the system. The files are opened by vaious applications running in the system

Note: nfile may need to be raised, under this scenario take out the forumula and put in a number.

Also check maxuprc

That is the max number of processes for a given user. That defaults to 75 and I commonly need to bnump that up to 200 to accommodate complex Oracle products.

In a growing system, it is very normal to need nfile and nproc increased. To avoid unnecessary reboots, I would replace the formulae with a fixed value. As mentioned, MAXUSERS will affect other parameters so it is useful to break this link. If nfile is currently 15000, make it 30000. In other words, double or triple the value once you reach about 75% usage. 2x or 3x changes will allow for more growth without reboots.

In a growing system, it is very normal to need nfile and nproc increased. To avoid unnecessary reboots, you could replace the formulae with a fixed value. If nfile is currently 15000, make it 30000. In other words, double or triple the value once you reach about 75% usage. 2x or 3x changes will allow for more growth without reboots.


IA
Never give up, Keep Trying
Matthew_50
Valued Contributor

Re: nfile kernel parameter

Hi, Shivkumar,

you can use 'kmtune -q nfile' for current value of nfile.

Minimum : 14
Maximum : Memory limited
Default :
((16*(Nproc+16+MaxUsers)/10)+32+2*(Npty+Nstrpty)

also the nfile formula is ((16*(Nproc+16+MaxUsers)/10)+32+2*(Npty+Nstrpty)

you can use 'sam' to adjust nfile value in kernel
Yogeeraj_1
Honored Contributor

Re: nfile kernel parameter

hi Shiv,

Below a quote from: http://docs.hp.com/en/939/KCParms/KCparam.Nfile.html


nfile defines the maximum number files that can be open at any one time, system-wide.

It is the number of slots in the file descriptor table. Be generous with this number because the required memory is minimal, and not having enough slots restricts system processing capacity.


Note that you can use glance to view nfile (option t). You can also use the 'F' option in glance to see Process Open Files.

Alternatively 'lsof' is an excellenet utility for viewing open files.
e.g.
# lsof -p

also, you can run:
'sar -v 1 10' and see the value of file-sz.

Also see, Jeff's post at this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=686554


hope this helps too!
regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
morganelan
Trusted Contributor

Re: nfile kernel parameter

nfile governs the maximum number of files that can be open on the entire system at any given time.

When using formulas to specify a parameter value, the formula must be an integer expression. In other words, every element in the expression must be an integer value as defined for the C programming language.

Configurable parameter names are usually lowercase but the values assigned to them are specified in formulas as the same name with initial capitals. For example, the value assigned to npty (by a C-language #define statement) is Npty. Thus, a typical formula for nfile in the kernel description file resembles:

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

where Nproc represents the defined value of nproc, MaxUsers represents the defined value of maxusers, and Npty represents the defined value for npty. There are a few isolated exceptions to the uppercase/lowercase rule on certain systems, but they are few.

White space (spaces and tabs) are not allowed in the kernel description file. If any are present in the formula value typed into the value box, SAM removes the white-space characters where necessary.
Kamal Mirdad
Yogeeraj_1
Honored Contributor

Re: nfile kernel parameter

hi again,

attached an extract from metalink note: 1008376.6 Subject: INSTALLING ORACLE 7.0.X - 7.2.X ON UNIX PLATFORMS

which describes nfiles as:
NFILES - The maximum number of open files that a user can have. On some systems, this parameter may need to be increased in order to allow the oracle user to open the files that it needs in order to bring up multiple instances.

hope this helps too!
regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Mahesh Kumar Malik
Honored Contributor

Re: nfile kernel parameter

Hi Shiv

nfile is maximum no of files which can be opened simultaneously in the system. Following link may be of help

http://docs.hp.com/en/939/KCParms/KCparam.Nfile.html

Regards
Mahesh
morganelan
Trusted Contributor
Solution

Re: nfile kernel parameter

Individual processes can open one or more files for reading or writing, and it is not uncommon for a process to have many files open at the same time; particularly in large database applications, for example.

Furthermore, mail, database, and other applications often require simultaneous access to a given file by two or more processes. To prevent file or data corruption, a process that is altering the contents of a file must be able to lock the file against conflicting uses until it is safe to release control of the file.

Open and locked files require memory and other system resources. These resources must be balanced against other system needs to maintain optimum overall system performance. Use nflocks to limit the combined total number of file locks that are available system-wide to all processes at any given time.

Two parameters, maxfiles and maxfiles_lim, respectively, govern the soft and hard limits on the number of files a process can open simultaneously. nfile governs the maximum number of files that can be open on the entire system at any given time.
Kamal Mirdad
Cem Tugrul
Esteemed Contributor

Re: nfile kernel parameter