Article View: news.software.nntp
Article #5493Re: How to do a better USENET file system
From: Brad Templeton
Date: Sun, 03 Mar 1996 00:00
Date: Sun, 03 Mar 1996 00:00
54 lines
3211 bytes
3211 bytes
Of course, if you are willing to give up per-group expire control, or perhaps willing to accept several "classes" of expire (ie. say 5 different classes -- very short, short, medium, long and extremely long) then you can implement news super-efficiently either on raw disk or the raw filesystem. What you do is just use a circular buffer. Allocate a fixed amount of space for each of the classes of news, and as articles come in, stream them out to the 5 circular buffers. After it loops around, it starts replacing old articles with new ones in the same class. This actually might work efficiently in the regular filesys too, as long as you have contiguous buffer areas, and I will agree that in the real filesys, you could even have the advantage of deciding to shrink or grow a circular buffer file. This makes incoming news blindingly efficient, and actually the feeding becomes pretty good too, particularly if you have fewer than 5 classes or have the different blocks on different spindles. Reading is OK, but not super efficient. It is hard to say if you can optimize for reading these days, since very few people read articles contiguously in newsgroups. Instead you see 100 articles and you pick 5. SO perhaps this is even better than what I proposed. (Note the classes need not be per newsgoup, you could do things like "big articles into the short class", "alt group big articles into the very short class" etc.) Note that the classes are not defined in terms of time, but of space. You say "500mb for articles of class 2" and the expire time is whatever fits in 500mb THe big downside -- cancels do not save disk space, unless you decide to have a "compactor" crunch them out, or decide that single articles will go into slots freed by cancels, at a small cost in efficiency to save the disk space. The downside -- you have to do it *soon* because the new articles get the expire time of the old article, and once a cancelled slot gets too close to the expire line, you don't want to use it again. Probably good to make the "very long" class have a compactor, and use it for articles with long explicit expires, and groups you want to keep a while. Or even have an "infinite" class that is just a big file that grows and grows until it gets a write error, and only starts expiring then, and mails you before that. -- Brad Templeton, publisher, ClariNet Communications Corp. info@clari.net The net's #1 E-Newspaper (1,200,000 paid sbscrbrs.) http://www.clari.net/brad/
Technical Details
Message-ID:
<DnoG2v.67M@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-mailReferences:
<Dn4HrC.KIx@twwells.com> <DnM84I.B9w@clarinet.com> <4h8gvp$ss7@bushwire.mira.net.au> <4h9put$5jd@the-fly.zip.com.au>Show Full Headers
Complete Article Headers
Message-ID: <DnoG2v.67M@clarinet.com> Subject: Re: How to do a better USENET file system Date: Sun, 03 Mar 1996 00:00:00 +0000 From: brad@clarinet.com (Brad Templeton) References: <Dn4HrC.KIx@twwells.com> <DnM84I.B9w@clarinet.com> <4h8gvp$ss7@bushwire.mira.net.au> <4h9put$5jd@the-fly.zip.com.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-mail X-Deja-AN: 141887977 Distribution: inet Organization: ClariNet Communications Corp. Newsgroups: news.software.nntp