[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Increasing number of allocated file handles



Dominique Demore wrote:
Hi Everyone,

On our Oracle Application server, we have noticed that we are running out of file handles. Once the number of used file
handles reaches 0, the application crashes/reset itself.
I have increased the number of file handles from 65536 to 104854, but I am still seeing the problem. Should the number
of allocated file handles be increase also, if so, where is the file to modify it.

(*note: the second column will hit 0 everyday at ~9:00 when everyone is logging into the system.)
------
[root server fs]# cat /proc/sys/fs/file-nr 39937 7405 104854 [root server fs]# -------


Any thoughts/suggestions,


Tuning and Optimizing RHEL for Oracle 9i and 10g Databases (Red Hat Enterprise Linux, 4, 3, 2.1 - redhat, x86-64)
http://www.puschitz.com/TuningLinuxForOracle.shtml#SettingFileHandles
...The maximum number of file handles can be changed in the proc file system without reboot:

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

Alternatively, you can use sysctl(8) to change it:

# sysctl -w fs.file-max=65536

To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.

# echo "fs.file-max=65536" >> /etc/sysctl.conf

-------------------

Short Guide to install Oracle 10g on Gentoo Linux (2004.0)
http://www.akadia.com/services/ora_linux_install_10g.html

...Setting Shell Limits for the Oracle User
Most shells like Bash provide control over various resources like the maximum allowable number of open file descriptors or the maximum number of processes available to a user.

   To see all shell limits, run:

   $ ulimit -a

Setting Limits for the Maximum Number of Open File Descriptors for the Oracle User

After you changed and increased /proc/sys/fs/file-max (see: Checking Kernel Parameters), there is still a per user limit of open file descriptors which is set to 1024 by default:

   $ su - oracle
   $ ulimit -n
   1024

To change this, you have to edit the file /etc/security/limits.conf as root and make the following changes or add the following lines, respectively:

   # To increase the shell limits for Oracle 10.1.0
   oracle soft nproc 2047
   oracle hard nproc 16384
   oracle soft nofile 1024
   oracle hard nofile 65536

The «soft limit» in the first line defines the number of file handles or open files that the Oracle user will have after login. If the Oracle user gets error messages about running out of file handles, then the Oracle user can increase the number of file handles like in this example up to 63536 («hard limit») by running the following command:

   ulimit -n 63536

Note that we do not recommend to set the «hard limit» for nofile for the oracle user equal to /proc/sys/fs/file-max. If you do that and the user uses up all the file handles, then the system would run out of file handles. This could mean that you won't be able to initiate new remote logins any more since the system won't be able to open any PAM modules which are required for performing a login. That's why we set the hard limit to 63536 and not to 65536.

You also need to make sure that pam_limits is configured in the file /etc/pam.d/system-auth. This is the PAM module that will read the /etc/security/limits.conf file. The entry should read like:

   session required /lib/security/pam_limits.so
   session required /lib/security/pam_unix.so

Now login to the oracle account again since the changes will become effective for new login sessions only.
-------------------

File System Primer - Novell CoolSolutionsWiki
http://wiki.novell.com/index.php/File_System_Primer


EXT3

   * Most popular Linux file system, limited scalability in size and
     number of files
   * Journaled
   * POSIX extended access control

EXT3 file system is a journaled file system that has the greatest use in Linux today. It is the "Linux" File system. It is quite robust and quick, although it does not scale well to large volumes nor a great number of files. Recently a scalability feature was added called htrees, which significantly improved EXT3's scalability. However it is still not as scalable as some of the other file systems listed even with htrees. It scales similar to NTFS with htrees. Without htrees, EXT3 does not handle more than about 5,000 files in a directory.

-HTH
--
Art Wildman
National Weather Service Office, JAX FL. http://www.srh.noaa.gov/jax
"If you choose not to decide, you still have made a choice" -Rush|Freewill


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]