🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #2050

SUMMARY: slow processing of backlogged news

#2050
From: Ralph Waters
Date: Wed, 21 Jul 1993 19:10
83 lines
4941 bytes
A long time (two weeks) ago, I asked about my newsrun falling behind.
Sorry for a slow summary, but my real job (the one that I get paid for)
has been more critical than the news and system admin job (the one that
I don't get paid for).  So, when I found a little spare time, I tried
out the fixes, and when I found more spare time, this summary gets posted.

I received several answers, a couple of which fixed the problem.

I received a caution about using the -f flag to ls not being portable.  I
suspected that it wasn't portable, but that was just me trying to treat
the symptoms of the problem on my system, not a recommendation to include
it anywhere else.

I also received several recommendations to upgrade to INN.  I have
been thinking about that for a while now, but don't want to get into
anything new until I have more time to devote to the news administration
task.

The problem turned out to be a misconfiguration of the nntp software.
The two novice news admins who set this up (I'm one of them) didn't read
the documentation enough, and missed the common/conf.h configuration
for BATCHED_INPUT, TOO_MANY, TOO_BIG.  Specifically, I had to #define
BATCHED_INPUT.

Without BATCHED_INPUT defined, nntpd wrote one file per incoming
article.  Not a desirable solution to processing news!

Fixing the omission and re-installing the nntpd server fixed it.

Thanks to:
Doug Sewell <doug@cc.ysu.edu>
Christopher Davis <ckd@eff.org>
jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre)
Eirik Fuller <eirik@elf.Ithaca.NY.US>
aad@siemens.siemens.com (Anthony A. Datri)
Peter Wemm <peter@DIALix.oz.au>
Francis Bell <fgtbell@kingston.ac.uk>
linus@lysator.liu.se
"Ryan Harvey" <HARVEY@vax.cns.muskingum.edu>
bochner@das.harvard.edu (Harry Bochner)
dhesi@rahul.net (Rahul Dhesi)
bruce@blilly.uucp (Bruce Lilly)
jsr@dexter.mi.org (Jay S. Rouman)

Original question follows:
>I keep having problems with my news server falling behind.  Whenever the
>incoming news feeds go down for any length of time (either due to the
>news server being down or the network connection being down), the server
>starts falling farther and farther behind. If the incoming feeds are cut
>off for too long, the server does not catch up without human
>intervention.
>
>I have the Performance release of C news, nntp 1.5.11 with the msgidd
>patch, and three nntp feeds.  Its running on a Sparc II with SunOS
>4.1.3, 64MB RAM, and plenty of swap space.  Currently there is about
>600MB for the news spool, with /usr/lib/news on a separate partition.
>Neither partition is full.
>
>I have looked into the problem, and determined that the cause of the
>slow processing of incoming news is the /usr/lib/newsbin/input/newsrun
>script.  What that script does that causes problems is an 'ls' of the
>/usr/spool/news/in.coming directory.
>
>When the server comes up after having been down for a couple of hours,
>my news feeds start sending me all of the back-logged news.  This fills
>up the in.coming directory much faster than the server can process it.
>After a while, the 'ls' starts taking a lot of time (with ~1000
>articles, it takes 5-10 seconds).  This causes the newsrun script to
>take more time finding out which articles to process than the actual
>processing, and much more time than the nntp receipt of the articles.
>
>I have changed several things in the newsrun script to try to make it
>run faster.  The default processing of 50 articles then wait 45 seconds
>seemed like a good place to start.  I have increased the number of
>articles processed each loop iteration.  I have decreased the time
>newsrun sleeps between batches.  And, I replaced the 'ls | sort' with a
>'ls -f | sort' so the list of files doesn't get sorted twice.  All of
>these help, but don't eliminate the problem.
--
Ralph Waters                | Internet: rwaters@jabba.ess.harris.com
Harris Corp, ISD            |   "The sooner you fall behind,
Melbourne, Florida          |    the longer you have to catch up"
Technical Details
Message-ID: <CAJ3xz.3BC@jabba.ess.harris.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.admin.misc.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!darwin.sura.net!jabba.ess.harris.com!wizard!rwaters
References: <C9wr4C.EvJ@jabba.ess.harris.com>

Show Full Headers
Complete Article Headers
Message-ID: <CAJ3xz.3BC@jabba.ess.harris.com>
Subject: SUMMARY: slow processing of backlogged news
Date: Wed, 21 Jul 1993 19:10:45 GMT
From: rwaters@wizard.ess.harris.com (Ralph Waters)
References: <C9wr4C.EvJ@jabba.ess.harris.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.admin.misc.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!darwin.sura.net!jabba.ess.harris.com!wizard!rwaters
Newsgroups: news.software.b,news.software.nntp,news.admin.misc
Followup-To: news.software.b
Keywords: C News, nntp, performance
Sender: usenet@jabba.ess.harris.com (Usenet News Feed)
Nntp-Posting-Host: wizard
Reply-To: rwaters@jabba.ess.harris.com
Organization: Harris Corporation - ISD
Lines: 82