Date: Fri, 11 Sep 2015 15:51:03 -0700 From: Alfred Perlstein <bright@mu.org> To: Adrian Chadd <adrian@freebsd.org> Cc: Warner Losh <imp@bsdimp.com>, Ed Maste <emaste@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r287606 - head/sys/kern Message-ID: <F986EAD2-6930-417C-929D-D7D6C619BA8D@mu.org> In-Reply-To: <CAJ-Vmok-Uto6srU-sA1gq=HZ0Jf30vNNsw_mqiY669XvUq%2BqTw@mail.gmail.com> References: <201509100405.t8A45xrJ070199@repo.freebsd.org> <CAPyFy2DjD3Dv6VYjd_6CKe3_2ZuMC5ayMKnzATLb=a4yZUYyLw@mail.gmail.com> <CANCZdfoBN9keiZCUpJ_v5y6mUpKcY_26Y_2=xCLwJovz%2B8a_xQ@mail.gmail.com> <CAJ-VmonUm5Sf8TPLnciouyiJjLUndtNJX368US5_hgQwzYBdkQ@mail.gmail.com> <55F33D96.8060300@mu.org> <CAJ-Vmok-Uto6srU-sA1gq=HZ0Jf30vNNsw_mqiY669XvUq%2BqTw@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
The idea is sane defaults. Surely 256k makes sense for a machine with that much memory. Sent from my iPhone > On Sep 11, 2015, at 2:02 PM, Adrian Chadd <adrian@freebsd.org> wrote: > >> On 11 September 2015 at 13:46, Alfred Perlstein <bright@mu.org> wrote: >> 64k hard is too low a number for large memory machines. > > Root can always bump it up all the way to kern.maxfilesperproc. > > I'm also a big fan of having the description of config of service > stuff be in /etc/rc.conf, rather than splattered around the place. So > I also like the idea of <service>_rlimit_openfiles="xxxx" so it can be > clearly overridden for services that require it. > > I'm open to other suggestions! > > > > -adrian > >> -Alfred >> >> >>> On 9/10/15 9:18 AM, Adrian Chadd wrote: >>> >>>> On 10 September 2015 at 09:04, Warner Losh <imp@bsdimp.com> wrote: >>>> >>>> >>>>> On Thu, Sep 10, 2015 at 9:53 AM, Ed Maste <emaste@freebsd.org> wrote: >>>>> >>>>>> On 10 September 2015 at 04:05, Adrian Chadd <adrian@freebsd.org> wrote: >>>>>> >>>>>> Author: adrian >>>>>> Date: Thu Sep 10 04:05:58 2015 >>>>>> New Revision: 287606 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/287606 >>>>>> >>>>>> Log: >>>>>> Also make kern.maxfilesperproc a boot time tunable. >>>>>> ... >>>>>> TODO: >>>>> >>>>> Also "we" should >>>>> * Submit patches upstream or to the ports tree to use closefrom >>>> >>>> >>>> I thought the consensus was that we'd fix things to have fewer FDs >>>> by default, but instead allow individual processes to raise it via the >>>> usual methods. >>> >>> I'm looking at how to do this in a somewhat sensible fashion. Right >>> now we just have openfiles=unlimited; in /etc/login.conf which seems a >>> little odd. I don't know yet if that affects the default set that >>> services started via /etc/rc get - init gets the whole default >>> maxfilesperproc and stuff seems to inherit from that unless told >>> otherwise. >>> >>> I think the more sensible default would be: >>> >>> * set /etc/login.conf to some much lower values - say, 4k soft, 64k hard; >>> * root can always override its settings up to kern.maxfilesperproc; >>> * modify /etc/rc to set some default rlimits as appropriate; >>> * introduce configuration options ({daemon_rlimit_XXX}?) in >>> /etc/rc.conf that lets someone override what the default rlimits >>> should be for a given process,, as (and I'm not making this up) if you >>> run 'service XXX restart' from a root login you get the rlimits from >>> the shell, which may differ from the system startup. >>> >>> That way we can setup various services to have higher openfile limits >>> via /etc/rc.conf entries for those services rather than having to hack >>> each startup script. It also means that no matter what is running >>> 'service XXX YYY' as root, you'll get the 'correct'(er) rlimits. >>> >>> Thoughts? >>> >>> >>> -adrian >help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F986EAD2-6930-417C-929D-D7D6C619BA8D>
