Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!kth!sunic!dkuug!tidk!storm From: storm@texas.dk (Kim F. Storm) Newsgroups: news.software.b Subject: Re: Cnews active min field AND nn database expire Message-ID: <357@texas.dk> Date: 5 Jul 89 17:57:41 GMT References: <1989Jun25.174800.13276@utzoo.uucp> <10931@ibmpcug.UUCP> <352@texas.dk> <37422@sgi.SGI.COM> Organization: Texas Instruments, Denmark Lines: 53 In article <37422@sgi.SGI.COM> vjs@rhyolite.wpd.sgi.com (Vernon Schryver) writes: >Reading the spool tree directly may be fine if it is small. It is a >dangerous idea if the tree is big. Suppose an rn user starts reading a group he has never read before, and (with Cnews) the active file says that article numbers in that group range from 0 to 45000. Any news reader just relying on the active file will start asking for articles 1, 2, 3, 4, 5, ... to 45000, i.e. it will issue 45000 stat or open calls. And just to find out that the only existing articles are in the range 44950 to 45000. If the news reader had read the directory first, it would have found that it only contained the files 44950, 44951, ... 45000, and could restrict itself to open just those files. Even when the active file contains a 'valid' min article value (!Cnews), it may still be better to read the directory before accessing the articles. Suppose that the `min' article is an old article with a very long expiration date, you can have the following actual directory contents: 500, 44999, 45000 (three files). And the news reader would still do ~45000 stat/open calls. BTW, nn is different: In all cases, only the nnmaster program maintaining the nn database will have to access the news spool directories to see which articles are really there. The nn news reader gets the `result' of these efforts, and never tries to access a file that is not in the spool directory (unless it has been expired or cancelled without notifying the nnmaster). >Most people here nfs mount /usr/lib/new >and /usr/spool/news, and execute readers in the former. This works >fine, except when several people decide to `find /`, or as has happened >recently, tell nn to do whatever it does to initialize itself. But that does not happen every day!? Once nn has initialized its database, the network traffic related to news reading will be much lower than with other news readers, because only the selected articles needs to be accessed from the news server. >Whether >measured in ethernet traffic, load on bridges and routers, load on the NFS >server, or latency for everyone else, the results are not pretty. What about moving nn's database to the machine containing the news files? Then nnmaster would not have to go via the network to access the articles, and all nn users could then share the nn database via NFS? Of course this puts a bit more load on the net when reading news, but it will still be a lot less than with ordinary news readers. -- Kim F. Storm storm@texas.dk Tel +45 429 174 00 Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark No news is good news, but nn is better!