Increasing number of allocated file handles

Dominique Demore demored at rainbowschools.ca
Wed Oct 4 19:02:35 UTC 2006


Under /etc/security/limits.conf:
oracleas        soft    nofile          4096
oracleas        hard    nofile          131072
oracleas        soft    nproc           2047
oracleas        hard    nproc           32768


Under the oracleas .bash_profile I have added:
ulimit -n 196608
ulimit -u 16384


What I'm seeing is the number of allocated files (first column under /proc/sys/fs/file-nr) not changing... Maybe it's
suppose to stay at the same number.
[oracleas at esis oracleas]$ cat /proc/sys/fs/file-nr 
39937   19888   131072
[oracleas at esis oracleas]$ 

redhat-sysadmin-list at redhat.com writes:
>Have you set the limits for the user that’s running your app along with the
>systems?
>
>Ron
>
>-----Original Message-----
>From: redhat-sysadmin-list-bounces at redhat.com
>[mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Dominique
>Demore
>Sent: Wednesday, October 04, 2006 10:42 AM
>To: redhat-sysadmin-list at redhat.com
>Subject: Re: Increasing number of allocated file handles
>
>We currently have out license as a processor based. I have placed a call
>with Oracle about this issue.
>
>I had placed all parameters in the sysctl.conf as part of the Oracle
>configuration guide, but it still has not resolved
>it..
>
>Thanks.
>
>-- Dominique
>
>redhat-sysadmin-list at redhat.com writes:
>>Dominique,
>>
>>I'm by far, no Oracle Guru, but I seem to remember there was a static
>>number of handles within Oracle.  And it seems to me that we had to
>>change our licensing.  But that is completely from memory.
>>
>>That was Oracle 9i running on a HP-UX 11 HP 9000 L Class Server
>>
>>Sincerely,
>>Lee Higginbotham
>>Senior IT Technical Analyst
>>100 Bluegrass Commons Blvd., Suite 2200
>>Hendersonville, TN  37075
>>Ph:  615-265-2764
>>Fax:  615-265-2847
>>lee.higginbotham at pic.com
>>-----Original Message-----
>>From: redhat-sysadmin-list-bounces at redhat.com
>>[mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Art
>>Wildman
>>Sent: Wednesday, October 04, 2006 1:32 PM
>>To: redhat-sysadmin-list at redhat.com
>>Subject: 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 at server fs]# cat /proc/sys/fs/file-nr 
>>> 39937   7405    104854
>>> [root at 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
>>
>>--
>>redhat-sysadmin-list mailing list
>>redhat-sysadmin-list at redhat.com
>>https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>>
>>--
>>redhat-sysadmin-list mailing list
>>redhat-sysadmin-list at redhat.com
>>https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>
>
>
>-----
>Dominique Démoré
>Technical Services Coordinator
>Rainbow District School Board
>69 Young Street
>Sudbury, Ontario
>P3E 3G5
>Tel: (705) 674-3171 x. 258
>Fax: (705) 671-2442
>
>
>--
>redhat-sysadmin-list mailing list
>redhat-sysadmin-list at redhat.com
>https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>
>
>--
>redhat-sysadmin-list mailing list
>redhat-sysadmin-list at redhat.com
>https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list



-----
Dominique Démoré
Technical Services Coordinator
Rainbow District School Board
69 Young Street
Sudbury, Ontario
P3E 3G5
Tel: (705) 674-3171 x. 258
Fax: (705) 671-2442





More information about the redhat-sysadmin-list mailing list