Article View: news.software.nntp
Article #21774Re: News data storage model
From: bill davidsen
Date: Mon, 22 Sep 1997 00:00
Date: Mon, 22 Sep 1997 00:00
55 lines
3370 bytes
3370 bytes
In article <603943$rc2$1@bigred.inka.de>,
Olaf Titz <olaf@bigred.inka.de> wrote:
| May well be, given the particular inefficiencies of the Un*x directory
| system. (Just yesterday I had to eliminate a control.cancel directory
| which had grown to >300,000 files. :-()
May I recommend running prune from time to time (like hourly) to fix
that...
| Now the fine print: on all files, implement clean locking mechanisms
| so that concurrent write access on all of them is possible. I really
| like the idea that expire should be a continuously running daemon
| which always just deletes the oldest files in a set of newsgroups,
| until enough space is free. (**) I also like the idea that this daemon
| would be able to clean up overview entries (even history too?) along.
| Dito for NoCeM processing.
Delete the oldest *really* doesn't work! You want to be able to
retain by group. To this end you can do expire at the time the
article is received, and put it in a file which will be deleted at
date D. If space gets tight you can always creep up on the date. You
really need a way to handle minimum retension, though, so that
things like a FAQ don't expire prematurely.
I would love to get rid of the current overlap in overview files,
with an entry in every group of a cross post. I just haven't been
able to make something else run as fast in all cases. There are lots
of people who are really good at database stuff, who might be able
to meet all goals of (a) small, (b) fast in real time, and (c) low
use of CPU overall. I get at most two of three.
| (*) A minimalistic approach to a better article storage on the Un*x
| filesystem: take a hash from the Message-ID as file name. Simply run
| an MD5 on it, encode that in hex or base64, split the string at regular
| intervals with slashes so directories don't get to full.
I don't think you want to use a directory system at all for maximum
speed. On a loaded server I see file open rates of ~300/sec, which
is undesirable to say the least. Putting multiple articles in a
single group can help that.
Since you can have cross posting, you need two improved data
structures, an article structure which can hold multiple articles in
a single file, and a directory structure which can point to an
article within a file. This becomes an interesting tradeoff between
space and performance.
--
bill davidsen <davidsen@tmr.com>
Carolyn replied, "But I'm not that silly girl you roomed with for four
years anymore! I've cleaned up my act! I've given up hallucinogenic
drugs, and only have sex with vertebrate mammals."
Technical Details
Message-ID:
<6062ll$2m0a$1@newssvr03-int.news.prodigy.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-mailReferences:
<5vpddn$qlb$1@news5.ais.net> <5vtibt$7i4$1@bigred.inka.de> <5vua1g$vb8$1@newssvr03-int.news.prodigy.com> <603943$rc2$1@bigred.inka.de>Show Full Headers
Complete Article Headers
Message-ID: <6062ll$2m0a$1@newssvr03-int.news.prodigy.com> Subject: Re: News data storage model Date: Mon, 22 Sep 1997 00:00:00 +0000 From: davidsen@tmr.com (bill davidsen) References: <5vpddn$qlb$1@news5.ais.net> <5vtibt$7i4$1@bigred.inka.de> <5vua1g$vb8$1@newssvr03-int.news.prodigy.com> <603943$rc2$1@bigred.inka.de> 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: 274639556 Keywords: filesystem optimization Originator: davidsen@darkstar.prodigy.com Organization: TMR Associates, Schenectady NY Newsgroups: news.software.nntp