🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #543

netnews storage representation

#543
From: Paul A Vixie
Date: Tue, 12 Jun 1990 22:33
105 lines
5660 bytes
1. Out of Inodes

I'm running up against a new kind of wall in netnews, namely the 4.2bsd FFS
bug wherein you can't have fewer than 16 cylinders in a group and you can't
have more than 2048 inodes in a cylgroup.  This means that on a DEC RZ57,
my bytes:inode is approximately 4K, and that even though I've got 1.0GB of
user-writable data blocks available, I have only ~230K inodes.  I'm working
with the Ultrix people to see about getting the 4.3-tahoe FFFS (fixed fast
file system) which will allow more than 2048 inodes/cylgroup, but that's
going to take a while since it's not exactly a backward-compatible fix.

The reason this is important is because in the traditional netnews storage
scheme, each article is stored in a separate file, thus consuming an inode.
Article #231 of alt.sex.bestiality, for example, is stored in a file called
(usually) /usr/spool/news/alt/sex/bestiality/231.  Cross-posted articles,
one of Netnews' strongest architectural features, are handled by creating
multiple hard links --an article can show up in more than one newsgroup
because it has namelinks in more than one subdirectory of /usr/spool/news.

2. Archival

One of the requests I see fairly frequently from my users is for archival.
The complain that Netnews isn't as good as VAXnotes, because in Netnews,
articles are expired after a while.  This seems so natural to me and so
foreign to them.  VAXnotes live forever, which is fairly easy because each
notesfile is permanently stored on its own host.  Thus we can keep terabytes
of old VAXnotes around since each host only has to store a small part of it,
and most hosts don't store any of it at all.

Obviously there are a lot of groups we wouldn't want to keep at all, though
keeping the headers of such articles would be useful for measurement purposes.

One option denied to me from the outset is to simply never expire netnews.
I would run out of inodes first, but ultimately I would run out of blocks,
since netnews cannot span file systems (because of the way cross-posted
articles are handled).  1.0GB is currently enough for about 50..75 days of
netnews.  This doesn't constitute an "archive" by anyone's standards.  In
particular the VAXnotes people often refer back to multi-year-old notes.

Another option is to use the "archive" option present in most versions of
the netnews "expire" utility.  This beats not expiring at all, since the
inodes of /usr/spool/news are freed up for future articles.  With some
cleverness, one could even arrange to fill up spindle after disk spindle
with archived articles, meaning that you could keep online as many articles
as you wanted to buy disk drives for.

3. Fragments

Quite a bit of space is wasted in the tail ends of partially-full blocks.
Given a fragment size of 512 bytes, this wastage will probably average
256 bytes, or 1K per each four articles.  100K articles would waste 25MB
of space.

4. Notes

Notes has a different representation than netnews, which is one of the
reasons it can't cross-post effectively and therefore one of the reasons
Netnews people tend to dislike it.  Notes maintains a "notesfile" (think:
"newsgroup" here) in one or more flat files that contain pointers into
eachother.  There's no wastage of partial blocks since there are no partial
blocks -- new articles are appended (more or less) directly to the end of
the representation file(s).

More recent versions of notes, in particular HP Notes, have some support for 
cross-posting.  This is done by storing out-of-group pointers in each group
after the first one on the "Newsgroups:" line.  When a notesreader sees
a pointer of this kind it knows to go fetch the article text from some other
notesfile, rather than just reading the text of the note from the current
notesfile.

5. The NNTPD barrier

Most of my users now use NNTP to read their news.  Various holdouts are
being retrained and given new tools, such that shortly, 100% of my readers
will use NNTP to read news here.

This gives me a wonderful opportunity to try other representations for
netnews.  As long as I teach nntpd how to read articles from any new
representation I come up with, I am free to choose any representation that
works.  Obviously the netnews transport (C News, in my case) will have to
be retrained as well.

6. Possibilities

One of the possibilities I'm thinking about is the current HP Notes
mechanism.  It has several advantages:

	-> doesn't need a lot of inodes (one or a few per group,
	   rather than one per article)

	-> doesn't waste space on partial blocks

	-> doesn't care about file system boundaries

It isn't as elegant about cross-posted articles, but if these can be
made to work then the inelegance will not break my heart.

7. Comments

Any?
--
Paul Vixie
DEC Western Research Lab	<vixie@wrl.dec.com>
Palo Alto, California		...!decwrl!vixie
Technical Details
Message-ID: <VIXIE.90Jun12153343@volition.pa.dec.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.notes.mbox.zip!gmdzi!unido!mcsun!uunet!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!bacchus.pa.dec.com!vixie

Show Full Headers
Complete Article Headers
Message-ID: <VIXIE.90Jun12153343@volition.pa.dec.com>
Subject: netnews storage representation
Date: Tue, 12 Jun 1990 22:33:43 +0000
From: vixie@decwrl.dec.com (Paul A Vixie)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.notes.mbox.zip!gmdzi!unido!mcsun!uunet!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!bacchus.pa.dec.com!vixie
Newsgroups: news.software.b,news.software.notes,news.software.nntp
Sender: news@wrl.dec.com (News)
Organization: DEC Western Research Lab
Lines: 104
Posted: Tue Jun 12 23:33:43 1990