Thread View: news.software.nntp
2 messages
2 total messages
Started by Christopher Davis
Wed, 15 Jul 1992 03:09
Re: Lines header
Author: Christopher Davis
Date: Wed, 15 Jul 1992 03:09
Date: Wed, 15 Jul 1992 03:09
24 lines
2137 bytes
2137 bytes
[followups to news.software.nntp, since this is really about the nntpd]
Could one of the ``nn solves this problem by making a database of
headers'' folks please send me a copy of MacNN to give to my Mac users?
Thanks.
Oh, and could you also send me an NFS client for the Mac so MacNN can
access the database? I'd appreciate it.
Oh, and how about ISDN so I can actually use it from home now that I
have to suck the database over? Great, great.
I wouldn't mind having the nntpd pull the Lines: header from the nn
database. If I had time, I'd probably add it; it seems like the best
approach overall. (I assume nnmaster calculates the number of lines for
the articles without Lines: headers; am I correct?) But nn alone is not
the solution; not all readers are nn, and not all people will *use* nn,
even if it's available. (Yes, we do have an NFS-exported nn database.)
--
Christopher Davis * ckd@eff.org * System Administrator, EFF * +1 617 864 0665
``The First Amendment is often inconvenient. But that is besides the
point. Inconvenience does not absolve the government of its obligation
to tolerate speech.'' --Justice Anthony Kennedy, in 91-155
Re: Lines header
Author: Eliot Lear
Date: Thu, 16 Jul 1992 00:18
Date: Thu, 16 Jul 1992 00:18
144 lines
7710 bytes
7710 bytes
Please forgive me for posting to this plethora of newsgroups, but I think *my* article is interesting enough for all of them ;-) The following is an article that I posted about two months ago on this very subject. I agree with the poster that this is definitely *not* an NN/Rn battle. It's a cached data issue. There's a pointer to some source that you can play with if you're interested. There's one known bug. If you actually use the code, I'd like to know, so that we can work together to clean it up ;-) There are also some stats associated with the code. From: lear Newsgroups: news.software.nntp,news.software.nn,news.software.b,news.software.readers Subject: How I spent my April (was NNTP, Cnews Batches, etc) C source information at the end of this diatribe. This is not really a C-News flame, honest! This is a reply to some discussion about how C News handles real time processing of articles. That's only one of a series of issues that come up when the bits start flying faster than your disks can move 'em. If you go to disk at all with the article as it arrives, and you do not wait for the article to be committed to the history file and placed in the proper place before acknowledging receipt, performance degrades in an unacceptable manner as the volume of articles increases. Assume C-News is the only thing happening on the spool disk, and assume that /usr/spool/news/in.coming is actually on some other disk. Then the time it takes for relaynews to process articles is the write time to /usr/spool/news + the read time to in.coming, while the time it takes NNTP to write the article to in.coming is the write time to in.coming + network delay. If that former two numbers are greater than the latter, then you fall behind and begin to collect articles in in.coming. If you've got other things happening on /usr/spool/news (like say, for example, readers) this effect is exacerbated. This was the case with one of my large reading machines that had three or four incoming feeds and ~170 simultaneous users during the day (not actually all that much for NNTP normally, but we use a ``stressful'' news reader). In fact keeping in.coming on the same disk may mediate backlog kept on disk because at least the NNTP writes are limited to the availability of /usr/spool/news. If you are using msgidd (useful code by Paul Vixie), pray that you don't receive any garbled articles because you probably WON'T get them again. As load goes up there comes a point when you *won't* catch up, and expiring becomes ``fun''. By the way, I don't think B News would be any better in this situation - other than that other sites would only have to store filenames instead of the articles, and you don't have the msgidd scare. What to do to fix the problem? In my case, since we were disk bound due to massive amounts of news reading activities, I did anything I could to alleviate reader load, but in general do anything to eliminate load on /usr/spool/news (I'm leaving out discussion of /usr/lib/news for simplicity's sake, but there are definitely issues there, too!). Do anything you can to alleviate the reader load, so that there are spare disk cycles. I did this in three ways: [1] Disk stripe. Depending on how you do this you may get anywhere from a 50% to 100% speed up by making /usr/spool/news into two disks. [2] Move whatever load that can be moved off of /usr/spool/news (like out.going, for example). [3] Cache your NNTP. If you have a lot of readers pounding on your machine via XHDR, use a secondary database like NN to reduce the number of file accesses on the disk. In my situation the cost of transferring news was peanuts to everyone banging on their = in RN (or functional equivalent). As far as XHDR is concerned, by modifying and using NN's backend database I changed the number of file accesses from (over simplified slightly) O(New Articles) to O(newsgroups with new articles). I'm not actually doing quite that well because I'm only caching From, Subject, and Lines, and I really ought to be caching References and X-Refs as well. If you use a different secondary database (like vnews2.11's) you can probably reduce file accesses to O(1). With large buffers you may never need to get to disk again (hmm. mmapping, anyone?). It turns out that this may be optimizing into the noise for some configurations, because if the secondary database lives on another disk/controller, those opens are likely free. In addition, if the preferred reader is something that doesn't use XHDR this buys you very little (for example GNUS; if your preferred reader is NN, you don't win because you've already been using the cache). As to the lies, damn lies, and what follows: During the first week of this code's production use, it cut XHDR file opens by a factor of 2.39, and XHDR file opens to the total dropped from roughly 80% to 53%. Since those opens are on another disk, arguably there is effectively no access cost to them. The number of articles read increased 58% and my readership increased by at least 22%. I ought to be able to do better with some simple changes to nntpd. However, right now the disks are not even half utilized so I'm not in a hurry. For anyone with intestinal fortitude who might be interested in the code, it's available from sgigate.sgi.com in a beta form as follows: ~ftp/net-services/nn-nntpd.tar.Z contains a 1.5.11 nntpd with msgidd, XTHREADS, LISTGROUP and the NN caching code. a set of patches to NN. To use it you need to get nntp 1.5.11 and NN 6.4.16. For certain complicated reasons it is not convenient for me to give out all of the source of the code that's not involved. You can run the NNTP code without the NN cache database; it has been modified to generate file open statistics. USE AT YOUR OWN RISK - and don't blame me or SGI if it blows up. This is early code, remember. It's only been tested on SGIs, and will probably require a small number #ifdef/#defines here and there to work on other platforms. Specifically I am aware of a few byte size defines that will almost certainly need to change for some environments. See nntp/server/nn*.h. There is one known bug - ``Re: '' seem to get devoured by the secondary cache. I thought I fixed this in nn/pack_subject.c and nn/db.c, but I'm not so sure. If you fix that or any other bug, I'd love to hear from you. Also note that because I've added a field or two to the NN database, existing NN users need to use a new version of NN. See the README file in the distribution for more information. -- Eliot Lear [lear@sgi.com]
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