is good to know
some software does require a lot of file descriptors, and you might want to
get all potential out of software

On Mon, January 29, 2024 10:09 am, Stuart Henderson wrote:
> On 2024/01/28 20:09, beecdadd...@danwin1210.de wrote:
>
>> why are yo uignoring my reply? 4096 doesn't cover everyone like I said
>> people can become floodfills automatically and floodfills means 8192
>
> If 4096 is not enough and the software requires 8192 to work (which is
> above the default sysctl limit) we'd better just leave it in the readme and 
> not
> add the login.conf.d file. Automating just half of it leaves users in a worse
> position than doing nothing.
>
> Really the software should not assume that it has unlimited resources,
> and scale back when it runs into limits. But that seems a hard concept for 
> some
> programmers to understand.
>
>>
>> On Sun, January 28, 2024 7:52 pm, Klemens Nanni wrote:
>>
>>> On Sun, Jan 28, 2024 at 06:15:52PM +0000, Stuart Henderson wrote:
>>>
>>>
>>>> On 2024/01/27 21:54, open...@systemfailure.net wrote:
>>>>
>>>>
>>>>> According to i2pd's online documentation [1], the maximum number of
>>>>> open file descriptors is 4096 for a regular node, and 8192 for a
>>>>> floodfill [2].
>>>>>
>>>>>
>>>>>
>>>>> I have never measured how many FDs i2pd is really using, but this
>>>>> software for sure needs a lot of them.
>>>>>
>>>>> So I guess we can set 4096 as default value, and inform users in the
>>>>> README file that this value should be raised to 8192 for floodfills.
>>>>>
>>>>>
>>>>
>>>> 4096 doesn't seem too unreasonable, it's below default levels of
>>>> kern.maxfiles, so if that's enough for the software I'd be happy with
>>>> setting that in a login.conf.d file.
>>>
>>> Thanks for all you feedback.
>>> OK?
>>>
>>>
>>>
>>>
>>> Index: Makefile
>>> ===================================================================
>>> RCS file: /cvs/ports/net/i2pd/Makefile,v
>>> diff -u -p -r1.22 Makefile --- Makefile     13 Jan 2024 16:21:39 -0000      
>>> 1.22 +++
>>> Makefile    24 Jan 2024 22:21:26 -0000
>>> @@ -3,6 +3,7 @@ COMMENT =   client for the I2P anonymous n
>>> GH_ACCOUNT =        PurpleI2P
>>> GH_PROJECT =        i2pd
>>> GH_TAGNAME =        2.50.2
>>> +REVISION = 0
>>>
>>>
>>>
>>> CATEGORIES =        net
>>> HOMEPAGE =  https://i2pd.website
>>> Index: pkg/PLIST
>>> ===================================================================
>>> RCS file: /cvs/ports/net/i2pd/pkg/PLIST,v
>>> diff -u -p -r1.12 PLIST --- pkg/PLIST       20 Dec 2023 22:19:44 -0000      
>>> 1.12 +++
>>> pkg/PLIST   24 Jan 2024 22:30:37 -0000 @@ -237,3 +237,7 @@
>>> share/examples/i2pd/tunnels.conf @owner _i2pd
>>> @group _i2pd
>>> @sample ${SYSCONFDIR}/i2pd/tunnels.conf
>>> +@owner
>>> +@group
>>> +share/examples/login.conf.d/i2pd
>>> +@sample ${SYSCONFDIR}/login.conf.d/i2pd
>>> Index: pkg/README
>>> ===================================================================
>>> RCS file: /cvs/ports/net/i2pd/pkg/README,v
>>> diff -u -p -r1.3 README --- pkg/README      8 Nov 2022 12:41:42 -0000       
>>> 1.3 +++
>>> pkg/README  28 Jan 2024 19:51:52 -0000 @@ -5,20 +5,7 @@
>>> Resource Limits: File Descriptors
>>> =================================
>>>
>>>
>>>
>>> -By default, the i2pd process runs in the login(1) class of "daemon".
>>> -The default limits on file descriptors are insufficient to run i2pd;
>>> instead you -should put the _i2pd user and process in their own login(1)
>>> class with tuned -resources. -You should also raise the system-wide
>>> maxfiles limit. +You should raise the system-wide maxfiles limit:
>>>
>>>
>>>
>>> -1. Configure i2pd login class in the login.conf(5) file:
>>> -
>>> -        i2pd:\
>>> -                :openfiles-cur=8192:\
>>> -                :openfiles-max=8192:\
>>> -                :tc=daemon:
>>> -
>>> -2. Adjust kern.maxfiles, if needed:
>>> -
>>> -   # sysctl kern.maxfiles=16000
>>> -   # echo "kern.maxfiles=16000" >> /etc/sysctl.conf
>>> +   # sysctl kern.maxfiles=8192
>>> +   # echo "kern.maxfiles=8192" >> /etc/sysctl.conf
>>> Index: pkg/i2pd.login
>>> ===================================================================
>>> RCS file: pkg/i2pd.login
>>> diff -N pkg/i2pd.login --- /dev/null        1 Jan 1970 00:00:00 -0000 +++
>>> pkg/i2pd.login      28 Jan 2024 19:51:32 -0000 @@ -0,0 +1,4 @@
>>> +i2pd:\
>>> +   :openfiles-cur=4096:\
>>> +   :openfiles-max=4096:\
>>> +   :tc=daemon:
>>>
>>>
>>>
>>>
>>
>>
>


Reply via email to