Operating System - HP-UX
1752567 Members
5330 Online
108788 Solutions
New Discussion юеВ

Re: open_files_limit for mysql

 
SOLVED
Go to solution
Mihails Nikitins
Super Advisor

open_files_limit for mysql

Hi,

I have ported Linux MySQL HA solution provided by HP to HP-UX platform.

My kernel has the following parameters:
naxfiles 60 (Soft File Limit Per Process)
maxfiles_lim 1024 (Hard File Limit Per Process )

I see that mysqld can reach maxfiles_lim, but I don't understand where it is allowed.

open-files-limit parameter is not set in my.cnf, no ulimit command can be found in other files.

Many thanks and points in advance for clarification of this default behavior!

BR,
Mihails

KISS - Keep It Simple Stupid
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: open_files_limit for mysql

Thats too low for any database server.

make maxuprc 200 to 300

Bump the files limits up.

This needs to be handled in the kernel.

kmtune ouput to check it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Eric Antunes
Honored Contributor

Re: open_files_limit for mysql

I'm not sure if I've understood the question but I think you should increase maxfiles to 1024 and set nfile to (15*NPROC+2048). This last parameter (should be something greater than 5000) may be more usefull since it limits all open files in the server.

Best Regards,

Eric
Each and every day is a good day to learn.
Mihails Nikitins
Super Advisor

Re: open_files_limit for mysql

Thanks for your replies!
I tried to find out, where mysqld process is allowed to reach maxfiles_lim, if soft limit is small. Is it necessary to allow it explicitly?
KISS - Keep It Simple Stupid
Ermin Borovac
Honored Contributor
Solution

Re: open_files_limit for mysql

Non-superuser process can increase soft limit by using setrlimit(2) (RLIMIT_NOFILE). It can raise the limit up to the value defined by hard limit (maxfiles_lim).

My guess is that if you search MySQL source code, you will find instances where soft limit is increased using setrlimit(2).