← Back to team overview

mysql-proxy-discuss team mailing list archive

Re: New option --max-open-files

 

Hi Kay,
It seems that the flow of max-open-file option processing in your last
commit was like this (non WIN32 systems, in pseudo code):
    if the max-open-file-option is not set then
        set the-limit-of-open-files = 8192
    else
        set the-limit-of-open-files = the-number-specified
    end
But I think it might be better if the flow is:
    if the max-open-file-option is set then
        set the-limit-of-open-files = the-number-specified
    end
Because IMHO, it should be okay if a user sets the max number of open
files by using the ulimit(1) command but without setting the
max-open-file option, no matter the number is greater than or less
than 8192.
In a word, we should only reset the value of RLIMIT_NOFILE when the
max-open-file option is specified clearly.

Regards.

Joshua Zhu
http://blog.zhuzhaoyuan.com

On Fri, Jan 16, 2009 at 1:35 AM, Kay Röpke <Kay.Roepke@xxxxxxx> wrote:
>
> Hi!
>
> FYI, I've just pushed a change to increase the max open files to 8192 if possible.
> This also introduces a new option --max-open-files which you can use to set it to whatever value you want (assuming the OS let's you).
> Results are being logged on debug.
> For Windows there seems to be a hard limit of 2048, so I'm clamping the value and give a warning about it.
>
> Oh, I've noticed that the startup script is missing, I'll try to add that back tomorrow.
> In the meantime you can copy the following stuff into bin/mysql-proxy:
> ---------snip------------
> #!/bin/sh
> scriptdir=`dirname $0`
> scriptname=`basename $0`
> scriptdir=`(cd "$scriptdir/"; pwd)`
> scriptdir=`dirname "$scriptdir"`
> DYLD_LIBRARY_PATH="$scriptdir"/lib/mysql-proxy
> LUA_PATH="$scriptdir"/share/mysql-proxy/?.lua
> LUA_CPATH="$scriptdir"/lib/mysql-proxy/?.so
> export DYLD_LIBRARY_PATH LUA_PATH LUA_CPATH
> exec "$scriptdir/sbin/$scriptname" "$@"
> ---------snip------------
>
> cheers,
> -k
> --
> Kay Roepke
> Software Engineer, MySQL Enterprise Tools
>
> Sun Microsystems GmbH    Sonnenallee 1, DE-85551 Kirchheim-Heimstetten
> Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
> Vorsitz d. Aufs.rat.: Martin Haering                    HRB MUC 161028
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~mysql-proxy-discuss
> Post to     : mysql-proxy-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mysql-proxy-discuss
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References