🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #19077

Re: Most efficient directory structure for news?

#19077
From: Forrest J. Cavalier III
Date: Tue, 08 Jul 1997 00:00
54 lines
2825 bytes
In article <5pq0fa$rpv@stealth.eng.pyramid.com>, mark@stealth.eng.pyramid.com 
wrote...
>
[snip]
> I actually put an overall hash scheme in for news storage.  Basically,
>we generate a 32 bit hash code from the message id, and store it based
>on that.  the 32 bit is actually overkill, so I am only use 16 of those
>bits for the directorys (xx/xx/article) storage.  This gives 65536
>directories for all the news.
>
> I based the number of directories on the number of articles I generally
>store - on average, there should be less than 100 articles per directory.
>And I certainly don't have the problem with control or misc.jobs having
>a huge number of files in them.
>
[snip]
> Now for the downside:
>
> Recovery of the files is much more difficult - since the articles are not
>stored in any group basis, it is not possible to regen a history or overview
>data from the article spool (history regen I don't consider a big thing,
>since it would probably tape so long, it would be worth restoring it
>from backup tape and just get duplicate news for a day or so.)
>
> renumber also doesn't work as expected.  I actually just renumber the
>low values, and I get those from looking at the history file after an
>expire.  That seems to work OK.  It would be possible in this configuration
>for several articles to have the same message number - I am not sure how
>that is handled, but that should also only be a problem in a system crash.
>

What about the Xref line in the articles?  Or aren't you using it?

Another question: what do your history lines look like?  You say you
can generate lomarks from history entries, implying there is an article
number somewhere there.  But the article itself is stored as a hashed
message ID.

The probability of collision is non-zero.  (1 in 2400 if you assume
32 bit hash, 600K articles x 3 day retention.) This could mean that a
message from alt.binaries.pictures.erotica happens to get stored
over top of something from, say, alt.kids-talk.  Or do you handle the
case by not writing over top of existing articles.

Forrest Cavalier, Mib Software, INN customization and consulting

>-- 
>
>-- Mark Wedel
>mark@pyramid.com


Technical Details
Message-ID: <5pt6cs$l6l$1@news1.epix.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: <5pn3ck$137s$1@node17.cwnet.frontiernet.net> <5pq0fa$rpv@stealth.eng.pyramid.com>

Show Full Headers
Complete Article Headers
Message-ID: <5pt6cs$l6l$1@news1.epix.net>
Subject: Re: Most efficient directory structure for news?
Date: Tue, 08 Jul 1997 00:00:00 +0000
From: mibsoft@epix.net (Forrest J. Cavalier III)
References: <5pn3ck$137s$1@node17.cwnet.frontiernet.net> <5pq0fa$rpv@stealth.eng.pyramid.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: 255473914
Organization: Mib Software
Newsgroups: news.software.nntp