🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
3 messages
3 total messages Started by Michael Regoli Sat, 07 Jul 1990 05:18
Nnadmin Expire Predicament
#679
Author: Michael Regoli
Date: Sat, 07 Jul 1990 05:18
62 lines
2591 bytes
][

Check this out.  This is the expire transaction report in nn's log.

NN's expire process is begun (via cron) every day at 3a ("nnadmin
=EYW").  This is one hour *after* "expire" is run ("expire -i -I -v -e
20") at 2a.  (Inews then unspools the articles ("inews -U") when
expire is finished.)

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

X: Jun 26 05:34 (M): Expire: 882 art, 198 gr, 9248 s
X: Jun 27 05:45 (M): Expire: 1515 art, 307 gr, 9912 s
X: Jun 28 05:56 (M): Expire: 1658 art, 312 gr, 10558 s
X: Jun 29 06:13 (M): Expire: 2085 art, 288 gr, 11561 s
X: Jun 30 06:50 (M): Expire: 1643 art, 286 gr, 13780 s
X: Jul  1 06:55 (M): Expire: 1156 art, 226 gr, 14139 s
X: Jul  2 06:38 (M): Expire: 1654 art, 270 gr, 13110 s
X: Jul  3 06:54 (M): Expire: 2024 art, 309 gr, 14027 s
X: Jul  4 06:59 (M): Expire: 2595 art, 333 gr, 14326 s
X: Jul  5 07:02 (M): Expire: 2672 art, 335 gr, 14513 s
X: Jul  6 07:31 (M): Expire: 3101 art, 352 gr, 16258 s

At this rate, it won't be long before nn spends all day expiring the
news database!

What's going on here?  Are we overlooking something?  

FYI:  We're running version 6.4.6.  Here's the configuration:

Master:
   initialized:   Jun 25 13:44
   last_scan:     Jul  7 00:07
   last_size:     20905
   no of groups:  715

   Articles:   84548
   Disk usage: 7825 k

Configuration:

BIN:  /usr/local/bin
LIB:  /usr/local/lib/nn
NEWS SPOOL: /usr/spool/news
NEWS LIB: /usr/lib/news
DB:   /usr/spool/nn  /usr/spool/nn/DATA
ACTIVE: /usr/spool/nn/ACTIVE
NNTP ACTIVE. server=cica.cica.indiana.edu
Database is machine independent (network format).
Database version: 2
Recording usage statistics
Mail delivery program: /usr/lib/sendmail -t
Query for appending .signature ENABLED
Max pathname length is 255 bytes

--
michael regoli
mr@cica.indiana.edu 
regoli@iubacs.bitnet
..rutgers!iuvax!cica!mr
Re: Nnadmin Expire Predicament
#701
Author: Jaap Vermeulen
Date: Tue, 10 Jul 1990 16:34
14 lines
1216 bytes
mr@cica.cica.indiana.edu (Michael Regoli) writes:

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

No NFS links or anything the like?

	-Jaap-
-- 
"This is a joke"				+--------------------------+
						| Sequent Computer Systems |
	Internet : jaap@sqnt.com		| Beaverton, Oregon	   |
	Uucp	 : ...uunet!sequent!jaap	+--------------------------+
Re: Nnadmin Expire Predicament
#709
Author: 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!
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