Article View: news.software.nntp
Article #37096Re: Abandoning uniover - but how?
From: T. William Wells
Date: Wed, 28 Apr 1999 00:00
Date: Wed, 28 Apr 1999 00:00
106 lines
5589 bytes
5589 bytes
In article <19990428114141.388$tD@newsreader.com>, Curt Welch <curt@kcwc.com> wrote: : bill@twwells.com (T. William Wells) wrote: : Well, you are right. I didn't think about that. So 2.x has to actualy : deal with more file updates. In total number, yes. : But, I'm assuming the index records are very small compared to an avg : overview record. That is correct. : I wonder which design ends up writing more data? Not a wholly relevant datum, since in either case overview writes are dominated by the time needed to open and close the overview or overview index file. The performance gain can only be marginal at best, while the performance loss at read is dramatic. : The other big problem for me with 2.x was that it wasn't updating the : overview to reflect canceled articles. Canceled articles still showed : up in the overview data. Has that been fixed yet? Who knows? 1.x didn't do this, however. (Well, maybe it did on expire.) However, 1.x actually checked the spool to determine if the article was there, so this didn't matter for it. : > I personally think that the 1.x overchan, with a few : > modifications like open file caching, and running it from cron : : Not sure what you are thinking of when you say running from : cron On my system, the overview data is sent to a file where a shell script picks it up and feeds it to overchan. The script is basically "while there is overview data and the server is running, get us a work file, feed it to overchan, and delete the work file", which means that the script is more or less constantly running; when it stops, cron starts it up a few minutes later. : but one thing that needs to be dealt with is the issue : of overview information showing up later than the article : shows up. i.e., if the group command returns a higher article : number, then an overview commands shows no data for the article, : newsreaders consider that to mean the article has been cancled. 1.x nnrp (and 2.x nnrp, if one isn't using the storage manager) will build an overview record on-the-fly if there isn't one in the overview database. In any case, this would be a problem with _any_ overchan implementation, since it writes the data sometime *after* innd has written the article out (and thus possibly the active file data). : > rather than a channel feed, is more than sufficiently efficient. : > OTOH, I can think of several alternative methods, right off the : > top of my head, that have the advantages of the 1.x along with the : > purported advantages of the 2.x method. Heck, maybe after dinner, : > I'll sketch out one or two.... Well, here's a proposal: Get rid of overchan entirely. Let nnrpd have the responsibility of reading *and* creating the overview. This would seem to be about as efficient as one can get, since exactly those articles that need overview records get them and none others do. In this method, the overview database is, in essence, one big shared cache used exclusively by nnrpd. There are a number of considerations: 1) If overview data is handled at article receipt time, there is a good chance the article is in the disk cache, thus not requiring yet more disk accesses to build the overview data. This is somewhat countered by there being a reasonable chance that if the article is read for creating overview data, the article is also likely to be read (from the disk cache) in order to be sent to the client. 2) If a group is very active but not read and then someone comes along and reads it, that person is going to wait a long time (as with the 2.x overview) for the overview data to be built. This can be countered by a program that keeps track of group activity and when it feels that a group is getting too far behind on overview, just connects to nnrpd and issues the necessary XOVER commands. 3) Since nnrpd is now managing the overview database, it has to handle locking between instances. The sequence needs to be something like this: grab the lock, find the final record in the overview file, scan the spool from that point, append records to the overview file, release the lock. (You want to do the lock before scanning the spool since otherwise several nnrpd's could think they need to do a scan, at the same time.) Of course, this requires a working lock method.... 4) Something needs to be done about cancelled articles. Marking the overview entry in-place would work, so long as it is done with system writes and not standard I/O buffered writes. The mark would occur when nnrpd tries to fetch the article and doesn't find it. Since the write is in-place, no locking is needed for this. 5) There still needs to be an expire of some sort. This is a little tricky to get right, especially on systems that don't have an atomic rename. However, it can be done solely by examining the active file and individual overview files.
Technical Details
Message-ID:
<7g87un$eob$1@twwells.com>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:
<7f5p31$vmq$1@news.netmar.com> <19990427104942.033$2b@newsreader.com> <7g5b88$pi$1@twwells.com> <19990428114141.388$tD@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <7g87un$eob$1@twwells.com> Subject: Re: Abandoning uniover - but how? Date: Wed, 28 Apr 1999 00:00:00 +0000 From: bill@twwells.com (T. William Wells) References: <7f5p31$vmq$1@news.netmar.com> <19990427104942.033$2b@newsreader.com> <7g5b88$pi$1@twwells.com> <19990428114141.388$tD@newsreader.com> 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: 472079763 Organization: None, Mt. Laurel, NJ Newsgroups: news.software.nntp