🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #21273

Re: NNRPD resource consumption

#21273
From: Tim Russell
Date: Fri, 05 Sep 1997 00:00
51 lines
2902 bytes
kwl@shell.monmouth.com (Ken Leland) writes:

>I initially thought I had dedicated (T1) customer(s) doing a job on me,
>but it wasn't the case. These nnrpd cpu eaters are normal 33.6 dialups,
>and they are usually in XOVER. 

>Will definitely put this solution in my bag of tricks for the next
>class of nuisance though.

    On looking through the NNRPD code recently to see just what the hell
was going on, I noticed the following:

      1) Joe User is a news freak.  He checks like every 10 minutes for
         new articles.

      2) Joe fires up an XOVER on a group that has, say, 37,000 articles
         in it.  The XOVER request, however, is only for, say, the last
         four articles, which are new to him.

      3) NNRPD satisfies this request by opening the .overview file, which
         is, say, 8M in size, and proceeding to read through the entire
         file until it gets to the record number it needs, then it spits
         out records.

    So basically, every time someone enters a group with an 8M overview file,
the effect is that of reading through said file locally on the system.
Needless to say, get 30 or so of these going, and you have one seriously
disk-bound system.

    If your expireover keeps blowing off, as mine does, due to lack of memory,
since that program reads the entire damn .overview file it's working on into
a memory database, so much the worse.  More stuff for the NNRPD's to read
through.

    I think that work /really really/ needs to be done on making the .overview
files an actual database rather than just a text file.  That's where the big
huge performance hit is.

    It could help a lot to simply keep another file of 32-bit integers that
point to the start of .overview lines.  That file could be accessed by
lseek()ing to the appropriate integer for the line one wants, and using the
number returned for an lseek() on the .overview file.

--
Tim Russell      System Admin, Probe Technology      email: russell@probe.net
            PGP RSA: C992 109C 6D7F 8D91 062E 817E 00D3 287A
   "The worst censorship is self-censorship, because fear has no limits."
                                               -- Grady Ward

Technical Details
Message-ID: <5upqc7$6tf$1@jake.probe.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
References: <5unqlf$jfa@shell.monmouth.com> <5uo3j0$fah@dfw-ixnews1.ix.netcom.com> <5uphmp$86q$1@flea.best.net> <5upijp$2oi@shell.monmouth.com>

Show Full Headers
Complete Article Headers
Message-ID: <5upqc7$6tf$1@jake.probe.net>
Subject: Re: NNRPD resource consumption
Date: Fri, 05 Sep 1997 00:00:00 +0000
From: russell@probe.net (Tim Russell)
References: <5unqlf$jfa@shell.monmouth.com> <5uo3j0$fah@dfw-ixnews1.ix.netcom.com> <5uphmp$86q$1@flea.best.net> <5upijp$2oi@shell.monmouth.com>
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: 270055161
Distribution: inet
Organization: Probe Technology Internet Services
Newsgroups: news.software.nntp