πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90469

Re: INN 2.7.1 death spiral under high load?

#90469
From: Russ Allbery
Date: Mon, 03 Jul 2023 16:04
56 lines
3605 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> Incidentally, is the "File Descriptor Limits" still accurate in INSTALL?

>   INN won't be able to increase the limits above the hard limits set by
>   your operating system; on some systems, that hard limit is normally
>   256 file descriptors (Linux, for example).  On others, like Solaris,
>   it's 1024.  Increasing the limit beyond that value may require serious
>   system configuration work.  (On some operating systems, it requires
>   patching and recompiling the kernel.  On Solaris it can be changed in
>   /etc/system, but for 2.6 or earlier the limit cannot be increased
>   beyond 1024 without breaking select(2) and thereby breaking all of
>   INN.  For current versions of Linux, you may be able to change the
>   maximum by writing to /proc/sys/fs/file-max.)

> Isn't the hard limit 1024 (or more?) for Linux, and 256 for Solaris?

1024 is now the default for Linux, it looks like, and you can now change
it dynamically using the normal ulimit command (no need for messing around
in proc).  I have no idea what Solaris does these days.  I suspect I last
tested that part of INN against Solaris 7, which is a very long time ago.

> I've found out that when systemd is in use, systemd/sd-daemon.h includes
> asm/socket.h when __USE_MISC is set, which in turn includes
> linux/posix_types.h which unconditionnaly redefines __FD_SETSIZE to 1024
> (even if it has another value) for use with __kernel_fd_set.  So
> __FD_SETSIZE has to be forced before any inclusion of bits/types.h and
> after any inclusion of systemd/sd-daemon.h on Linux (systemd/sd-daemon.h
> also includes bits/types.h).

I'm a little worried that something is going to be unhappy with redefining
__FD_SETSIZE somewhere.  That approach was always a bit of an intrusive
hack.  But if Diablo is happy, maybe it will be fine.

> I am unsure of the consequences but systemd might not work with INN if a
> systemd file descriptor exceeds 1024 (?)

I suspect it will only matter if the notification file descriptor is over
1024, which shouldn't happen because it gets passed in on startup.

> Jesse, I'll also change the log line:
>     xxx:yyy zzz free but was in SMASK
> to:
>     xxx:yyy zzz free but was in SMASK; looks like fd_set is not large
>     enough (you may want to increase FD_SETSIZE to a higher value by
>     rebuilding INN with -DLARGE_FD_SETSIZE=4096)

We should be able to do better than this and detect the actual problem
before we corrupt our data structures, I think, by testing whether a file
descriptor is larger than FD_SETSIZE.

-- 
Russ Allbery (eagle@eyrie.org)             <https://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87fs65ouay.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <u7l7kl$1qqb$1@nnrp.usenet.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Message-ID: <87fs65ouay.fsf@hope.eyrie.org>
Subject: Re: INN 2.7.1 death spiral under high load?
Date: Mon, 03 Jul 2023 09:04:37 -0700
From: Russ Allbery <eagle@eyrie.org>
References: <u7l7kl$1qqb$1@nnrp.usenet.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: hope.eyrie.org;
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:lv5CaaPU8HKWYasgHL6sq1wEAQo=