Article View: news.software.nntp
Article #14320Re: caveat - multiple feeds to slaves
From: Steve Jones
Date: Wed, 22 Jan 1997 00:00
Date: Wed, 22 Jan 1997 00:00
109 lines
6096 bytes
6096 bytes
Please pardon if I come across as overly critical, I don't mean to be. In article <5c4483$bg0@earth.alpha.net>, Joe Greco <jgreco@ns.sol.net> wrote: >In article <5c3biu$qs4@dfw-ixnews11.ix.netcom.com>, >Mark Hittinger <bugs@freebsd.netcom.com> wrote: >>I do multiple feeds to the slaves here. Its either have larger backlogs >>and nearly perfect fifo overviews or have no backlogs and not-in-order >>overviews. > >This sounds like something I've been working on. > >>Overview can be sorted with 'sort -n' to make it acceptable to "less tolerant >>readers(tm)" :-). > >Huh? If the overchan program were to keep track of the last article number in a newsgroup, it could detect when it is given data for a lesser article number. It could then instead of appending the overview record, rewrite the file with the new overview record inserted in the proper order. If an index of the overview file is kept in another file, the rewrite can be done rather efficiently. (Assumes that the operation of opening the index file is not overly resource intensive.) >The only consumer of the overview database files (at least in NNTP) is: >nnrpd. (Well, also expireover, but...) > >nnrpd goes to great lengths to ALWAYS provide overview data to a client >that requests it, using any existing ".overview" as a "cache" of already- >generated overview data. > >In particular, the NOV code does a linear search forward through the >.overview file, caching the current location. It will become very much >less efficient - but still work - if it can not find the data in the >.overview file, because it will open the ARTICLE and generate the data. >But in no case that I have seen will it cause a client to stop >functioning, because nnrpd always returns the data, one way or another. > >(I just rewrote all the NNRP NOV code yet again today, so I am particularly >familiar with it)... >What I did: I worked on the assumption that nonsequential delivery was a >likely given - many times over. Inside nnrpd, I preprocess the data, >essentially trading a full up front traversal of the .overview file (that >allows me to very efficiently index the data by message number), on the >assumption that once in a large group, one was likely to ask for many >articles. If the overchan program did the indexing for you, for example keeping an .overview-index file, you'd have files you could memory map for efficiencies sake. The memory savings you get from using a memory mapped file would be significant. (Remember to release old file versions regularly.) Saving memory on a virtual memory system is equivalent to saving paging I/O and if you don't page, your system throughput will improve accordingly. >It seems to be working okay, although the load averages on the machines >seem nearly double, performance is still excellent and I have not seen >any of the nasty side effects I have traditionally associated with a bunch >of clients grinding on the spool to manually generate NOV data. > >You might be able to do the same thing by constantly sorting your files, >but that's a lot of work, and doesn't happen in real time. By "real time" I assume you mean on demand by the clients. Processing that can be done ahead of the demand is an improvement in service, and the further ahead the better. If you can do the processing that you've given to nnrpd occur in overchan, your clients will have further improved response. If you can avoid "read" operations on the overchan file, and avoid the memory requirement for a read buffer (and it sounds like you've buffered the entire file by your comments above) you will have better performance. >What I haven't done: looked at expireover to see how to make that play >ball. I've also hacked on nnrpd to do a few things, but what I found was that my improved version didn't have a sufficiently significant impact on client responsiveness that maintaining my own version of the code would be worthwhile. The code I did was along the lines of what you described, but didn't buffer all of the data at once. I was particularly concerned about requests for overview data in reverse record order. I've found that for my site, the times when the slave falls behind in it's single feed is when there are an excessive number of new files being added to an already large directory. The filesystem I am using (ultrix BSD fast filesystem) does a poor job of that. I found that if I filtered out the articles from the sites with the most postings to "misc.jobs" (each of the thousands of articles posted weeky are on the senders' WWW sites in a more convenient form) my newsfeed backlogging went way. Not coincidentally, the peak in news flow during the day can coincide with the peak in client activity. For news servers which have become resource constrainted, it can come down to a choice of whether the client can have the news "current" or "now". I think that for the most part, clients will demand both. Any efficiencies that can be gained in either the processing of incoming news or the serving of articles to the clients will benefit both activities. I applaud your efforts, but find myself favoring the "now" camp. -- -- Steven Jones Computing & Communications 354843, University of Washington E-mail: noyd@u.washington.edu Phone: (206) 543-5852
Technical Details
Message-ID:
<5c5pd1$5fk@nntp1.u.washington.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!not-for-mailReferences:
<5c3biu$qs4@dfw-ixnews11.ix.netcom.com> <5c4483$bg0@earth.alpha.net>Show Full Headers
Complete Article Headers
Message-ID: <5c5pd1$5fk@nntp1.u.washington.edu> Subject: Re: caveat - multiple feeds to slaves Date: Wed, 22 Jan 1997 00:00:00 +0000 From: noyd@u.washington.edu (Steve Jones) References: <5c3biu$qs4@dfw-ixnews11.ix.netcom.com> <5c4483$bg0@earth.alpha.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!not-for-mail X-Deja-AN: 211518079 Distribution: inet Organization: University of Washington, Seattle Nntp-posting-user: noyd Newsgroups: news.software.nntp