🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
14 messages
14 total messages Started by Russ Allbery Mon, 01 Mar 1999 00:00
Rejecting late cancels
#35698
Author: Russ Allbery
Date: Mon, 01 Mar 1999 00:00
9 lines
789 bytes
So with the new Perl hooks in the latest version of INN, is there a good
reason not to just have a Perl filter that rejects an article at the same
time do an INN::addhist() for the same message ID with "cancel."
prepended?

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: Rejecting late cancels
#35696
Author: Russ Allbery
Date: Mon, 01 Mar 1999 00:00
27 lines
1570 bytes
Laurent Wacrenier <lwa@easynet.fr> writes:
> Russ Allbery <rra@stanford.edu> wrote:

>> So with the new Perl hooks in the latest version of INN, is there a
>> good reason not to just have a Perl filter that rejects an article at
>> the same time do an INN::addhist() for the same message ID with
>> "cancel."

> Theyre isn't any good reason to just have a perl filter to reject
> them. The 'refusecybercancels' inn.conf(5) option is able to refuse them
> before.

> refusing is less expensive than rejecting.

You misunderstood me.  If I reject an article with my Perl filters, I also
want to reject the cancel for that same article.  It's a lot faster to
just add the cancel message ID to history and let INN handle refusing it
for me than it is to add a Perl hook that's called for every incoming
message ID.

I don't want to refuse all cancels.  Just cancels for articles I've
already rejected.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: Rejecting late cancels
#35704
Author: Dave Barr
Date: Mon, 01 Mar 1999 00:00
20 lines
1266 bytes
In article <ylemn9i23j.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>So with the new Perl hooks in the latest version of INN, is there a good
>reason not to just have a Perl filter that rejects an article at the same
>time do an INN::addhist() for the same message ID with "cancel."
>prepended?

Only the usual reasons with not propagating cancels -- others you feed
may want them.

The only other reason would be additional the time it takes to do
an addhist.  In my experience an addhist can be more time expensive
than it would take for innd to process the article.

--Dave
-- 
http://www.cis.ohio-state.edu/~barr/
barr@cis.ohio-state.edu

Re: Rejecting late cancels
#35706
Author: Russ Allbery
Date: Mon, 01 Mar 1999 00:00
15 lines
1235 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:

> Having the Perl code refuse the cancels itself might keep the history
> size down, compared to doing an addhist for each one, I suppose.

With my current filtering, it's only an additional 30K articles a day,
tops, that I don't also get a cancel for anyway.  So I don't think history
size will be a big problem (although I am a little worried about total
history size given that I'm trying to keep the file on a 2GB disk right
now -- I should probably find a bigger disk for it).

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: Rejecting late cancels
#35711
Author: Laurent Wacrenier
Date: Mon, 01 Mar 1999 00:00
19 lines
1615 bytes
Russ Allbery <rra@stanford.edu> wrote:
>You misunderstood me.

Sorry.

>  If I reject an article with my Perl filters, I also
>want to reject the cancel for that same article.  It's a lot faster to
>just add the cancel message ID to history and let INN handle refusing it
>for me than it is to add a Perl hook that's called for every incoming
>message ID.

Cleanfeed has another way to do this. It can keep a cache of rejected
articles (on hour by default) and is able to refuse cancel of this
articles. It should be faster (the test is done before innd MID check
and it doesn't touch the history�) but not so efficient...

-- Laurent

Re: Rejecting late cancels
#35712
Author: Jeremy
Date: Mon, 01 Mar 1999 00:00
14 lines
1078 bytes
Russ Allbery  <rra@stanford.edu> wrote:

> So with the new Perl hooks in the latest version of INN, is there a
> good reason not to just have a Perl filter that rejects an article at
> the same time do an INN::addhist() for the same message ID with
> "cancel." prepended?

No... in fact, wasn't that the reason the addhist hook was added?

-- 
Jeremy  |  jeremy@exit109.com
"Who's scruffy-looking?"  --Han Solo

Re: Rejecting late cancels
#35713
Author: Russ Allbery
Date: Mon, 01 Mar 1999 00:00
33 lines
2369 bytes
Laurent Wacrenier <lwa@easynet.fr> writes:
> Russ Allbery <rra@stanford.edu> wrote:

>> If I reject an article with my Perl filters, I also want to reject the
>> cancel for that same article.  It's a lot faster to just add the cancel
>> message ID to history and let INN handle refusing it for me than it is
>> to add a Perl hook that's called for every incoming message ID.

> Cleanfeed has another way to do this. It can keep a cache of rejected
> articles (on hour by default) and is able to refuse cancel of this
> articles. It should be faster (the test is done before innd MID check
> and it doesn't touch the history�) but not so efficient...

I'm a bit confused as to how you're using the term "efficient" here...  I
suppose you're referring to memory usage for the one-hour cache of
cancelled articles?  I'm not too worried about that.  (One can tell that
I'm not particularly worried about memory given that I'm not running
tagged hash.  :)  innd's only 96MB.  I should see how big expire is, but I
don't think it's that large.)

INN has to check the article against the history database anyway, so it's
faster to reject based on a history entry than it is to reject based on a
Perl filter.  I'm currently rejecting about 30,000 cancels per day with
the article cache, and I'm being offered about 600K.  Every time the Perl
message ID filtering hook is called, it has to Perlify the message ID
string and then call the Perl sub, which has to parse the message ID and
check the cache.  So I guess my question is whether people think doing
that 600K times will be faster than calling INN::addhist() 30K times.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: Rejecting late cancels
#35714
Author: Andrew Gierth
Date: Mon, 01 Mar 1999 00:00
22 lines
1787 bytes
>>>>> "Laurent" == Laurent Wacrenier <lwa@easynet.fr> writes:

 > Russ Allbery <rra@stanford.edu> wrote:
 >> So with the new Perl hooks in the latest version of INN, is there
 >> a good reason not to just have a Perl filter that rejects an
 >> article at the same time do an INN::addhist() for the same message
 >> ID with "cancel."

 Laurent> Theyre isn't any good reason to just have a perl filter to
 Laurent> reject them. The 'refusecybercancels' inn.conf(5) option is
 Laurent> able to refuse them before.

Russ is looking to refuse cancels only for posts that have been
filtered, not for all posts.

Having the Perl code refuse the cancels itself might keep the history
size down, compared to doing an addhist for each one, I suppose.

-- 
Andrew.

Re: Rejecting late cancels
#35720
Author: Laurent Wacrenier
Date: Mon, 01 Mar 1999 00:00
14 lines
1262 bytes
Russ Allbery <rra@stanford.edu> wrote:
>So with the new Perl hooks in the latest version of INN, is there a good
>reason not to just have a Perl filter that rejects an article at the same
>time do an INN::addhist() for the same message ID with "cancel."

Theyre isn't any good reason to just have a perl filter to reject
them. The 'refusecybercancels' inn.conf(5) option is able to refuse
them before.

refusing is less expensive than rejecting.

-- Laurent

Re: Rejecting late cancels
#35723
Author: Joe Greco
Date: Tue, 02 Mar 1999 00:00
20 lines
1533 bytes
In news.software.nntp article <7behkk$qc3$1@buggy.easynet.fr>, lwa@easynet.fr wrote:
:Russ Allbery <rra@stanford.edu> wrote:
:>So with the new Perl hooks in the latest version of INN, is there a good
:>reason not to just have a Perl filter that rejects an article at the same
:>time do an INN::addhist() for the same message ID with "cancel."
:
:Theyre isn't any good reason to just have a perl filter to reject
:them. The 'refusecybercancels' inn.conf(5) option is able to refuse
:them before.
:
:refusing is less expensive than rejecting.

Around here, we issue TOS cancels following $alz.  I don't know what
"refusecybercancels" does, but if it refuses Message-ID's on <cancel.,
that's stupid and ill-conceived.  Cyberspam cancels may be identified
by their Path: tag.

... JG

Re: Rejecting late cancels
#35724
Author: Laurent Wacrenier
Date: Tue, 02 Mar 1999 00:00
31 lines
2332 bytes
Russ Allbery <rra@stanford.edu> wrote:

>> Cleanfeed has another way to do this. It can keep a cache of rejected
>> articles (on hour by default) and is able to refuse cancel of this
>> articles. It should be faster (the test is done before innd MID check
>> and it doesn't touch the history�) but not so efficient...
>
>I'm a bit confused as to how you're using the term "efficient" here...  I

I meant using such cache doesn't give you the warranty that you don't accept
all late cancel.

>suppose you're referring to memory usage for the one-hour cache of
>cancelled articles?  I'm not too worried about that.  (One can tell that
>I'm not particularly worried about memory given that I'm not running
>tagged hash.  :)  innd's only 96MB.  I should see how big expire is, but I
>don't think it's that large.)

Adding things to history implies more disk read/write. Also, the idc
history cache (if you use it) has to be bigger to get the same
performances.

>INN has to check the article against the history database anyway, so it's
>faster to reject based on a history entry than it is to reject based on a
>Perl filter.

Not nessessary, perl filter for refusing (not rejecting) articles is
run before history check. History write is the more heavy stuff on my
site.

Re: Rejecting late cancels
#35732
Author: Brian Edmonds
Date: Tue, 02 Mar 1999 00:00
15 lines
1983 bytes
Dave Barr <barr@cis.ohio-state.edu> writes:
> Only the usual reasons with not propagating cancels -- others you feed
> may want them.

I generally figure if I don't feed them the article, why should I be
feeding them the cancel?  They can either get their other peers to not
send the article, or to also send the cancel to clean up after
themselves.  I'd rather spend my bandwidth on signal than noise.

-- 
 o         Brian Edmonds <bedmonds@cs.ubc.ca>, Team Jubal Mech Labs
 \\_/\_,   Moderator: rec.arts.anime.creative, rec.music.info/reviews
(*)   (*)  Are you tired of spam?  Visit http://www.spam.abuse.net/spam/

Re: Rejecting late cancels
#35742
Author: Russ Allbery
Date: Tue, 02 Mar 1999 00:00
17 lines
1370 bytes
Laurent Wacrenier <lwa@easynet.fr> writes:

> Not nessessary, perl filter for refusing (not rejecting) articles is run
> before history check. History write is the more heavy stuff on my site.

innd: ME time 600024 idle 558282(54702) artwrite 8952(2388) artlink 0(0)
hiswrite 4187(4523) hissync 31(454) sitesend 303(2159) artctrl 460(91)
artcncl 461(92) hishave 7027(33296) hisgrep 60(42) perl 7594(4467)

Point, but not currently true of mine.  History lookups and Perl filtering
are currently eating up more time (not to mention the always-heavy article
writes).

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: Rejecting late cancels
#35765
Author: please post pix of naked pre-tee...
Date: Wed, 03 Mar 1999 00:00
70 lines
3881 bytes
On 1 Mar 1999, Russ Allbery wrote:

> > Cleanfeed has another way to do this. It can keep a cache of rejected
> > articles (on hour by default) and is able to refuse cancel of this
> > articles. It should be faster (the test is done before innd MID check
> > and it doesn't touch the history�) but not so efficient...

Faster?  Huh?  Not with the times I've measured...
I've actually been intending to add some code to add
a cancel to the history file for every article of
certain types I reject for which cancels might be
arriving in the next second or two, because, in
spite of the slightly larger history file I'd be
seeing, I would have far better (that means faster)
performance.


> INN has to check the article against the history database anyway, so it's
> faster to reject based on a history entry than it is to reject based on a
> Perl filter.

Yep.  I don't know about the timer numbers other
people are seeing, but last time I took off my pants
the time needed to add a history entry was almost
zero, and the time needed to do a history lookup was
much less than that needed for perl filtering, meaning
it is much faster for me to write a bogus cancel message
ID (or two) and let the history lookup to the refusing.

Part of this depends on how you've configured INN to
do your history file: with one option that I forget, I
see negligible history lookup times but significant
history write times, while with that option toggled the
other way, I see negligible history write times but
significant history lookup times.  I've chosen the latter.

And the fact of the matter is that those lookup times
aren't that siginificant at all, with observation
showing me that the bulk of the time I see is actually
due to blocking during the filesystem sync every 30
seconds, during which lookups pause for a couple
seconds, after which they proceed at a rate of more
than 100 per second with all articles refused (meaning
a positive text file match) once that part of the
text file makes it into the cache.

Contrarily, the biggest amount of time I see spent on
one section of the timer code is the perl filtering,
so that it would be far better for me to add less than
a millisecond for additional history manipulation than
to subject the article to several tens of milliseconds
of perl filtering.


> string and then call the Perl sub, which has to parse the message ID and
> check the cache.  So I guess my question is whether people think doing
> that 600K times will be faster than calling INN::addhist() 30K times.

For me it ain't.  Maybe someone with a bit more in the
processor speed DSW and less in the way of history
performance DSW might see things differently...
But things have gotten so bad for me that I've set up
a dedicated machine to do nothing but perl filtering.


barry bouwsmQ
suffering through warm sunny weather and beautiful women at PIVEX


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads