Thread View: news.software.nntp
10 messages
10 total messages
Started by Gordy Thompson
Tue, 11 Feb 1997 00:00
Newsfeed metrics: log/news vs. log/news.notice
Author: Gordy Thompson
Date: Tue, 11 Feb 1997 00:00
Date: Tue, 11 Feb 1997 00:00
58 lines
3394 bytes
3394 bytes
Because our newsfeeds must traverse an NNTP relay on our
firewall, the "Articles received by server" stats produced by
innlog.pl are useless to us: The only "host" that opens NNTP
connections on newsgate is "gatekeeper", the firewall.
So I cooked up a perl script to extract what I thought would
be the same information from log/news, which does contain the feeding
site's name for each article we're offered and an indication (+, - or
j) of its disposition. The script counts all appearances of each $site
and for each appearance, increments that site's total for articles
offered ((+) + (-) + (j)), and either accepted (+), refused (-) or
rejected (j)
As a reality check, I ran them one right after the other -- my
script against log/news, innlog.pl against log/news.notice, both of
which were initialized within minutes of one another shortly after
midnight. And to my surprise, I got this:
# ./gttlog.pl < log/news
Host Offered Accepted % Accepted Refused Rejected
aaa.bbb.ccc 655 547 83.51% 108
ddd.eee.fff 89599 66041 73.71% 23228 330
ggg.hhh.iii 123614 93302 75.48% 27340 2972
not-for-mail 2 2 100.00%
jjj.kkk.lll 4843 4768 98.45% 45 30
mmm.nnn.ooo 18848 15456 82.00% 3381 11
ppp.qqq.rrr 2369 1873 79.06% 486 10
Totals 239930 181989 75.85 54588 3353
# ./innlog.pl < log/news.notice
[...]
Articles received by server
System Connects Offered Took Tk% Refuse Reject Accpt
gatekeeper.nytimes.c 2318 389801 182726 99% 157310 49765 46%
localhost 3 2 2 0% 0 0 100%
TOTALS 2321 389803 182728 100% 157310 49765 46%
Allowing for the few moments between executions, innlog's
"took" is roughly equal to gttlog's "accepted", but news.notice
appears to have recorded about 150K more refusals and rejections than
did log/news.
Am I overlooking something obvious here?
Is there perhaps a patch that will let syslog log connection
data by sitename rather than by hostname, so I can just use innlog.pl
and other mainstream reporting tools rather than grow my own?
==========================================================================
Gordon T. Thompson gordy@nytimes.com
Manager, Internet Services 212 556 1386
The New York Times fax: 212 556 1636
This letter has been modified as follows from its original
version: It has been formatted to fit your screen.
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Ron Jarrell
Date: Tue, 11 Feb 1997 00:00
Date: Tue, 11 Feb 1997 00:00
24 lines
1530 bytes
1530 bytes
Gordy Thompson (gordy@nytimes.com) wrote: : "took" is roughly equal to gttlog's "accepted", but news.notice : appears to have recorded about 150K more refusals and rejections than : did log/news. : : Am I overlooking something obvious here? : Is there perhaps a patch that will let syslog log connection : data by sitename rather than by hostname, so I can just use innlog.pl : and other mainstream reporting tools rather than grow my own? Yes; remember the news file only concerns articles that actually made it to INN for processing. INN is logging in news.notice articles that it refused to even look at; chiefly those that the other side did an IHAVE for and you rejected because you already had it. The "news" log rejection comes into play when you're handed an article and *then* realize you didn't want it, e.g. you didn't have the group, your perl filter rejected it after looking at it, etc.
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Gordy Thompson
Date: Wed, 12 Feb 1997 00:00
Date: Wed, 12 Feb 1997 00:00
48 lines
2994 bytes
2994 bytes
In article <5dpdo8$9r3$1@solaris.cc.vt.edu>, jarrell@solaris.cc.vt.edu
(Ron Jarrell) wrote:
>Gordy Thompson (gordy@nytimes.com) wrote:
>: "took" is roughly equal to gttlog's "accepted", but news.notice
>: appears to have recorded about 150K more refusals and rejections than
>: did log/news.
>:
>: Am I overlooking something obvious here?
>Yes; remember the news file only concerns articles that actually made
>it to INN for processing. INN is logging in news.notice articles
>that it refused to even look at; chiefly those that the other side
>did an IHAVE for and you rejected because you already had it.
>
>The "news" log rejection comes into play when you're handed an article
>and *then* realize you didn't want it, e.g. you didn't have the group,
>your perl filter rejected it after looking at it, etc.
>
This implies some kind of separated pre- and post-processing
that I didn't think (or realize) was going on. My understanding was
that in the NNTP dialogue, "refused" = "I already have it" and
"rejected" = "I don't carry that group". I also thought that this all
took place within NNTP; the only post-processing I do is to reject
huge articles (no perl filtering etc.)
How could I hear an IHAVE, determine that I want the article
and then =later= realize that that was a mistake because I actually
did have it or in fact don't carry the group? Is this a
self-corrective post-processing of hiccups in the NNTP dialogue?
>: Is there perhaps a patch that will let syslog log connection
>: data by sitename rather than by hostname, so I can just use innlog.pl
>: and other mainstream reporting tools rather than grow my own?
In any case, this is probably the direction I should be
focussing. Assuming from the group's silence that there is no such
patch, could someone at least provide a hint as to the particular
files I should be looking at?
==========================================================================
Gordon T. Thompson gordy@nytimes.com
Manager, Internet Services 212 556 1386
The New York Times fax: 212 556 1636
This letter has been modified as follows from its original
version: It has been formatted to fit your screen.
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Ron Jarrell
Date: Thu, 13 Feb 1997 00:00
Date: Thu, 13 Feb 1997 00:00
18 lines
1465 bytes
1465 bytes
Gordy Thompson (gordy@nytimes.com) wrote: : This implies some kind of separated pre- and post-processing : that I didn't think (or realize) was going on. My understanding was : that in the NNTP dialogue, "refused" = "I already have it" and : "rejected" = "I don't carry that group". I also thought that this all : took place within NNTP; the only post-processing I do is to reject : huge articles (no perl filtering etc.) Remember that at the point that the you get the IHAVE, the ONLY thing you know is what the message id is, so unless you've already got the message id in your history file, you might well accept an article you don't actually want, but can't tell until you read the article. After you read the article there might be a variety of reasons you decide you don't want it.
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Gordy Thompson
Date: Fri, 14 Feb 1997 00:00
Date: Fri, 14 Feb 1997 00:00
76 lines
4256 bytes
4256 bytes
In article <gergE5J5ws.5Ju@netcom.com>, gerg@netcom.com (Greg Andrews)
wrote:
>gordy@nytimes.com (Gordy Thompson) writes:
>>
>> How could I hear an IHAVE, determine that I want the article
>>and then =later= realize that that was a mistake because I actually
>>did have it or in fact don't carry the group?
>>
>
>Because IHAVE doesn't include the article's size, for one thing.
>(nor the newsgroups, as you partly point out above)
>
>Remember that the response to IHAVE is *not* "I want that article"
>as your question implies, but rather "I don't yet have that message-id
>in my history file". The former assumes a lot is known about the
>article - before it's even transferred.
>
If I understand this correctly, then, "rejection" can't occur
in response to IHAVE, only "acceptance" (message-ID isn't in history)
or "refusal" (message-ID is in history) because other factors such as
whether I carry that group aren't relevant or knowable at that point.
And the IHAVE dialogue in the channels is the only point in
the process where "refusal" =can= occur -- if I accept an article
because its message-ID isn't in history at the instant the article was
offered, the message-ID isn't going to turn up suddenly later in
history via some other route and nullify the basis for my original
acceptance.
So the flow on my system, where I don't do perl filtering or
crosspost limiting and reject only articles >1Mb, would be like this?
IHAVE ----- accept ----[x]---- keep
\ (not in \
\ history) \
\ \
\-- refuse \---reject (don't carry group,
(already \ other reasons?)
in history \
\-(a few more refusals based on size?
bad headers? etc.?)
Now how can I reconcile these two reports, or even interpret either
one?:
(homegrown script, derived from log/news:)
Offered Accepted % Accepted Refused Rejected
Totals 324905 246649 75.91% 76020 2236
(innlog.pl, derived from log/news.notice:)
Connects Offered Took Tk% Refuse Reject Accpt Elapsed
TOTALS 2898 601505 265463 100% 258375 77667 44% 811:06:55
The homegrown script runs before scanlogs in news.daily and
its numbers are a few hours earlier than innlog.pl's, so its
"accepted" figure is slightly less than innlog.pl's "took" figure.
Allowing for that difference, they're equivalent.
But although most of the "refusals" and "rejections" are
reported in log/news.notice, they also appear in quantity in log/news.
So evidently both rejection =and= refusal occur at two different,
monitorable points -- most of it in the channels, tallied in
log/news.notice, but some more at a later point, tallied in log/news.
And since log/news is the only place I can record this
activity by site rather than host, I'm trying to understand this
process well enough to interpret exactly what kind of performance
log/news =is= reporting.
==========================================================================
Gordon T. Thompson gordy@nytimes.com
Manager, Internet Services 212 556 1386
The New York Times fax: 212 556 1636
This letter has been modified as follows from its original
version: It has been formatted to fit your screen.
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Barry Bouwsma
Date: Fri, 14 Feb 1997 00:00
Date: Fri, 14 Feb 1997 00:00
89 lines
5468 bytes
5468 bytes
On Fri, 14 Feb 1997, Gordy Thompson wrote:
> If I understand this correctly, then, "rejection" can't occur
> in response to IHAVE, only "acceptance" (message-ID isn't in history)
> or "refusal" (message-ID is in history) because other factors such as
> whether I carry that group aren't relevant or knowable at that point.
If you are offered a message with a munged or otherwise invalid
Message-ID, you'll also complain about it. Whether this is logged as a
rejection, I'm unsure, but you should get this no more than a couple times
a day at worst.
> And the IHAVE dialogue in the channels is the only point in
> the process where "refusal" =can= occur -- if I accept an article
Strictly speaking, at the point of IHAVE/CHECK, you are either
refusing it (it's in history already meaning you have it), or you're
saying, hit me with it baby. Acceptance happens after you're hit.
> So the flow on my system, where I don't do perl filtering or
> crosspost limiting and reject only articles >1Mb, would be like this?
>
> IHAVE ----- accept ----[x]---- keep
^^^^^^gimme ^^^^accept
> \ (not in \
> \ history) \
> \ \
> \-- refuse \---reject (don't carry group,
> (already \ other reasons?)
> in history \
> \-(a few more refusals based on size?
> bad headers? etc.?)
^^^^^ No, not refused at this point.
If an article is sent, you either accept it, or you reject it with a 437
code (possible reasons include unwanted group -- the most likely, but also
too large, too old, unapproved, unwanted distribution, and so on, or, if
you have multiple incoming feeds, you may see the most rejections as
duplicate article, meaning two peers offered the article to you
(IHAVE/CHECK) at a time when you did not have it, you said pretty please
to both, and one peer got the article to you before the other), or you
might also reject it with 439, meaning there was a problem in transfer, if
I recall correctly. I'm going from the top of my pointy head and would
welcome corrections.
Articles you reject mean they travelled down the path to you, wasting
bandwidth. If most of them are for unwanted groups or distributions, you
should contact your feeding sites to ask them not to send these groups,
for it wastes bandwidth, and in the case of sites which can barely keep
up, slows down INN further by giving it extra work feeding /dev/null.
Likewise if an upstream site sends oversize articles.
If you have multiple incoming streaming feeds, chances are the most
articles you reject are being offered at roughly the same time by more
than one of your peers. Solving this is a bit more difficult, as it can
require coordination of your feeders. The streaming model speeds things
up by CHECKing many articles at the same time, but if you are missing most
of them, it will then take some time to transfer the articles you want,
and many minutes could elapse from the time you say hit me, to when you
actually feel the blow, which gives many minutes for other peers to get
their licks in and offer you the same article.
An improvement can be had by sending a smaller number of CHECKs, so
that one gives less of a window or opportunity. I've pretty much cut the
number of CHECKs to most of my peers to 10 for most articles, and maybe 4
for the larger ones (which take longer to transfer), for this reason.
Where bandwidth or lag in response is a factor, I also must increase the
maximum simultaneous connections offering a smaller number of CHECKs.
If you are only sending a small number of articles successfully to a
peer, you can usually safely send a larger number of CHECKs. Likewise, if
your peer takes almost everything from you. In the latter case, a
streaming feed will switch from CHECK mode into sending all articles which
could include some the peer already has, and these too will show as
duplicate articles.
I guess this really doesn't answer all your questions, but maybe it
helps some sites tune their feeds and reduce wasted bandwidth. I can't
recall if you've posted this, but how are you deducing the number of
refused articles from the news log file with your custom script?
Otherwise the numbers look reasonable at a glance from here...
Barry Bouwsma, Radio Praha news admin and hopeless romantic
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Per Hedeland
Date: Sat, 15 Feb 1997 00:00
Date: Sat, 15 Feb 1997 00:00
28 lines
1787 bytes
1787 bytes
In article <Pine.SOL.3.95.970214094239.8276F-100000@dahlia> Barry Bouwsma <deadbeef@dahlia.vszbr.cz> writes: > If you have multiple incoming streaming feeds, chances are the most >articles you reject are being offered at roughly the same time by more >than one of your peers. Very true, unfortunately... > Solving this is a bit more difficult, as it can >require coordination of your feeders. Well, it *was* solved in the pre-streaming days, by the receiving innd alone - if it got more than one IHAVE for a particular Message-ID before it had fully received the article, it would simply withhold the reply to the second and subsequent IHAVE until the article reception had succeeded or failed. The streaming mods broke this, as the original code could only deal with one Message-ID (per feed, I believe) at a time and this wasn't changed - but I do believe that it is possible to fix... I think there was some discussion about this either here or on news.admin.technical, but no resolution that I recall. --Per Hedeland per@erix.ericsson.se
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Alan Brown
Date: Sat, 15 Feb 1997 00:00
Date: Sat, 15 Feb 1997 00:00
17 lines
1389 bytes
1389 bytes
In article <gergE5J5ws.5Ju@netcom.com>, Greg Andrews <gerg@netcom.com> wrote: >Because IHAVE doesn't include the article's size, for one thing. >(nor the newsgroups, as you partly point out above) Any interest in a modified IHAVE/CHECK which supports size and/or grouplists? AB -- o Stamp out unauthorised relay-hosting. This SMTP "feature" shouldn't default "on" - See http://www.vix.com/spam/ and http://www.sendmail.org/antispam.html o Junk email returned, in bulk, back to sender; w/copies to all postmasters. o Received junkmail constitutes a request for aggressive site security probing.
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Gordy Thompson
Date: Sat, 15 Feb 1997 00:00
Date: Sat, 15 Feb 1997 00:00
88 lines
4199 bytes
4199 bytes
I've learned a great deal from this thread about the flow of
incoming articles, the merits and disadvantages of streaming and much
more. But because I started with an unfocussed question, I still don't
know what I _need_ to know, which is: "What exactly is being logged in
log/news and in log/news.notice?"
If I count and array acceptance/refusal/rejection by site in
log/news, I get this:
Offered Accepted % Accepted Refused Rejected
(feed1) xxxxx xxxxx xx.xx% xxxx xxx
(feed2) yyyyy yyyyy yy.yy yyyy yyy
(...)
localhost x x 100% 0 0
Totals 324905 246649 75.91% 76020 2236
The daily report from innlog.pl, derived from log/news.notice,
however, gives me this:
System Connects Offered Took Tk% Refuse Reject Accpt Elapsed
firewall xxxx xxxx xxxx xx% xxxxx xxxx xx% xxxxxxxxx
localhost x xx xx xx% 0 0 xx% xxxxxxxxx
TOTALS 2898 601505 265463 100% 258375 77667 44% 811:06:55
(The first report is extracted a few hours before the second,
so its "accepted" figure is slightly less than the "took" figure in
the second. Otherwise they're equivalent.)
I want to judge the efficiency of my feeds, but because my
feeds come through a relay on the firewall, logging by "host"
(log/news.notice) is useless -- it all comes from one "host", the
firewall. Logging by "site" is done in log/news, but most of the
refusals and rejections are missing from there.
Q: Am I wasting my time analyzing log/news because the
acceptance/refusal/rejections by host aren't representative of
efficiency (because it's not logging a bunch of refusals/rejections
that occurred prior to whatever it's tallying)?
Q2: Assuming I am, could someone show me the way to a patch to
(art.c? chan.c? something?) so that log/news.notice would log
connections by =site= rather than by =host=?
Finally, I've been asked by a few people for the perl script I
used to extract the report from log/news (credit where credit is due
-- the author is Felix Sheng <felix@nytimes.com> of NYT Electronic
Media).
Takes input from stdin (gttlog.pl < /var/INN/log/news):
----- cut here -----
#!/usr/bin/perl
while(<>) {
($code, $sender) = (split(/\s+/))[3,4];
$hash{$sender}{$code}++;
$hash{$sender}{total}++;
$hash{zzTotals}{$code}++;
$hash{zzTotals}{total}++;
}
foreach $k (sort keys %hash) {
$percentacc = sprintf( "%3.2f", ($hash{$k}{'+'} / $hash{$k}{total}
) * 100);
write;
}
format STDOUT_TOP =
Host Offered Accepted % Accepted Refused
Rejected
..
format STDOUT =
@<<<<<<<<<<<<<<<<< @>>>>>>>>> @>>>>>>>> @>>>>>% @>>>>>>>
@>>>>>>>>
$k, $hash{$k}{total}, $hash{$k}{'+'}, $percentacc, $hash{$k}{'-'},
$hash{$k}{j}
..
----- cut here -----
==========================================================================
Gordon T. Thompson gordy@nytimes.com
Manager, Internet Services 212 556 1386
The New York Times fax: 212 556 1636
This letter has been modified as follows from its original
version: It has been formatted to fit your screen.
Re: Newsfeed metrics: log/news vs. log/news.notice
Author: Per Hedeland
Date: Sat, 15 Feb 1997 00:00
Date: Sat, 15 Feb 1997 00:00
58 lines
3085 bytes
3085 bytes
[ Bogus Distribution: inet removed ]
In article <330608dd.49402840@newsgate> gordy@nytimes.com (Gordy
Thompson) writes:
> If I count and array acceptance/refusal/rejection by site in
>log/news, I get this:
No way can you count refusals in log/news - they're simply not there.
Your script seems to assume that "-" means "refusal", but according to
innd(8):
If the fourth field is a minus sign, then the article was
rejected.
^^^^^^^^
(It goes on to list a number of reasons for rejection.) I believe this
is a correct description:
Refused: Innd declined to receive the article upon seeing the Message-ID
in IHAVE or CHECK - logged *only* in 'news.notice'. The only reason for
refusal is that the Message-ID is already present in the history file.
Rejected: Innd decided to take the article upon seeing the Message-ID in
IHAVE or CHECK (i.e. it wasn't present in the history file), or had no
choice in the matter in TAKETHIS, but later decided it didn't want it
after all - logged in both 'news' and 'news.notice'. There are many
reasons for rejection.
> Q: Am I wasting my time analyzing log/news because the
>acceptance/refusal/rejections by host aren't representative of
>efficiency (because it's not logging a bunch of refusals/rejections
>that occurred prior to whatever it's tallying)?
Probably.
> Q2: Assuming I am, could someone show me the way to a patch to
>(art.c? chan.c? something?) so that log/news.notice would log
>connections by =site= rather than by =host=?
You can't really do that - the "site" that you see in log/news is the
first entry in the Path: header - as per above, on a refusal innd never
even *receives* the Path: header. You could do some approximation by a)
hoping that at least one article in each connection isn't refused, b)
assume that all articles in a given connection has the same first Path:
entry, and c) use the Path: entry from the first non-refused article -
but that's pretty gross...:-)
If you're really desperate, you could configure the inner interface of
your firewall to have multiple IP addresses, and hack whatever proxy
software is running there to bind to a different local address depending
on where the connection originated - this would then show up as
different "hosts" in news.notice.
--Per Hedeland
per@erix.ericsson.se
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