Article View: news.software.nntp
Article #90465Re: INN 2.7.1 death spiral under high load?
From: Jesse Rehmer
Date: Sat, 01 Jul 2023 22:11
Date: Sat, 01 Jul 2023 22:11
99 lines
5702 bytes
5702 bytes
On Jul 1, 2023 at 10:44:55 AM CDT, "Julien ΓLIE" <iulius@nom-de-mon-site.com.invalid> wrote: > Hi Jesse, > >>> One thing of note, I have been doing various things over the last year that >>> involve shoving large amount of articles to INN as fast as I can, but it >>> wasn't until I messed with a separate destination machine that has SSD storage >>> and could write a ton faster that I ran into this, so I'm curious to see how >>> things go when both source and destination are on NVMe drives. > > Thanks again for your bug report and all your testings! > > >> Something I just noticed when looking at my Diablo feeder source code... some >> time ago one of the patches submitted increased FD_SETSIZE to 4096. Hmmm. :-) > > Oh, thanks for the pointer. > Maybe we should do something like that for INN too as it seems to have > done the work for Diablo. Here is the related patch: > > https://github.com/jpmens/diablo/commit/9505abdc9d100e97ef89e2f58482fe9bd49ca215 > > /* > * Cannot increase FD_SETSIZE on Linux, but we can increase __FD_SETSIZE > * with glibc 2.2 and 2.3 at least. We do this by including > * bits/types.h which defines __FD_SETSIZE first (before any other > include), > * then we redefine __FD_SETSIZE. Ofcourse a user program may NEVER > * include bits/whatever.h directly, so this is a dirty hack! > */ > #if LARGE_FD_SETSIZE > 1024 > # ifdef __linux__ > # include <features.h> > # if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) > # include <bits/types.h> > # undef __FD_SETSIZE > # define __FD_SETSIZE LARGE_FD_SETSIZE > # endif > # else > /* Works on most BSDs */ > # define FD_SETSIZE LARGE_FD_SETSIZE > # endif > #endif > > > > So it would for instance mean for INN to say in the documentation that > -DLARGE_FD_SETSIZE=4096 should be given at build time to increase the > limit of the number of file descriptors to 4096. > > Having googled a bit, there does not seem to be a more elegant way to > achieve that, unless switching to another method to read sockets > (poll(), libevent or). > > Any worries with that piece of code to add into INN? > > > Jesse, the suggestion for > #define FD_SETSIZE 4096 > I gave you in innd/chan.c may not work. The #define should be before > any inclusion of <sys/types.h>, and we do that in several header files. > Maybe it should be in include/inn/libinn.h instead, or maybe in > include/portable/system.h or maybe elsewhere, I should have a deeper look. I spun up a new FreeBSD VM backed by SSD storage, set FD_SETSIZE to 4096 in /usr/include/sys/select.h and compiled INN and started my process. Honestly, it's going so fast with one innxmit process now that both machines are on solid state storage I'm not sure I can make it go any faster on the receiving end. Doing ~3200 articles per second with a single innxmit process on the source side. INN isn't CPU bound yet, so tomorrow when I plan to do more playing around I will try multiple innxmit processes and see just how far I can push it and if I run into a similar crash. That said, the previous crashes I was not getting anywhere near this article rate. Can we talk about the implications of setting icdsynccount to a much much higher value than 10? I have it set to 500 now, but curious if there could be gains by setting this really high in my scenario where I know I'm not receiving duplicate articles and no articles exist on the destination? If there are any other tuning suggestions that can be had as far as reducing extraneous things (I did set incominglogfrequency to 2000 which still logs about twice a second, for example)? Jul 1 16:46:32 sorter innd[1098]: ME status seconds 1183 accepted 3722328 refused 0 rejected 1017 duplicate 16 accepted size 10797672448 duplicate size 42912 rejected size 149576720 Jul 1 16:56:32 sorter innd[1098]: ME time 600000 hishave 2087(1997776) hiswrite 37175(1997776) hissync 6(2) idle 127733(2314098) artclean 3311(1997776) artwrite 20582(1997709) artcncl 90(431) hisgrep/artcncl 2(431) overv 50717(1997709) perl 295793(1997776) python 13162(1997776) nntpread 4811(2314098) artparse 14916(4102412) artlog 5645(1998040) datamove 709(2472871) Jul 1 16:56:32 sorter innd[1098]: ME HISstats 0 hitpos 0 hitneg 0 missed 1997776 dne Jul 1 16:56:32 sorter innd[1098]: ME status seconds 1783 accepted 5720026 refused 0 rejected 1084 duplicate 16 accepted size 16114387968 duplicate size 42912 rejected size 151971536
Technical Details
Message-ID:
<u7q8ac$1icq$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-mailReferences:
<u7l7kl$1qqb$1@nnrp.usenet.blueworldhosting.com> <u7oljn$1chb$1@nnrp.usenet.blueworldhosting.com> <u7ollu$1jmj$1@nnrp.usenet.blueworldhosting.com> <u7phln$2is6p$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <u7q8ac$1icq$1@nnrp.usenet.blueworldhosting.com> Subject: Re: INN 2.7.1 death spiral under high load? Date: Sat, 01 Jul 2023 22:11:24 +0000 From: Jesse Rehmer <jesse.rehmer@blueworldhosting.com> References: <u7l7kl$1qqb$1@nnrp.usenet.blueworldhosting.com> <u7oljn$1chb$1@nnrp.usenet.blueworldhosting.com> <u7ollu$1jmj$1@nnrp.usenet.blueworldhosting.com> <u7phln$2is6p$1@news.trigofacile.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: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 1 Jul 2023 22:11:24 -0000 (UTC) Injection-Info: nnrp.usenet.blueworldhosting.com; User-Agent: Usenapp for MacOS Cancel-Lock: sha1:gfjLqOK6Or6aWoQDcpHopixB/8U= sha256:nqzST2r7SrYO+8u3T27zqKBY+JUS1MS+3BE54Odj3MU= X-Usenapp: v1.27.1/d - Full License