Article View: news.software.nntp
Article #5515Re: How to do a better USENET file system
From: Matus Uhlar
Date: Tue, 05 Mar 1996 00:00
Date: Tue, 05 Mar 1996 00:00
85 lines
5058 bytes
5058 bytes
At Sun, 25 Feb 1996 21:09:13 GMT Brad Templeton (brad@clarinet.com) wrote: -> It's not hard to do a more efficient USENET file system. So make it :) -> You just take chunks of raw disk (block devices). You need a "free" -> list when it starts, but in truth once running there is no free list, just -> a list of the "oldest" (least desired) articles. That's possible, but - why don't you believe in performance of file systems? Most of machines are running fast file systems as they have them compiled in kernel. Do you think they are not optimized for speed ? -> When a new article (or article batch if you want to be real efficient) -> comes in, you scan the list of oldest articles for one near the end that -> is of similar or slightly larger size. You do some blocking to make this -> very likely to be an old article. And you then thwap your new article, -> or batch, down on top of that old article. A single seek and a single -> write call. Then you record the seek address in an overview/header -> database that you are building elsewhere, either on your raw disk or in -> the real filesystem. We telkad about compression for less disk usage and maybe for faster transferring files. Can you handle this ? -> Big articles are the only problem, though there are enough of them that -> this will probably work if you are willing to block big articles to larger -> and larger blocksizes. That wastes an amount of disk, but the disk -> saving of the above scheme (which can probably block articles to within -> 16 bytes) is so immense that a little wastage on the big boys is no problem. Big articles suck ! USENET is not place for warez...if somebody can distribute big files, he should compress them, split them, or put them on FTP. I disabled articles with sizes over 256 kB and I'm currently thinking about changing the limit so 128 or 64 kB. sorry to all, but disks are not enough big for many big files. and Usenet grows up...and it always will. we can not overload our lines/machines with transferring of files which will nobody read. -> Or, you can put big articles in the real filesys, or you can support -> non-contiguous big articles. Not exacty hard, but the above system -> is darn close to trivial. -> No free list. No expire. All the disk always used fully. Old articles -> disappear as new ones come in and over-write them. All articles written -> with a single seek and write, and read with a single seek and read, plus -> occasional block writes to the overview database. (With luck you can -> cache enough of that in ram so you write it out a block at a time or during -> idle periods on your disk at the end of batches. It's ok if you wait a -> few minutes before the article "appears" live. For the outgoing batches -> you don't need the overviews, you just write out a log file with message-ids -> and seek addresses, and let your feeder read that) we need expiration, anyway - dynamic expiration is great. if we get new article, we'll remove old. But not the oldest...we should define priorities for newsgroups...some are more important then others. -> Of course you have to write an NNTPD to read from this, and some debug -> tools to let people poke around articles manually. But you simply can't -> get any more efficient than this without going to some fancy caching. -> (With a fancy cache, you can try to group articles, so that you do only -> one seek and write for groups of articles, and quite possibly, also for -> feeding.) -> You can keep the "oldest" article list as a stream calculated as articles -> come in, or you can write a program that recalcs it at night so that you -> can tune parameters as you wish even after the fact. -> This system can never run out of disk space unless you allow mega-huge -> articles, it is always exactly full, but efficiently so. But. when your system crashes, how would you detect and repair errors ? When you are creating new filesystem, you must carry on many things you don't need to cary on already existing filesystems. good luck. -- Matus Uhlar, sysadm at Regional node of SANET in Kosice, Slovakia E-mail: Matus.Uhlar@tuke.sk WWW: http://www.tuke.sk/users/uhlar IRC: fantomas, uhlar PGP: finger uhlar@ccnews.ke.sanet.sk | pgp ...I'd like to add something cool here, but I don't know what ;-)
Technical Details
Message-ID:
<4hgouv$nkv@ccnews.ke.sanet.sk>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> <4gfi22$evb@news.inc.net> <Dn5KLH.Muy@twwells.com> <DnCo3D.Cz3@clarinet.com>Show Full Headers
Complete Article Headers
Message-ID: <4hgouv$nkv@ccnews.ke.sanet.sk> Subject: Re: How to do a better USENET file system Date: Tue, 05 Mar 1996 00:00:00 +0000 From: uhlar@ccnews.ke.sanet.sk (Matus Uhlar) References: <Dn4HrC.KIx@twwells.com> <4gfi22$evb@news.inc.net> <Dn5KLH.Muy@twwells.com> <DnCo3D.Cz3@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: 142215477 Distribution: inet Organization: Slovak Academic Network Kosice Newsgroups: news.software.nntp