Operating System - Linux
1752774 Members
4758 Online
108789 Solutions
New Discussion юеВ

Re: Help with kernel parameters

 
SOLVED
Go to solution
K.C. Chan
Trusted Contributor

Help with kernel parameters

I need to tuned the following parameter for MQ series,
1. max open files
2. max inodes
3. max processes

I know I can use sysctl to tuned it and edit sysctl.conf file so the next time the server is rebooted it will set the parameter accordingly. However, I am a bit uncertain what the name of these parameters are under Linux.


For max file and inode, this is what I have narrow it down to:
fs.file-max
fs.file-nr
fs.inode-nr
I would think fs.file-max would be the number of max open files. But what is fs.file-nr and fs.inode-nr? Could someone shed some light on it? when check the vaule for fs.inode-nr, I get "fs.inode-nr = 4039 18" it has two value. Are the vaule min and max? how would I set it via sysctl command and in sysclt.conf file; The reason I ask this is because I am use to setting only one value for one parameter. The same goes for "fs.file-nr = 4925 2340 209708". That's it for max file number and inode.

What parameter name corresponds in linux to "max no. of processes in a system" and "max no. of processes per user"? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
4 REPLIES 4
Steven Mertens
Trusted Contributor
Solution

Re: Help with kernel parameters

hi,

You can find a lot of information on proc parms in the documention that comes with the kernel sources.

/usr/src/linux-2.4/Documentation/filesystems/proc.txt

I attached the file, i think it
will answer your questions.
Go to the section :

2.1 /proc/sys/fs - File system data

brgds.

Steven
I_M
Honored Contributor

Re: Help with kernel parameters

why don't you try "sysctl -a"

Good luck

Re: Help with kernel parameters

Hi,
The value in file-max mean maximum
handles that the Linux kernel will allocate.
This parm is good to edit if is required.

echo "fs.file-max = xxxxxxx" >> /etc/sysctl.conf
sysctl -p

The three values in file-nr mean
the number of allocated
file handles, the number of used file handles and the maximum number of file handles.

The value inode-max mean max of inodes handles and is recomended that this value is 3-4x greater than file-max, when is required it is possible to edit this value.

echo "fs.inode-max=xxxxxxx" >> /etc/sysctl.conf
sysctl -p

with value inode-nr is it similar as file-nr.

regards
Frantisek

Re: Help with kernel parameters


2)in kernel 2.3 and < there is in
/usr/src/linux/include/linux/tasks.h
param:
NR_TASKS, MAX_TASKS_PER_USER, NR_TASKS/2) and MIN_TASKS_LEFT_FOR_ROOT.
need to compile kernel after change.

in kernel 2.4.x and >
Param max procesess eq. NR_TASKS and MAX_TASKS_PER_USER, allowed,
is on 2.4 kernel dynamic function how much memory do you have(I think )

Second part is setting limit for shell
ulimit -a

ulimit -u unlimited or LIMIT

Hi,
Frantisek.