Article View: news.software.nntp
Article #6395Re: cyclic news file system - two interesting quirks
From: Mark Delany
Date: Mon, 08 Apr 1996 00:00
Date: Mon, 08 Apr 1996 00:00
107 lines
5130 bytes
5130 bytes
brad@clarinet.com (Brad Templeton) writes:
>Actually, my own plans had never thought of putting the overview data
>in with the articles. As you note, there are problems doing that.
>I felt maintaining the overview data in some other way (its own private
>spools or set of cyclic files for example) might make some sense. Overview
>data is much smaller, and it's more important that it be kept contiguous
>for any given newsgroup -- in fact I would say it is fairly vital, as
>you expect newsreaders to make the most heavy use of overview data.
Yup. A separate spool suffers similar problems in that they are
separate spaces you have to manage and try and size proportionally to
each other. It also means potential more head movement unless you keep
all of the overview on separate disks from the articles.
A sortof cute idea that I eventually discarded was this:
.----------------------------------------------------.
| Article data Overview Data |
|A1 A2 A3 B1 B2 A4-> <- A4 B2 B1 A3 A2 A1|
| |
.----------------------------------------------------.
When the two ends meet, both ends wrap. It sizes the two ends
perfectly, but all that head movement was a worry as, at some point
the two edges have to converge on one disk and the head will rattle
from one end to the other while that disk fills.
>(I would change the poorly designed overview format while at it, however.)
At the cyclic library boundary the contents of NOV and article are
unknown (the idea being of course to ultimately bolt it into the
bottom of innd which has already done all the hard work to parse the
article and prepare the NOV data). Here's what the user-supplied
pseudo-C might look like:
stash_article(iov, nov, ngcount, ngroups)
IOVEC iov[iovcount]; /* Holds article */
char nov[novlen];
int gcount;
char **grps;
{
OPAQUE_ARTICLE_KEY ARTKEY;
long gnum;
OPAQUE_GROUP_KEY GRPKEY;
cycle_art_write(mfs, iov, iovcount, &ARTKEY); /* Write article */
HISsetkey(messageid, &ARTKEY); /* record the pseudo filename */
/* Stash the NOV entries in each group */
for (i= 0; i < gcount; i++) {
gnum = cycle_grp_write(mfs, grps[i], nov, novlen, &ARTKEY, &GRPKEY);
active_stash_latest(ngroups[i], gnum, &GRPKEY);
};
There's a bit of handwaving missing wrt "xref:" entries and
pre-allocation of article numbers within group, but I've left that out
for clarity.
You might note that the active file is given an additional field which
is the pointer to the last NOV entry for that group. That's quite a
significant increase in active file size btw (my active goes up by
about 30% and history goes down by about 10%). I reckon the active
file lends itself to a modified form of cycling as well, but that's
another story entirely.
>Entirely contiguous overviews would be nice but do cost a bit of efficiency
>at write time. But they do make it up on read. But you can compromise
>and just use a very large block size for overviews.
Unless you can fit all of the NOV entries for a given group into a
single large contiguous block then any other arrangement will
ultimately see them dispersed randomly across the NOV disk(s). What
the sequential writing helps encourage is a single head sweep across
the disk(s). In the more-than-one-block scenario, I'm not sure how
much difference it makes whether the blocks are 4K, 8K, 16K etc. The
total data read is about the same, the total head movement is about
the same, the only difference is the number of stops along the way.
Furthermore, depending on how much pointer information you retain into
the current NOV block, you may end up doing large reads to slurp in
the NOV block just to stash a single NOV entry. That strikes me as
self defeating since every inbound article requires at least one NOV
entry.
>Low article numbers are not much problem, really. Right now they only
>get calculated once a day. You could change this to a program that just
>reads the overview files and pulls out the minimum article number.
That's what I meant in another post by a cyclic re-number, still way
too much NOV I/O for my liking. The other point is that the articles
only disappear once a day now so the once-per-day calculation is
exactly right for the whole day. With a cyclic system articles
disappear by the minute so lownums get out of date by the minute.
Regards.
Technical Details
Message-ID:
<4k8iaj$neb@bushwire.mira.net.au>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-mailReferences:
<4k78u1$lbu@bushwire.mira.net.au> <DpHn52.GDv@clarinet.com>Show Full Headers
Complete Article Headers
Message-ID: <4k8iaj$neb@bushwire.mira.net.au> Subject: Re: cyclic news file system - two interesting quirks Date: Mon, 08 Apr 1996 00:00:00 +0000 From: Mark Delany <markd@mira.net.au> References: <4k78u1$lbu@bushwire.mira.net.au> <DpHn52.GDv@clarinet.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: 146230324 Organization: Werple Internet, Melbourne Newsgroups: news.software.nntp