🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #15000

Re: NEWNEWS Command

#15000
From: Terry Kennedy
Date: Wed, 12 Feb 1997 00:00
52 lines
3604 bytes
Simon Burr <simes@bpfh.net> writes:
> This is true, however this is generally *not* the resource hungry part of using
> NEWNEWS to get new articles. The reader program in INN, nnrpd, uses a binary
> search to find the start of the articles that should even be looked at for
> return to the client. From that point each entry in the history database is
> checked to see if it matches the request the user made in the NEWNEWS command.
> This is quite efficently written. The problem is that the list of articles which
> match the request the client made is returned as a list of Message-IDs. Thus
> the client has to request each article by its Message-ID. It is this part that
> is expensive as nnrpd has to look in the history database to turn the given
> Message-ID into the article's location on the spool.

  I use C News + the reference NNTP plus a bunch of local enhancements, so I'm
not entirely conversant with INN. However, in my environment an ARTICLE command
that specifies a Message-ID returns the article in milliseconds. I assume that
it's using the ID's hash to look in the history file and pull out the path and
item number. I'd be *very* surprised if INN didn't do something similar - if it
didn't, IHAVE and CHECK commands would take *forever*.

> It is interesting to note that at least one suck-style program which doesn't
> use NEWNEWS to get the articles required (AFAIR it used the overview database to
> get the Message-IDs of the articles in each group), but still got the articles
> by Message-ID. Since it is the getting of articles by Message-ID that actually
> hurts the news server, clients which do this are just as bad as clients that
> make use of NEWNEWS.

  I have a customer system pulling a full feed via one of these things, and the
NNTP process is using about 1MB of memory:

USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED       TIME COMMAND
news     12372  0.0  0.9  1420 1132  ??  S     7:31AM    0:01.47 -hostname ARTICLE

  And this is without shared-anything...

> > While the
> > news server is searching this file for you, it isn't doing any work for other
> > users.
>
> This is not the case. Multiple nnrpds can run searches on the history database
> at the same time. Considering that news servers frequently run 300+
> simultaneous readers it would be a *real* problem if this was the case.

  Let me expand on this a bit. If the nntpd is reading the history database
full-tilt, there's less I/O capacity for other accesses of the history data-
base, as well (if history is on the same disk as articles) as articles.

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)

Technical Details
Message-ID: <E5Hq41.4M2@spcuna.spc.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-mail
References: <5doh1j$en4$1@jair.pressenter.com> <E5GFKo.Goz@spcuna.spc.edu> <33019E95.4B85@bpfh.net>

Show Full Headers
Complete Article Headers
Message-ID: <E5Hq41.4M2@spcuna.spc.edu>
Subject: Re: NEWNEWS Command
Date: Wed, 12 Feb 1997 00:00:00 +0000
From: Terry Kennedy <terry@spcuna.spc.edu>
References: <5doh1j$en4$1@jair.pressenter.com> <E5GFKo.Goz@spcuna.spc.edu> <33019E95.4B85@bpfh.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: 218248143
Distribution: inet
X-Nntp-Posting-Host: spcuna.spc.edu
Sender: news@spcuna.spc.edu (USENET News)
X-Nntp-Posting-User: terry
Content-Type: text/plain; charset=US-ASCII
X-Trace: 855751536/5636
Organization: St. Peter's College, US
Mime-Version: 1.0
Newsgroups: news.software.nntp