🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #709

Re: Nnadmin Expire Predicament

#709
From: Kim F. Storm
Date: Wed, 11 Jul 1990 11:07
61 lines
3161 bytes
mr@cica.cica.indiana.edu (Michael Regoli) writes:

>Notice how long it is taking to expire the database (currently at
>84,548 articles/7.825Mb):

You have to know a few things about how expire works:

If nnmaster runs on a system with the news spool files on a local file system,
then it will simply check each of the spool directories to see which articles
are still available and remove expired articles from its database (doing a
one pass read/rewrite on each database file).  This should take a reasonable
short time, say 10 minutes for every 50000 articles.

However, if you access news via nntp, nnmaster cannot just go to the news
spool directory and see which article numbers are stored there.  It has to
call the nntp server and get it to deliver a list of the existing articles.
Unfortunately, the current NNTP protocol does not allow you to do this
in an efficient manner.  In the worst case, the only way you can run
expire via nntp is to recollect all articles, but often the nntp server
will recognize an XHDR request where you can ask it to send the contents
of a header field for each article in a group.

So nnmaster uses XHDR to get a list of article NUMBERS, but what the nntp
server is really building and sending is a list of (in this case) Message-IDs
(with the article number attached).  And to do that, the nntp server will
OPEN EVERY ARTICLE IN THE GROUP.  And when you expire all groups, it will
open ALL 87000 ARTICLES on the server.

I can imagine that will take some time to do...


Now, what can be done about it?

Before relying on the XHDR request, nnmaster will issue a LISTGROUP
request to the nntp server, and *if* the server would recognize that,
it would just have to return the article numbers in the group - which
it can quickly find using opendir/readdir/closedir.  And the article
numbers don't even have to be sorted; nnmaster will do that.

So the solution is to make your nntp server recognize
	LISTGROUP group.name.here
and return:
	211 (OK_GROUP) list of article numbers follows
	4428
	4283
	4335
	etc.
	.

The only requirement is that only numerical entries in the group directory
are returned (i.e. subgroup directories are ignored).
Maybe the code from get_article_list in expire.c can be reused.

I'm actually planning to make the required changes to nntp 1.5.8 this
week, but given the hazzle with patch #7, I don't know whether I'll have
the time this week.


-- 
Kim F. Storm  <storm@texas.dk>		No news is good news,
Texas Instruments A/S, Denmark		  but nn is better!
Technical Details
Message-ID: <621@texas.dk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!tidk!storm
References: <mr.647327887@cica>

Show Full Headers
Complete Article Headers
Message-ID: <621@texas.dk>
Subject: Re: Nnadmin Expire Predicament
Date: Wed, 11 Jul 1990 11:07:15 +0000
From: storm@texas.dk (Kim F. Storm)
References: <mr.647327887@cica>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!sunic!dkuug!tidk!storm
Newsgroups: news.software.nn
Distribution: news
Organization: Texas Instruments, Denmark
Lines: 61
Posted: Wed Jul 11 12:07:15 1990