🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #37116

Re: Abandoning uniover - but how?

#37116
From: Curt Welch
Date: Wed, 28 Apr 1999 00:00
170 lines
9428 bytes
bill@twwells.com (T. William Wells) wrote:
> In article <19990427104942.033$2b@newsreader.com>,
> Curt Welch <curt@kcwc.com> wrote:
> : bill@twwells.com (T. William Wells) wrote:
> : > In article <7fa7l0$pbv@bigred.inka.de>, Olaf Titz
> : > <olaf@bigred.inka.de> wrote:
> : > : There is actually a good reason for unified overview. Look at what
> : > : happens with traditional overview in crosspostings to N groups: the
> : > : overview record has to be appended to N overview files. This hurts
> : > : both performance and disk space.
> : >
> : > This saves 20% in the writing of overview entries, if that.
> :
> : I bet it does a hell of a lot more than that.
>
> The referent of "this" is the purported saving in avoiding dealing
> with cross-posting, not the savings of the entire method.

Yeah, I realized the weakness in that point.  I commented on the
cross posting issue and then talked about the other issues.  You
got me there...

I guess I started the reply because it seems to me that the cross
posting would actualy cause more of a problem than 20%.

Digging for some numbers, I find in my current spool, I have 10.7 million
unique articles posted 16.3 million times.  So for that mix, it's a 52%
problem.  But I have different retention times for different articles, so
it's hard to know from that what the true avg cross posting for a day
is.  Maybe 20% is right?  But it still seems low to me.

Control messages which only get cross-posted to a single group are retained
for a much shorter period - so that would make my 52% number too high (but
my control.cancel does contain 688K articles right now which are included
in that 52% number).  And binary postings - which tend to contain lots of
cross-posted messages are also retained for shorter periods so that would
make my 52% number low.

> : With the 2.x design, most
> : overview appends will end up wirting to a disk block which is already
> : cached in memory (because of the small number of overview files being
> : written to).
>
> The 1.x design and the 2.x design *do not* differ in this respect.
> In the 1.x design, overview records are directly written to random
> overview files. In the 2.x design, overview records are written to
> a small number of files -- and the *index* records are written to
> files which are organized just as the 1.x files were. The net
> result is the same number of files being handled *plus* an
> additional file or so for the overview data.

Well, you are right.  I didn't think about that.  So 2.x has to actualy
deal with more file updates.

But, I'm assuming the index records are very small compared to an avg
overview record.  I wonder which design ends up writing more data?
How big are the index records?  2.x has to write the extra index records
for each cross posted article but it saves space by only writing the single
overview record.  Even with the extra files to deal with, 2.x could still
be a performance win (on writing) if there is enough cross posting going
on.

The other big problem for me with 2.x was that it wasn't updating the
overview to reflect canceled articles.  Canceled articles still showed
up in the overview data.  Has that been fixed yet?

> And as a matter of cold fact, the 2.x overview method is quite as
> capable of falling behind as the 1.x overview method. I saw my
> share of overchan! entries in my spool directory....

I saw that to.  But with 2.x it was happening while the server was
receiving 60 articles per second and with 1.7.2 it happened when the
server was receiving about 20 articles per second.  But like you said
below, that's could simply be caused by CNFS than with the overview issues.

> : But when you start to write overview records to a different file for
> : each group - you force the system to open, append, and close every
> : overview file for every write.
>
> As I said, the 2.x method does this anyway. It just does it with
> the index records instead of the overview data.

Can't argue with you there...

> : However, I (like others) must have good overview read response times.
> : So the new system - even though it really flys when receiving news,
> : just isn't workable.
>
> The new system flies because of CNFS, not because of the overview
> changes.

For sure.  CNFS is the big win.

> : In answering the original questions - I have no idea what it takes to
> : "fix" inn 2.x.  Your best bet is probably to just run the old inn -
> : unless you are willing to take the time to fix 2.x yourself.
>
> The latter is not practicable -- 1.x is simply not capable of
> handling modern feed volumes on anything I'd consider reasonable
> hardware.

I too had the same feelings.  I just didn't want to spend my hardware
dollars on a system to support 1.x when there were options to make
it run so much faster with much less hardware. (or to get so much
more performance and lifespan out of the same hardware).

> I personally think that the 1.x overchan, with a few
> modifications like open file caching, and running it from cron

Not sure what you are thinking of when you say running from
cron - but one thing that needs to be dealt with is the issue
of overview information showing up later than the article
shows up.  i.e., if the group command returns a higher article
number, then an overview commands shows no data for the article,
newsreaders consider that to mean the article has been cancled.
And if it happens because the overview data just hasn't been
created yet - then it's a clear bug in my eyes.  So if you are
thinking of a process which does batch creation of overview data
at a later (even if only by a few seconds) time, then the nnrpd
code needs to "hide" that from the user by creating the overview
data on the fly for the few new articles which haven't had their
overivew data updated yet.  Either that or the article counts from
the active file should not be updated until the overview data is
created (which requires to high-water marks in the active file).

> rather than a channel feed, is more than sufficiently efficient.
> OTOH, I can think of several alternative methods, right off the
> top of my head, that have the advantages of the 1.x along with the
> purported advantages of the 2.x method. Heck, maybe after dinner,
> I'll sketch out one or two....

I gave up waiting for the inn guys to fix the overview problem and
just decided to do it myself.  But instead of hacking fixes into inn
I just decided to write my own server from the ground up.  That way
I could fix everything I didn't like about the way inn worked as well
as add in the other features that I needed.  I started on that last
December and the server is running in beta test now.  It really wasn't as
big of a project as I feared it might be.

I'm still working on the overview performance issue.  I currently don't
build and save overview records when I receive news.  I build it on
demand when users read the overview - but that of course is very slow for
large groups.  I cache recently built overview records in memory so
asking for the same overview records again is fast (even for different
users) - and that's something my web interface does a lot of so that's a
big win for my special case.

But to deal with the general issue, my current plan is to save batches
of overview records (about 100 at a time) to disk after they have been
created on demand.  I'm just going to write them to the CNFS-like bufs as
"special" articles.  When a user requests overview data, it will come from
the in-core cache if there, if not, the overview batches are read from the
article buffers if they have been created, if not, then the overview data
is just re-created from the articles (and saved as new batches at the same
time).  Writing it to the article bufs means the data expires on it's own
at a rate which is close to the rate the articles are expiring.  My design
(like Typhoon) requires no external expire (or other clean-up jobs) to be
run.  The server just keeps everying "clean" while it runs.  I really
dislike the idea of having to run all the extera clean-up jobs that inn in
all its forms requires.

I think that solution will give me both the performance I need and be
fairly simple at the same time in terms of how complex the code will
be.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <19990428114141.388$tD@newsreader.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
References: <7f5p31$vmq$1@news.netmar.com> <7fa7l0$pbv@bigred.inka.de> <7fbeg0$6dc$1@twwells.com> <19990427104942.033$2b@newsreader.com> <7g5b88$pi$1@twwells.com>

Show Full Headers
Complete Article Headers
Message-ID: <19990428114141.388$tD@newsreader.com>
Subject: Re: Abandoning uniover - but how?
Date: Wed, 28 Apr 1999 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <7f5p31$vmq$1@news.netmar.com> <7fa7l0$pbv@bigred.inka.de> <7fbeg0$6dc$1@twwells.com> <19990427104942.033$2b@newsreader.com> <7g5b88$pi$1@twwells.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: 471921342
X-User: Curt@NewsReader.Com
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp