🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #18858

Re: The Incredible Expanding History File Problem

#18858
From: Chris Sedore
Date: Mon, 30 Jun 1997 00:00
103 lines
4895 bytes
Most of my comments apply to nntprelay, since that's what we use here,
but...

Joe Greco <jgreco@ns.sol.net> wrote in article
<5p8c49$cjl$1@earth.execpc.com>...
> In news.software.nntp article
<Pine.LNX.3.96.970630125250.2588A-100000@marley.vszbr.cz>,
ag786@yfn.ysu.edu wrote:
[...]
> 
> I haven't held more than 7 days in a long time.
> 
> :A reader site which accepts articles older than the remember time runs a
> :risk of duplicated articles.  In theory, my history file has the
potential
> :of being twice the size it needs to be, if some of my peers barf up
> :week-old stale news that I've seen, but forgotten about.  However, I'm
[...]
>
> What's criminal is if you haven't lowered your "c" parameter from 14.
> Otherwise what you're describing shouldn't happen.

I'm not sure what you're describing that shouldn't happen, but I reject
about 50,000-60,000 articles per day because they are too old (>7 days).  I
remember between 7-9 days (depending on the history expire cycle and the
article volume). 
 
[...]
> :However, as one adds
> :more peers, one needs to do more history text file lookups to verify
that
> :an offered message really is there.  This is what Clayton O'Neill's
> :history cache patch is designed to help, by storing recent entries for
the
> :benefit of well-synchronized peers.
> 
> If history text lookups are a bottleneck for you, my opinion is that
> something's probably wrong.  I've run 20,000 lookups per 300 second
period
> without killing my I/O subsystems here, and that's in production, and
> without Clayton's code, which I haven't had time to play with.

Well, for another datapoint, we have sustained an average of 1385 history
lookups per second over a 1000 second period (on your scale of 300 seconds
it would be 124650) at the same time it was offering about 500/sec
outgoing, and accepting about 60 per second incoming.  This on a 192MB
Pentium Pro 200 with a 3 disk stripe for history (3 older DEC RZ28s--2GB
5400rpm).  I mention this mostly to point out that there isn't necessarily
a bottleneck in using the articleid as we do full articleid based checks,
rather than using MD5 or similar.  We ran out of network, our we could have
done better.

Our history format is binary rather than text, and we use a simple hash
based index scheme, the index pointing to reversed linked "buckets" through
the history file.  Expiration happens by "sliding" the history data down
(essentially copying the data from about 60 megs into the file back to
offset 0 and reusing the space at the end).  Pointers in the hash index are
updated while the copy is ongoing.  The records are not fixed length, since
we store the actual article id in the file.

We average about 270 history lookups/sec (measured over a 10 day period),
or about 81,000 over 300 seconds.  The 1000 second average ranges from
about 200 (at night) to around 400 (peak weekday hours).
 
[...]
> :My logs, before I started to run out of space to keep this info, would
> :show around 5 million messages being offered daily, and 10% of them
> :accepted, meaning I'm refusing some 4 million or so messages by virtue
of
> :being in the history cache, or because I dug around in the text file
until
> :I came up with a match.  But what I'd like to know is, on average, for
> :each message I'm offered, with 29 bits recorded in the history.dir file
to
> :play with, how many actual times am I banging on the text file with
false
> :hits?
> 
> That's a value that can be calculated (although when I did so, my "in
real
> life" numbers were somewhat higher than expected, presumably I forgot to
> take some factor into account).
> 
> :Whatever it is, with an 80% busy history disk and a sluggish server,
it's
> :time for me to apply more hackery. 
> 
> Or maybe it's time for you to get a second history disk to stripe with.
> 
> When newsfeeds.sol.net had 1xST31055N for history, I was seeing 10-15ms
per
> history lookup on average.  When I went to 2xST31055N, that dropped to a
> much more reasonable 2ms per history lookup.
> 

How much memory does newsfeeds.sol.net have?  For us, keeping the index
file and the most recent history entries in disk cache is crucial.  Both
are memory mapped files.

-Chris

Technical Details
Message-ID: <01bc8583$22940ff0$2168e680@blaze>
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: <Pine.LNX.3.96.970630125250.2588A-100000@marley.vszbr.cz> <5p8c49$cjl$1@earth.execpc.com>

Show Full Headers
Complete Article Headers
Message-ID: <01bc8583$22940ff0$2168e680@blaze>
Subject: Re: The Incredible Expanding History File Problem
Date: Mon, 30 Jun 1997 00:00:00 +0000
From: "Chris Sedore" <cmsedore@maxwell.syr.edu>
References: <Pine.LNX.3.96.970630125250.2588A-100000@marley.vszbr.cz> <5p8c49$cjl$1@earth.execpc.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: 253667276
Newsgroups: news.software.nntp