Thread View: news.software.nntp
13 messages
13 total messages
Started by pete
Fri, 07 Feb 2003 02:24
NEWNEWS command
Author: pete
Date: Fri, 07 Feb 2003 02:24
Date: Fri, 07 Feb 2003 02:24
17 lines
1569 bytes
1569 bytes
Hi, A couple of years ago a wrote an app which relied on the NEWNEWS command (to fetch new articles within the last x number of hours). Comming back to the program now, it seems more and more nntp servers are disabling this command. If NEWNEWS is out of favour these days, I'll need to rewrite large chunks of code, and it'll be a lot messier. Or maybe i've just been unlucky in the nntp servers i've tried. Opinions/Comments please ? Thanks peter smith
Re: NEWNEWS command
Author: those who know me have no need o...
Date: Thu, 06 Feb 2003 14:45
Date: Thu, 06 Feb 2003 14:45
13 lines
1222 bytes
1222 bytes
in news.software.nntp i read: >If NEWNEWS is out of favour these days, I'll need to rewrite large chunks of >code, and it'll be a lot messier. Or maybe i've just been unlucky in the >nntp servers i've tried. it is and you will. sorry. that's not to say that it's universally hated. -- bringing you boring signatures for 17 years
Re: NEWNEWS command
Author: Jeffrey M. Vinocur
Date: Thu, 06 Feb 2003 15:26
Date: Thu, 06 Feb 2003 15:26
18 lines
1554 bytes
1554 bytes
In article <veu0a.1907$cu1.373699@newsfep2-win.server.ntli.net>, pete <pete@p-smith.co.uk> wrote: > >A couple of years ago a wrote an app which relied on the NEWNEWS command (to >fetch new articles within the last x number of hours). Comming back to the >program now, it seems more and more nntp servers are disabling this >command. Recent versions of INN have fixed the horrible inefficiencies that made it unusable before, but I think not very many people have enabled it even so. You certainly can't rely on it being available. -- Jeffrey M. Vinocur jeff@litech.org
Re: NEWNEWS command
Author: Curt Welch
Date: Fri, 07 Feb 2003 00:48
Date: Fri, 07 Feb 2003 00:48
13 lines
1506 bytes
1506 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote: > Recent versions of INN have fixed the horrible inefficiencies > that made it unusable before, but I think not very many people > have enabled it even so. What was changed? How does it work now? How can "NEWNEWS *i*e*i* <30-minutes-ago>" ever be efficient? -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: NEWNEWS command
Author: Russ Allbery
Date: Fri, 07 Feb 2003 02:02
Date: Fri, 07 Feb 2003 02:02
27 lines
2181 bytes
2181 bytes
Curt Welch <curt@kcwc.com> writes:
> jeff@litech.org (Jeffrey M. Vinocur) wrote:
>> Recent versions of INN have fixed the horrible inefficiencies that made
>> it unusable before, but I think not very many people have enabled it
>> even so.
> What was changed? How does it work now?
> How can "NEWNEWS *i*e*i* <30-minutes-ago>" ever be efficient?
It can't; you still have to walk the overview of most of your newsgroups.
But the common case of NEWNEWS group.name time can be made much more
efficient than what INN used to do.
INN used to handle NEWNEWS requests by trolling through the history file
directly, which was painfully slow, and became even more painfully slow
when the newsgroup names weren't directly in the history file. Now it
handles NEWNEWS requests out of the overview information, and Alex has
contributed some additional caching code to make it even faster.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NEWNEWS command
Author: Jeffrey M. Vinocur
Date: Fri, 07 Feb 2003 02:49
Date: Fri, 07 Feb 2003 02:49
44 lines
2610 bytes
2610 bytes
In article <20030206194838.136$Ah@newsreader.com>, Curt Welch <curt@kcwc.com> wrote: >jeff@litech.org (Jeffrey M. Vinocur) wrote: >> Recent versions of INN have fixed the horrible inefficiencies >> that made it unusable before, but I think not very many people >> have enabled it even so. > >What was changed? How does it work now? I don't actually know any of the details; I'm just repeating what I hear. The semantics certainly haven't changed, though. >How can "NEWNEWS *i*e*i* <30-minutes-ago>" ever be efficient? My understanding was that the reason it used to be disabled on INN was that the performace was worse than optimal for the query. Obviously there's a lot of time needed to look up a large number of articles, but there's the time that's *inherently* needed, and the time that comes from a bad implementation. The goal should be to get it pretty close to what you'd get if the client kept a .newsrc and just requested the articles since the latest hiwatermark in each group one-by-one, right? I mean, in principle, NEWNEWS isn't *that* expensive. So you have to: - do the equivalent of LIST ACTIVE <wildmat> - in each group, locate the oldest article since <time> - in each group, do the equivalent of XHDR Message-ID <start>- The wildmat could I suppose be expensive, but in practice I doubt it is, and besides, when do you ever bottleneck on CPU time? And ocating the starting article ought to be pretty cheap with binary search, I think. Or am I missing something? -- Jeffrey M. Vinocur jeff@litech.org
Re: NEWNEWS command
Author: greg andruk
Date: Fri, 07 Feb 2003 11:24
Date: Fri, 07 Feb 2003 11:24
46 lines
3201 bytes
3201 bytes
Jeffrey M. Vinocur wrote: >>What was changed? How does it work now? > I don't actually know any of the details; I'm just repeating what > I hear. nnrpd's newnews certainly hasn't become free. It is a lot cheaper than it used to be. >>How can "NEWNEWS *i*e*i* <30-minutes-ago>" ever be efficient? Using the "dirty" version of ISC's active, this expression will yield about 575 newsgroups. > My understanding was that the reason it used to be disabled on > INN was that the performace was worse than optimal for the query. > Obviously there's a lot of time needed to look up a large number > of articles, but there's the time that's *inherently* needed, > and the time that comes from a bad implementation. The goal > should be to get it pretty close to what you'd get if the client > kept a .newsrc and just requested the articles since the latest > hiwatermark in each group one-by-one, right? Is it reasonable to allow a normal client to request what's new in over 500 groups in one go? A limit on the count will generally be wanted. > I mean, in principle, NEWNEWS isn't *that* expensive. So you > have to: > - do the equivalent of LIST ACTIVE <wildmat> > - in each group, locate the oldest article since <time> > - in each group, do the equivalent of XHDR Message-ID <start>- > The wildmat could I suppose be expensive, but in practice I doubt > it is, Not in a case like that. It usually just calls attention to itself in every-article cases like XPAT, filtering or feeding. > and besides, when do you ever bottleneck on CPU time? I suspect that most of the news servers out there in the world are not running on dedicated hardware. Establishing group and overview contexts can be expensive in aggregate (illustrated by the trn problem).
Re: NEWNEWS command
Author: greg andruk
Date: Fri, 07 Feb 2003 11:32
Date: Fri, 07 Feb 2003 11:32
9 lines
1653 bytes
1653 bytes
greg andruk wrote: > Using the "dirty" version of ISC's active, this expression will yield about > 575 newsgroups. Or even closer to 12000 if one remembers to type in the trailing star. That's a lot of groups.
Re: NEWNEWS command
Author: Jeffrey M. Vinocur
Date: Fri, 07 Feb 2003 11:53
Date: Fri, 07 Feb 2003 11:53
40 lines
2478 bytes
2478 bytes
In article <1iizzwuycuzdk.dlg@meowing.net>, greg andruk <gja@meowing.net> wrote: >Jeffrey M. Vinocur wrote: > >> The goal should be to get it pretty close to what you'd get if >> the client kept a .newsrc and just requested the articles >> since the latest hiwatermark in each group one-by-one, right? > >Is it reasonable to allow a normal client to request what's new in over 500 >groups in one go? Why not? I mean, if the client just wants to make the server be retrieve a lot of overview data, there are more than enough ways to do it; that is, we've already got some assumption that clients are not too malicious. So then, if the client actually *wants* all of that data to display to the user, the question is whether it costs any more to use NEWNEWS than a sequence of other commands. And the other question is whether there's some benefit to making the client do it in steps (e.g., so you can throttle in between). You seem to suggest there is. >> and besides, when do you ever bottleneck on CPU time? > >I suspect that most of the news servers out there in the world are not >running on dedicated hardware. Are they the ones likely to have a problem with NEWNEWS, though? >Establishing group and overview contexts >can be expensive in aggregate (illustrated by the trn problem). Of course. But if it's no *more* expensive that the alternative...
Re: NEWNEWS command
Author: Curt Welch
Date: Fri, 07 Feb 2003 16:39
Date: Fri, 07 Feb 2003 16:39
24 lines
2146 bytes
2146 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote: > In article <1iizzwuycuzdk.dlg@meowing.net>, > greg andruk <gja@meowing.net> wrote: > >Jeffrey M. Vinocur wrote: > > > >> The goal should be to get it pretty close to what you'd get if > >> the client kept a .newsrc and just requested the articles > >> since the latest hiwatermark in each group one-by-one, right? > > > >Is it reasonable to allow a normal client to request what's new in over > >500 groups in one go? > > Why not? Because there are better ways for the client to do it which reduce the load on the server buy a factor of 100 to 1000 and it's wrong to encourge the client to use a command which is so expensive when there are simple ways for the client to find the same answer which costs much less (i.e., get a real news feed or use article numbers). -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: NEWNEWS command
Author: Russ Allbery
Date: Fri, 07 Feb 2003 18:49
Date: Fri, 07 Feb 2003 18:49
37 lines
2867 bytes
2867 bytes
Curt Welch <curt@kcwc.com> writes:
> jeff@litech.org (Jeffrey M. Vinocur) wrote:
>> greg andruk <gja@meowing.net> wrote:
>>> Is it reasonable to allow a normal client to request what's new in over
>>> 500 groups in one go?
>> Why not?
> Because there are better ways for the client to do it which reduce the
> load on the server buy a factor of 100 to 1000 and it's wrong to
> encourge the client to use a command which is so expensive when there
> are simple ways for the client to find the same answer which costs much
> less (i.e., get a real news feed or use article numbers).
I don't believe that NEWNEWS is inherently any more expensive than
requesting the same number of articles by article number apart from the
binary search to find the starting date, which I really doubt is a
substantial portion of the overall server load, particularly two orders of
magnitude. The expensive operation from the INN standpoint is really
locating and opening the overview database for all of those groups, which
it would have to do anyway.
I also don't think that 500 groups is necessarily an appropriate
threshold to tell people to get a real news feed. I have, at various
times, read at least that many groups with a normal news reader.
Now, if it were several thousand (as it is with the original pattern),
that may be another question. Although bear in mind that most of those
groups are probably completely empty and therefore very fast to process.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NEWNEWS command
Author: Curt Welch
Date: Fri, 07 Feb 2003 20:25
Date: Fri, 07 Feb 2003 20:25
85 lines
5847 bytes
5847 bytes
Russ Allbery <rra@stanford.edu> wrote: > Curt Welch <curt@kcwc.com> writes: > I don't believe that NEWNEWS is inherently any more expensive than > requesting the same number of articles by article number apart from the > binary search to find the starting date, which I really doubt is a > substantial portion of the overall server load, particularly two orders > of magnitude. The binary search is mostly minor. > The expensive operation from the INN standpoint is really > locating and opening the overview database for all of those groups, which > it would have to do anyway. There are two ways you can try to do NEWNEWS. The correct way requies you to keep one list of all articles (inn history file), in which case a NEWNEWS for very long time period with a very small set of groups causes the server to "grep" a huge file just to return a few lines of data. Hitting 1000 to 1 in bytes scanned to bytes returned is trivial. An example of how a client could abuse this implementation (wihtout realizing their abuse) is simply to do 100 NEWNEWS commands, one for each group, all with a date which was 1 month in the past. The other way to implement it is by newsgroup so you get a separate article list per newsgroup with timestamps. This is broken because it will cause NEWNEWS to return dups for cross posted articles (unless the server does something special to eliminate the dups). The way that gets abused is to do a NEWNEWS command for a large set of groups (say *) with a very short time period (say 1 minute). A client trying to get a "full-feed" list of message-ids for example could just hang in a loop doing DATE and NEWNEWS commands. Each NEWNEWS would force the server to check the database of every group even though only a few hundred would actaully have new articles in them. Once again, the amount of data scaned vs the amount of data returned can easily be 1000 to 1. These are the worse case issues, and for more nomral use, where you are checking for all new news say every few hours in a "normal sized" set of groups, the waste would not be expected to be so bad because you would be returning data for most groups which were checked. But you are still talking 10 to one ratios of data scanned to data returned. > I also don't think that 500 groups is necessarily an appropriate > threshold to tell people to get a real news feed. I have, at various > times, read at least that many groups with a normal news reader. The issue isn't that "sucking" 500 groups is bad. Doing it by NEWNEWS is bad. To figure out which articles are "new" only requies that the client fetch the high water mark for each group. All servers are well optimized to return this information - many without wasting _any_ disk io because the high water mark is such an important number it's in-memory for almost every server. > Now, if it were several thousand (as it is with the original pattern), > that may be another question. Although bear in mind that most of those > groups are probably completely empty and therefore very fast to process. But even faster if the client would simply have done a LIST ACTIVE *i*e*i*. What server do you suspect can do NEWNEWS as easy as LIST ACTIVE? (newnews of course supports a group "sys" entry, whereas LIST ACTIVE only supports wildmats (oh, but you already told me people were adding group lists there didn't you?), so that's a minor point). Most clients that use NEWNEWS seldom care about the Message-Id so that's not even important. They simply want to fetch all the new news. The highwater mark for each group tells the client everything it needs to fetch the articles. NEWNEWS can be implemented in ways that make it "not so bad" most the time. But it requires that the server keep a completly different database to time stamp the arrivial of every article. NEWNWES is the only command that requies the server to do this. So not only does it have efficiency issues on it's own, it effects the effecenty of the entire server by forcing it to keep more information about every article. You can build servers to support NEWNEWS and they don't even have all that much problem doing it. For a fast server with a small load, it's not even an issue. But when you are already using server farms to support thousands of users, adding support for NEWNEWS, could get expensive if a lot of users started using it. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: NEWNEWS command
Author: Russ Allbery
Date: Fri, 07 Feb 2003 22:03
Date: Fri, 07 Feb 2003 22:03
36 lines
2815 bytes
2815 bytes
Curt Welch <curt@kcwc.com> writes:
> There are two ways you can try to do NEWNEWS. The correct way requies
> you to keep one list of all articles (inn history file),
I disagree that this is the correct way.
> The other way to implement it is by newsgroup so you get a separate
> article list per newsgroup with timestamps. This is broken because it
> will cause NEWNEWS to return dups for cross posted articles (unless the
> server does something special to eliminate the dups).
Suppressing the dups isn't that hard, although yes, it does add some work.
I still don't see an order of magnitude here, though.
> The way that gets abused is to do a NEWNEWS command for a large set of
> groups (say *) with a very short time period (say 1 minute).
I agree that NEWNEWS * is, in general, not the best idea or use of server
resources, but that also wasn't what I thought we were talking about. :)
> The issue isn't that "sucking" 500 groups is bad. Doing it by NEWNEWS
> is bad. To figure out which articles are "new" only requies that the
> client fetch the high water mark for each group.
Okay, yes, I see your point there. I was more concentrating on the case
where the client then wants overview information, but even there NEWNEWS
followed by XOVER is probably going to result in two overview opens
instead of one.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
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