🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #5452

Re: How to do a better USENET file system

#5452
From: Evan Champion
Date: Fri, 01 Mar 1996 00:00
77 lines
3803 bytes
brad@clarinet.com (Brad Templeton) wrote:
>	b) There is no need for a free list, block allocation, or
>	   fragmentation

I disagree that you wouldn't need a free list/block allocation and
that there wouldn't be fragmentation of some sort (though the kind I'm
thinking of isn't the same as yours, I think).  Assume the worst case
expiration policy, with varying expiration policies for different
newsgroups and expiry by date the article was sent.

Assume you have a whopping :-) 5 files on your disk and that the 5
files take up the entire disk:

1 2 3 4 5

Today, articles 2 and 3 were expired:

1 [] [] 4 5

Without a free list of some sort, however, the server doesn't know
that blocks 2 and 3 were expired, and remember there's no space left
at the end of the disk.

And even if it knows that blocks 2 and 3 were expired, you've got this
hole in the middle of your disk that has to be sorted out if you are
going to have articles written contiguously.  Free space fragmentation
will be a problem even if file fragmentation is not.

>	c) News articles are written in one big write, they do not grow
>	   during creation

There are generally UNIX system calls to pre-allocate disk space (or
as a side effect pre-allocate disk space).  In my case, truncate() and
ftruncate() seem to do that nicely (4.4BSD).

You might give it a try; right after the open() statement, shove in a
ftruncate( fd, article_size) and see what happens (of course, that
assumes that your ftruncate works the same as mine).

>	a) Write a series of tools that do things like article-cat
>	   and article rm given an old style path

I think that would be a requirement, not a nice add-on (especially
article-cat; article-rm can be done through ctlinnd cancel).

>	b) If you want to really do it, write a filesystem handler that
>	   creates a read or unlink only filesystem with the articles, and
>	   then even old readers will work.

Unfortunately, that would be operating system specific (the file
system interface to the kernel).

Do the performance optimisations/assumptions made on one system work
on another?  What happens to RAID systems?  I've seen RAID systems
where you actually have to tell the RAID controller what kind of
filesystem that you're running so it will optimise itself.  There are
all kinds of wierd and wonderful things that UNIX can better take care
of than an application.  I think that is why I see database vendors
moving away from raw filesystem access; when you have to deal with so
many platforms, it is just too much trouble.  Who knows; there are
probably platforms that don't even allow raw disk writes except when
in single user mode.

I understand that doing block read/writes to a device is much more
efficient than going through a filesystem, and I'm not questioning
that in any way.  What I am questioning is if the extra effort put in
to it is worth it.

My personal opinion would side more towards writing articles by
message ID to a normal filesystem as a temporary measure until the net
decides what to do with news.

Evan



Technical Details
Message-ID: <4h5pf3$kpf@piano.synapse.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: <Dn4HrC.KIx@twwells.com> <Dn5KLH.Muy@twwells.com> <DnCo3D.Cz3@clarinet.com> <4gssas$1h1@piano.synapse.net> <DnFDJM.CMw@clarinet.com>

Show Full Headers
Complete Article Headers
Message-ID: <4h5pf3$kpf@piano.synapse.net>
Subject: Re: How to do a better USENET file system
Date: Fri, 01 Mar 1996 00:00:00 +0000
From: evanc@synapse.net (Evan Champion)
References: <Dn4HrC.KIx@twwells.com> <Dn5KLH.Muy@twwells.com> <DnCo3D.Cz3@clarinet.com> <4gssas$1h1@piano.synapse.net> <DnFDJM.CMw@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: 141655327
Distribution: world
Organization: Synapse Internet [www.synapse.net]
Newsgroups: news.software.nntp