Article View: news.software.nntp
Article #59487Re: innd perl filter slowdown ?
From: Miquel van Smoorenburg
Date: Sat, 06 Jul 2002 12:50
Date: Sat, 06 Jul 2002 12:50
43 lines
2561 bytes
2561 bytes
In article <yl65zunpyc.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> wrote:
>Miquel van Smoorenburg <miquels@cistron.nl> writes:
>
>> It turned out to be the perl filter - "ctlinnd perl n" fixed it. On one
>> server, I run cleanfeed - on the other (our feeder) I run a stripped
>> down filter that just checks for binary-in-nonbin groups using the
>> regexp from cleanfeed, and enforces usenet2/bofh policies. Both servers
>> behave the same.
>
>Which binary regex are you using?
The one from cleanfeed-20010805.
>Some of them have a nasty bug where
>they can go into exponential backtracking on certain articles. There was
>some extensive discussion of that here a year or more ago.
That does sound a lot like the problem I'm seeing.
>The version
>I'm currently using is:
>
># How we determine if a post is a binary.
>sub is_binary {
> ($hdr{__BODY__} =~ m%(?:^[ \t>]*(?>M[\x20-\x60]{59,60})[ \r]*\n){40}%mo
> || $hdr{__BODY__} =~ m%(?:^[ \t>]*[A-Za-z0-9+/]{59,76}[ \r]*\n){40}%mo);
>}
That looks very much the same as the one from cleanfeed-20010805.
>The (?>...) bit in there is the important bit, since it prevents
>backtracking inside the construct. There are a few other ways of
>rewriting the regex that also work.
I've now put some gettimeofday() calls into the filter, and
logging, so hopefully that will help tracking down where the
problem lies.
Thanks,
Mike.
Technical Details
Message-ID:
<ag6p1u$e6p$2@ncc1701.cistron.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!62.216.30.27!newsgate.cistron.nl!news.cistron.nl!not-for-mailReferences:
<ag3tc5$lcl$1@ncc1701.cistron.net> <yl65zunpyc.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <ag6p1u$e6p$2@ncc1701.cistron.net> Subject: Re: innd perl filter slowdown ? Date: Sat, 06 Jul 2002 12:50:06 +0000 From: "Miquel van Smoorenburg" <miquels.at.cistron.nl.spamtrap@netscum.nl> References: <ag3tc5$lcl$1@ncc1701.cistron.net> <yl65zunpyc.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!62.216.30.27!newsgate.cistron.nl!news.cistron.nl!not-for-mail Newsgroups: news.software.nntp Organization: Cistron Lines: 42 NNTP-Posting-Host: traveler.cistron-office.nl Content-Type: text/plain; charset=iso-8859-15 X-Trace: ncc1701.cistron.net 1025959806 14553 62.216.29.67 (6 Jul 2002 12:50:06 GMT) X-Complaints-To: abuse@cistron.nl NNTP-Posting-Date: Sat, 6 Jul 2002 12:50:06 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: miquels@cistron-office.nl (Miquel van Smoorenburg)