πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90066

Re: Not very useful logging information

#90066
From: Jesse Rehmer
Date: Sat, 04 Feb 2023 05:15
40 lines
3160 bytes
On Feb 3, 2023 at 2:47:01 PM CST, "Julien Γ‰LIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Hi Jesse,
>> As Russ stated, it's the filtering that's eating up CPU cycles. I can handle
>>> 50Mbps of incoming and >80Mbps outgoing traffic using ~20% of the CPU without
>> filtering, but when I turn on Cleanfeed or PyClean innd maxes out its core and
>> upstream peers start to spool.
> 
> Do you think reordering the checks Cleanfeed does would be of help?
> For instance having the is_binary() check as soon as possible instead of
> always having body parsing like:
> 
>     $body = lc substr($hdr{__BODY__}, 0, 4000);
> 
>     $state{badlines}++ while $hdr{__BODY__} =~ /[^\r]\n/g;
> 
>     $hdr{__BODY__} =~ /
>        ^[Bb][Ee][Gg][Ii][Nn]$hws+[0-7]{3,4}$hws+ # begin 666
>        (...long regexp for UUencoded...)
>        /mx;

I'm sure it would help. If the binary detection were performed first, and an
article is iidentified as a binary then passed through without further checks
would eliminate a lot of unncessary cycles.

I've been able to strip out most of the checks from Cleanfeed to one that is
only checking for misplaced binaries and CPU impact is negligable compared to
before. Beyond ripping everything out, I'm not a developer but sometimes
manage to modify things to suit my needs. Likely not efficiently. :)

The one thing I noticed early on with PyClean was the binary articles pass
through all the other checks, or at least the EMP check and every so often one
would be rejected from that part of the filter. That always seemed inefficient
and I experiemented with the variable it uses to exclude groups but that
didn't seem to work to exclude them from the EMP filter.

If anyone has modified versions/patches they'd be interested in having me test
for performance I'm capable of tossing a steady stream of mixed article flow
at it.
Technical Details
Message-ID: <trkpl9$1vg0$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
References: <20230131155925.36dd4013@wibble.sysadmininc.com> <trjm6p$if11$1@news.trigofacile.com> <trjqja$sdm$1@nnrp.usenet.blueworldhosting.com> <trjrs6$j087$2@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <trkpl9$1vg0$1@nnrp.usenet.blueworldhosting.com>
Subject: Re: Not very useful logging information
Date: Sat, 04 Feb 2023 05:15:21 +0000
From: Jesse Rehmer <jesse.rehmer@blueworldhosting.com>
References: <20230131155925.36dd4013@wibble.sysadmininc.com> <trjm6p$if11$1@news.trigofacile.com> <trjqja$sdm$1@nnrp.usenet.blueworldhosting.com> <trjrs6$j087$2@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, 4 Feb 2023 05:15:21 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; logging-data="65024"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:gOoY2tC7zRiwVwR21P5QFd2/SUE= sha256:H2F7+Je7rfPomMbY49ITz7a/6N1kEZU5r/PBdqqTNvk= sha1:tiNZPan0cZ6fgt1rbNDKLkx41j8= sha256:62gZfpCLlR/Uaa9Y20XXEWWrm8aEEpS328ryA+coTzE=
X-Usenapp: v1.26.1/d - Full License
Lines: 39