1834913 Members
2578 Online
110071 Solutions
New Discussion

Changing maxfile...

 
SOLVED
Go to solution
Pete Mattison
Advisor

Changing maxfile...

Hi,
I'm installing MySQL onto a HP/UX 10.20 work station. Unfortunately there is the warning:

Installing all prepared tables
010423 11:09:07 Warning: setrlimit couldn't increase number of open files
to more than 200
010423 11:09:07 Warning: Changed limits: max_connections:
100 table_cache: 64
scripts/mysql_install_db[284]: 15102 Memory fault(coredump)
Installation of grant tables failed!

I now know where to find maxfile in SAM but I am very wary of changing this without knowing the after affects/ interactions - I don't fancy trying to have to recover the computer.

If I change maxfiles (currently 200, maxfiles_lim = 2048), should I change something else as well? Also, what are the effect of this change, if any? I'm thinking of changing maxfiles first to 512 and if this is still to low I would change it to 1024... Advisable or suicide?

Thanks,

Pete
4 REPLIES 4
Alexander M. Ermes
Honored Contributor

Re: Changing maxfile...

Hi Pete.
No risk to change these parameters.
If there are any parameters depending on this, they will be updated and adjusted as well.
I had to do this for Oracle databases, when i was a newbie, and felt the same way, but it is not a problem.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Pedro Sousa
Honored Contributor
Solution

Re: Changing maxfile...

Hi!
I think you wont have any problem increasing the parameter(s).

But, as you know, if you allow your system to run more processes, it will have some impact on performance. But, if they are little it you'll not note that.

To increase that value you should take a look to the following kernel parameter (SAM):

nfile: Set maximum number of files that can be open simultaneously on the system at any given time.
Acceptable Values:
Minimum: 14
Maximum: Memory limited

here is a description of the other two:
maxfiles: Set soft limit for the number of files a process is allowed to have open simultaneously.
Acceptable Values:
Minimum: 30
Maximum: 2048
Default: 60

maxfiles_lim: Set hard limit for number of files a process is allowed to have open simultaneously.
Acceptable Values:
Minimum: 30
Maximum: 2048
Default: 1024

good luck.
Philip Chan_1
Respected Contributor

Re: Changing maxfile...

The maxfiles is for per process basis, you'll still be bounded by nfile which is the system wide limit, so you should increase nfile accordingly. I don't know if there is any official document on the ratio between maxfiles and nfiles, but my wild guess is that the ratio should be lower than 1:10.

~Philip
federico_3
Honored Contributor

Re: Changing maxfile...

Minimum
30
Maximum
60000
Default
60
Specify integer value. For more information, see Specifying Parameter Values.

Description
maxfiles specifies the system default soft limit for the number of files a process is allowed to have open at any given time. It is possible for a process to increase its soft limit and therefore open more than maxfiles files.

Non-superuser processes can increase their soft limit until they reach the hard limit ( maxfiles_lim).

Related Parameters
To be useful, the value assigned to maxfiles must be less than the value of maxfiles_lim. maxfiles_lim is useful only if it does not exceed the limits imposed by nfile and ninode.


federico