1835413 Members
2720 Online
110078 Solutions
New Discussion

maxfiles

 
hpuxsa
Frequent Advisor

maxfiles

We have been experiencing a connection problem on one of our applications running on oracle9iAs. Oracle suggested to increase maxfiles and it was increased from 1024 to 2048 everything was fine for sometime and we had the problem again. This time maxfiles was changed to 4096 and agin it workd for sometime and the problem has occured again and oracle recommends to make maxfiles unlmited.

I checked using lsof for the number of files being opened by a process and the max i could see was only 109. I believe maxfiles parameter is for the maximum number of files that can be opened by a process. If that's the case, why i am i getting this problem when there are only 109 files being opened by a process.
11 REPLIES 11
twang
Honored Contributor

Re: maxfiles

Can you post the output of "sar -v 2 10" , so that we can see the usage of your system.
twang
Honored Contributor

Re: maxfiles

MAXFILES is the number of open files for a user. To find the setting of the MAXFILES parameter, issue as the root user:
# sysdef | grep maxfiles

Calculate the number of open files for the Oracle user by using the Oracle SQL*Plus to get these values. Shutdown the database first, then execute these commands as the Oracle user:
SQL> connect sys/
SQL> startup mount
SQL> select count(*) from v$datafile;
SQL> select count(*) from v$controlfile;
SQL> select count(*) from v$logfile;
The sum of these values for all instances should be less than MAXFILES.

To change the MAXFILES kernel parameter:
1. Change the parameter value by using the 'sam'
2. Rebuild the kernel by using the 'sam'
3. Shutdown the database
SQL> shutdown immediate
4. Reboot the server
5. Startup the database, again using the Oracle SQL*Plus:
SQL> connect sys/
SQL> startup
Eric Antunes
Honored Contributor

Re: maxfiles

I think your problem is not maxfiles but nfile. nfile is the total maximum number of open files on the server. As said before by Twain, do:

sar -v 2 10

09:49:22 text-sz ov proc-sz ov inod-sz ov file-sz ov
09:49:24 N/A N/A 187/1220 0 1204/1538 0 1466/6010 009:49:26 N/A N/A 187/1220 0 1239/1538 0 1466/6010 0

My parameter nfile is set to 6000!!
Each and every day is a good day to learn.
Eric Antunes
Honored Contributor

Re: maxfiles

Sorry Twang, not Twain!
Each and every day is a good day to learn.
hpuxsa
Frequent Advisor

Re: maxfiles

nfile is not the problem becuase this has been 63548 and was not touched. Please find below the sar -v output.

1:54:44 text-sz ov proc-sz ov inod-sz ov file-sz ov
11:54:49 N/A N/A 206/4116 0 1181/34848 0 1592/63558 0
11:54:54 N/A N/A 204/4116 0 1181/34848 0 1588/63558 0
11:54:59 N/A N/A 202/4116 0 1181/34848 0 1590/63558 0
Joseph Loo
Honored Contributor

Re: maxfiles

hi,

have u read Oracle Metalink Document ID: 169706.1, i.e. if u r on Oracle 9i?

for HP-UX 11.11 running 9.2.0, the kernel parameters are :

KSI_ALLOC_MAX (NPROC*8)
MAX_THREAD_PROC 256
MAXDSIZ 1073741824 bytes
MAXDSIZ_64BIT 2147483648 bytes
MAXSSIZ 134217728 bytes
MAXSSIZ_64BIT 1073741824
MAXSWAPCHUNKS 16384
MAXUPRC ((NPROC*9)/10)
MSGMAP (MSGTQL+2)
MSGMNI NPROC
MSGSEG 32767
MSGTQL NPROC
NCALLOUT (NKTHREAD+16)
NCSIZE ((8*NPROC+2048)+VX_NCSIZE)
NFILE (15*NPROC+2048)
NFLOCKS 4096
NINODE (8*NPROC+2048)
NKTHREAD (((NPROC*7)/4)+16)
NPROC 4096
SEMMAP (SEMMNI+2)
SEMMNI 4096
SEMMNS (SEMMNI*2)
SEMMNU (NPROC - 4)
SEMVMX 32768
SHMMAX AvailMem
SHMMIN 1
SHMMNI 512
SHMSEG 32
VPS_CEILING 64

do reply on your OS version and Oracle DB version.

regards.
what you do not see does not mean you should not believe
Eric Antunes
Honored Contributor

Re: maxfiles

Check also maxuprc (Max User Processes) and the other parameters suggested by Joseph...
Each and every day is a good day to learn.
hpuxsa
Frequent Advisor

Re: maxfiles

OS version is 11.11 and Oracle is 9.2.0

I have checked my parameters the only difference are
max_thread_proc = 64
maxuprc = 2048

Eric Antunes
Honored Contributor

Re: maxfiles

What error are you getting?

Also check if are are in the latest patch set: 9.2.0.5 (see note 263791.1 on Metalink)
Each and every day is a good day to learn.
Eric Antunes
Honored Contributor

Re: maxfiles

May be increasing max_thread_proc to the recomended in the note (256)...

See also shmmax: for 1.5 Gb of memmory, I setted it to 1073741824 (1 Gb): 75% of the total memmory.

Each and every day is a good day to learn.
Eric Antunes
Honored Contributor

Re: maxfiles

Hi,

Are you still there? I you solved your issue??

Another thing that may help is on this thread: http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=604320
Each and every day is a good day to learn.