🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #21947

Re: New Diablo storage scheme being considered

#21947
From: Curt Welch
Date: Sun, 28 Sep 1997 00:00
117 lines
5380 bytes
dillon@best.net (Matt Dillon) wrote:
>     My friend Dave and I came up with an excellent file storage + expiration
>     model to turn diablo's time-based expire into a true expire.ctl based
>     expire.  I am interested in comments, so I will describe it:

>     Current Diablo Scheme:

> 	Create a new directory every 10 minutes.  The name of the directory
> 	is based on the timestamp, e.g. 'D.00de95ea'.

>     New Diablo Scheme being considered:

> 	... writes each article to a
> 	future-time-indexed directory based on when the article is supposed
> 	to expire ...

> 	Disadvantages:		Expire control files usually result in five
> 				or six different expires relative to the
> 				article reception time.  This means that
> 				each diablo process will have to juggle
> 				6 descriptors rather then 1.

I think it's probably too easy for people to create a
aexpire.ctl that will maket this number much higher than 6.
And doing so could be a real unexpected performance problem
which could case some real problems.

>     What do people think?

I really, really, really, like space based expire (like Diablo does
now).  Will your new system work this way (i.e. removing enough
articles to get the free space back to a fixed amount)?  It doesn't
sound like it can.  Or if you try to make it work that way, say
by remvoing old article directories not on their "due" date, but
rather whenever they are needed to be removed based on disk space
(like the current expire), then you can run into a real problem
when you set the expire params wrong by mistake.

For example, lets say you set the dexpire.ctl to hold binaries for
1 day and everything else for 7 days.  And all is working fine.  You
have enough disk space so you actually end up with 3 days of binaries and
9 days of everything else.  But then things change when you're not
looking.  Some rogue binary groups have a run of high volume days, and
you have them listed in your "non-binary" 7 day list by mistake.

Your disk can now no longer hold 7 days of the "non-binaries".  The
expire process is forced to start expiring directories past the "current"
time.  If it gets so bad that it's more than a day ahead of time then
new incomming binaries are trying to be placed into future
directories that have already been expired.  What a mess.  It seems
to me that this would be very hard to get the expire paramaters
set "right" and keep them set "right".

And what happens when you try to change the expire params?  Nothing.
If you screew up and set your expire too far in advance, say
1 month (maybe by mistake), your spool fills up with all this stuff
that's in directories that aren't due to expire for a month.  Changing
the expire back down to 1 week and re-running expire won't help. The
damgage is already done.

Is this what you had in mind?  Or am I just worring about somthing
that isn't an issue because I missed some basic point?

What seems like a better way to do expire is to specify a small
number of article classes (based on newsgroup, size etc).  And then
specify how much of the news spool (by % volume) each of these classes
is allowed to use.  i.e. binaries get 50% of the spool, local groups
get 10%, everything else gets 40%.  Expire would then need to quickly
calculate the size in use by each class and remove articles/directories
based on these sizes and percentages to bring the spool back into balance.

You could place each of these classes into a different "current"
directory like you do now but the dir name would also include extra
chars to specify its class.

Expire would be space based just like it is now.  It would act as if
you had multiple spool partitions, one for each class of article.

I think this would have mostly the same performace as your system, but
not have the complex expire problems.  But it could require some
additional complexity to make it easy for expire to quickly calculate
total disk usage for each article class.  But I think at most this
would just be an expire cache file were it would record the total
disk usage of each directory.  New (or current) directories would
be sized (or re-sized) and added to the cache file for each expire
run.

Also, the epxire file should be different so the user is forced
to define the classes (as opposed to have them happen as a side
effect as it would be now).  Comments would warn the user of
performace problems due to too many classes.

Maybe something like:

class binary 50%
    newsgroup alt.bin*
    newsgroup alt.mag*
    sizegt    5k
end

class local 10%
    newsgroup best.*
end

class default 40%
    newsgroup *
end

Well, there are my initial thoughts....

-- 
Curt Welch
curt@kcwc.com
http://CurtWelch.Com/

Technical Details
Message-ID: <19970928013119.402$gp@NewsReader.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
References: <60hp3e$peq$1@flea.best.net>

Show Full Headers
Complete Article Headers
Message-ID: <19970928013119.402$gp@NewsReader.Com>
Subject: Re: New Diablo storage scheme being considered
Date: Sun, 28 Sep 1997 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <60hp3e$peq$1@flea.best.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
X-Deja-AN: 276151388
X-User: Curt@NewsReader.Com
Organization: KCW Consulting
Newsgroups: news.software.nntp