Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: net/i2pd: move login.conf(5) bits from README to i2pd.login
To:
ports@openbsd.org
Date:
Thu, 25 Jan 2024 08:05:42 +0000

Download raw body.

Thread
On 2024/01/24 23:06, Klemens Nanni wrote:
> Manual instructions are from 2020, we gained /etc/login.d/* support
> in 2022, so automate it.

Comsidering that the default kern.maxfiles limit on amd64 is 7030,
bumping maxfiles in login.conf to 8192 without making the sysctl
change means that i2pd can consume all FDs in the system.

I think it would be better for the login.conf.d file to stick something
lower if possible. 8192 seems a bit excessive. Is there someone using
this software who can confirm how many FDs it *really* is likely to use?

If it really needs this many, perhaps it's better not to automate either
setting, at least then users who bump into the limits will only have
problems with i2pd not the rest of the system.

> diff -u -p -r1.3 README
> --- pkg/README	8 Nov 2022 12:41:42 -0000	1.3
> +++ pkg/README	24 Jan 2024 22:24:29 -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.
> -
> -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:
> +You should raise the system-wide maxfiles limit:
>  
>  	# sysctl kern.maxfiles=16000
>  	# echo "kern.maxfiles=16000" >> /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	24 Jan 2024 22:23:46 -0000
> @@ -0,0 +1,4 @@
> +i2pd:\
> +	:openfiles-cur=8192:\
> +	:openfiles-max=8192:\
> +	:tc=daemon:
>