Thursday, November 22, 2007

file-max and semmni parameters

During installation of Oracle Application server on a fresh RedHat Linux server we encountered the problems as shown below.

Checking for hardnofiles=1024; found hardnofiles=1024. Passed

Checking for VERSION=2.6.9-11.EL; found VERSION=2.6.9-55.ELsmp. Passed
Checking for file-max=206173; found file-max=16384. Failed <<<<
Checking for semmsl=256; found semmsl=522. Passed
Checking for semmni=142; found semmni=128. Failed <<<<
Checking for msgmax=8192; found msgmax=8192. Passed
Checking for shmmni=4096; found shmmni=4096. Passed
Checking for softnofiles=1024; found softnofiles=1024. Passed
Check complete. The overall result of this check is: Failed <<<<
Problem: The security parameters in the kernel do not meet the minimum requirements (see above).
Recommendation: Perform operating system specific instructions to update the kernel parameters, namely BIT_SIZE and noexec_user_stack.
=======================================================================

Checking for file-max=206173; found file-max=16384. Failed <<<<
This number indicates the maximum number of files normal users (i.e. non-root) can have open in a single session. Note that for the root user, ulimit -n will sometimes output 1024 even after following the procedure to increase the maximum number of open files. This won't effect root's ability to open large numbers of files, as only normal users are bound by this value. To check the current active setting execute the following command:

#cat /proc/sys/fs/file-max

If this is not what you desire, you want it for example set to 206173 you can execute the following command to make it active on-the-fly:

#echo 206173 > /proc/sys/fs/file-max

The downside of this is that the next time you have to reboot your system you will loose the new settings. To make sure that during the next boot your system will have those settings you have to edit the /etc/sysctl.conf file. In this file you have to make sure that the file-max line reads:

fs.file-max = 206173


Checking for semmni=142; found semmni=128. Failed <<<<
The semmni parameter defines the maximum number of semaphore sets in the entire Linux system. You can check the current setting of the semmni parameter by executing the following command:

ipcs -ls

Or you can do a cat /proc/sys/kernel/sem which will give you also the requested information even do it will be in a less user vriendly way. To set new settings on-the-fly you can set them by executing the following command:

#echo 256 32000 100 142 > /proc/sys/kernel/sem

However, to set the new settings permanalty you will have to change the kernel.sem settings in /etc/sysctl.conf so it will be used during a reboot.

No comments: