Thread View: news.software.nntp
19 messages
19 total messages
Started by Jeremy
Wed, 10 May 2000 00:00
Diablo spool
Author: Jeremy
Date: Wed, 10 May 2000 00:00
Date: Wed, 10 May 2000 00:00
8 lines
749 bytes
749 bytes
Is there a way to tell Diablo to spread its spool over multiple filesystems, without striping the disks? I'd really, really, really like to just give it a few directories and have it use them all. -- Jeremy ( jeremy@exit109.com | bofh@netscum.dk )
Re: Diablo spool
Author: Joe Greco
Date: Tue, 09 May 2000 00:00
Date: Tue, 09 May 2000 00:00
23 lines
1680 bytes
1680 bytes
In news.software.nntp article <957925631.861148@news.netscum.dk>, Jeremy <bofh@netscum.dk> wrote: :Is there a way to tell Diablo to spread its spool over multiple :filesystems, without striping the disks? I'd really, really, really :like to just give it a few directories and have it use them all. Yes, check out DiabloSpoolDirs. Unfortunately, it's somewhat broken in 2.0, because I biffed a merge by giving Russell the wrong code and then nobody gave me time to actually test the 2.0 stuff in production, since we were all so worried about the extended reader functionality (sigh). Downside: it is not designed to be "flexible". It assumes that you are giving it N identical filesystems. It isn't policy driven (like "put alt.binaries on filesystem 2")... it just extends the existing Diablo spool paradigm to multiple filesystems. If you need a correct and current snapshot, holler and it will find its way to you. ... JG
Re: Diablo spool
Author: Jeremy
Date: Wed, 10 May 2000 00:00
Date: Wed, 10 May 2000 00:00
36 lines
1922 bytes
1922 bytes
Joe Greco <jgreco@ns.sol.net> wrote: > Yes, check out DiabloSpoolDirs. Yep, found it after seeing the other reply. The change log in the snapshot gave me a clue. I'm finding that Diablo is definitely one of those "there's plenty of documentation, it's called source code" programs. :) > Downside: it is not designed to be "flexible". It assumes that you are > giving it N identical filesystems. It isn't policy driven (like "put > alt.binaries on filesystem 2")... it just extends the existing Diablo > spool paradigm to multiple filesystems. That's all I need. I'm using it for feeding only, and have multiple drives of the same size to use for spool. > If you need a correct and current snapshot, holler and it will find its > way to you. I grabbed the snapshot off openusenet.org and have it running now. It seems to work. Is there correcter and currenter? It seems to be filling N.02 faster than the others, but on the other hand it's only been running for a few minutes: /dev/dsk/c1t9d0s0 17874219 17506 17856713 1% /news/spool/news/N.00 /dev/dsk/c1t10d0s0 17874219 17506 17856713 1% /news/spool/news/N.01 /dev/dsk/c1t11d0s0 17874219 350378 17523841 2% /news/spool/news/N.02 Thanks for the pointers. -- Jeremy ( jeremy@exit109.com | bofh@netscum.dk )
Re: Diablo spool
Author: Nickolai Zeldovich
Date: Wed, 10 May 2000 00:00
Date: Wed, 10 May 2000 00:00
14 lines
1134 bytes
1134 bytes
In article <957925631.861148@news.netscum.dk>, Jeremy wrote: >Is there a way to tell Diablo to spread its spool over multiple >filesystems, without striping the disks? I'd really, really, really >like to just give it a few directories and have it use them all. The 2.0 release includes some support for it; however if you are going to use it, you should grab the current snapshot[1], which includes a number of fixes in that area. -- kolya [1] http://www.openusenet.org/diablo/download/
Re: Diablo spool
Author: Joe Greco
Date: Thu, 11 May 2000 00:00
Date: Thu, 11 May 2000 00:00
39 lines
2175 bytes
2175 bytes
In news.software.nntp article <1r8zxhb7ez.fsf@haey.ifi.uio.no>, Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
:[Joe Greco]
:
:> If you need a correct and current snapshot, holler and it will
:> find its way to you.
:
:The 20000503-03 snapshot doesn't look correct to me.
:
: void
: LoadSlotDir(time_t t, int forceCreate)
: {
: uint32 gmt = t / 60;
:
: gmt = gmt - gmt % 10;
:
:Now gmt will always end in 0, i.e. be divisible by 10.
:
: if (LSTime == 0 || gmt != LSTime) {
: char path[256];
:
: snprintf(path, sizeof(path), "%s", PatExpand(SpoolHomePat));
: if (DiabloSpoolDirs > 0) {
: snprintf(path + strlen(path), sizeof(path) - strlen(path),
: "/N.%02x/D.%08x",
: (gmt / 2) % DiabloSpoolDirs, gmt);
:
:(gmt / 2) will always be divisible by 5. If you happen to have 5
:DiabloSpoolDirs, you will _only_ use N.00. The correct fix is to
:divide by 10. (You need to do this adjustment all over the place, you
:can find them with fgrep "N.%02".)
I think there's something wrong with this idea. I looked sorta carefully
at all of this when I was trying to figure out my initial mistake, and it
was more complex than that. Unfortunately, I don't have the time to sit
down and wrap my head around this for a few hours right now.
... JG
Re: Diablo spool
Author: Brad Knowles
Date: Thu, 11 May 2000 00:00
Date: Thu, 11 May 2000 00:00
38 lines
2327 bytes
2327 bytes
In article <3918dfe1$0$88605@news.execpc.com>, jgreco@ns.sol.net (Joe
Greco) wrote:
> Yes, check out DiabloSpoolDirs.
>
> Unfortunately, it's somewhat broken in 2.0, because I biffed a merge by
> giving Russell the wrong code and then nobody gave me time to actually
> test the 2.0 stuff in production, since we were all so worried about the
> extended reader functionality (sigh).
Yeah, this was one of the things that caused me to recently put a
halt to my attempts to test Diablo 2.0. I've gotten busy with some
other problems since then, and haven't gotten back to it.
However, in the meantime I'd really like to know how this option
works.
> Downside: it is not designed to be "flexible". It assumes that you are
> giving it N identical filesystems. It isn't policy driven (like "put
> alt.binaries on filesystem 2")... it just extends the existing Diablo
> spool paradigm to multiple filesystems.
Based on your previous comments, I had anticipated that, and set up
the filesystems appropriately. This should be just fine.
> If you need a correct and current snapshot, holler and it will find its
> way to you.
HOLLER! ;-)
--
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
Are you a news server administrator outside of North America and Western
Europe? If so, and you're interested in getting a newsfeed from a server
in the Freenix Top 50, please send me private e-mail for details.
Re: Diablo spool
Author: Andrew Gierth
Date: Thu, 11 May 2000 00:00
Date: Thu, 11 May 2000 00:00
23 lines
1784 bytes
1784 bytes
>>>>> "Joe" == Joe Greco <jgreco@ns.sol.net> writes: Joe> Unfortunately, I blew it. There is something goofy that goes on Joe> in the sequence numbers (and I bothered to figure out why, once, Joe> and then promptly forgot why)... they tend to end up being even Joe> numbers. Actually they're always divisible by 10, because they are simply the start time (in minutes) of a 10-minute interval. Joe> So a straight mod places content in every other N.xx directory. Joe> The fix is simple and trivial, you simply divide by two before Joe> the mod. and as someone else has already pointed out, this leaves you with a multiple of 5 - so you're OK as long as your number of filesystems is not also a multiple of 5 (in which case you'll end up using only 1/5 of them). You should be dividing by 10 instead. -- Andrew.
Re: Diablo spool
Author: Russell Vincent
Date: Thu, 11 May 2000 00:00
Date: Thu, 11 May 2000 00:00
13 lines
1392 bytes
1392 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote: > and as someone else has already pointed out, this leaves you with a > multiple of 5 - so you're OK as long as your number of filesystems is > not also a multiple of 5 (in which case you'll end up using only 1/5 > of them). You should be dividing by 10 instead. Agreed - I've just written some test code and 10 works the way it should. I will fix the code accordingly. -Russell
Re: Diablo spool
Author: Kjetil Torgrim Homme
Date: Thu, 11 May 2000 00:00
Date: Thu, 11 May 2000 00:00
34 lines
1720 bytes
1720 bytes
[Joe Greco]
> If you need a correct and current snapshot, holler and it will
> find its way to you.
The 20000503-03 snapshot doesn't look correct to me.
void
LoadSlotDir(time_t t, int forceCreate)
{
uint32 gmt = t / 60;
gmt = gmt - gmt % 10;
Now gmt will always end in 0, i.e. be divisible by 10.
if (LSTime == 0 || gmt != LSTime) {
char path[256];
snprintf(path, sizeof(path), "%s", PatExpand(SpoolHomePat));
if (DiabloSpoolDirs > 0) {
snprintf(path + strlen(path), sizeof(path) - strlen(path),
"/N.%02x/D.%08x",
(gmt / 2) % DiabloSpoolDirs, gmt);
(gmt / 2) will always be divisible by 5. If you happen to have 5
DiabloSpoolDirs, you will _only_ use N.00. The correct fix is to
divide by 10. (You need to do this adjustment all over the place, you
can find them with fgrep "N.%02".)
Kjetil T.
Re: Diablo spool
Author: Joe Greco
Date: Thu, 11 May 2000 00:00
Date: Thu, 11 May 2000 00:00
75 lines
4147 bytes
4147 bytes
In news.software.nntp article <brad-881E22.12014311052000@news.skynet.be>, Brad Knowles <brad@shub-internet.org> wrote: :In article <3918dfe1$0$88605@news.execpc.com>, jgreco@ns.sol.net (Joe :Greco) wrote: : :> Yes, check out DiabloSpoolDirs. :> :> Unfortunately, it's somewhat broken in 2.0, because I biffed a merge by :> giving Russell the wrong code and then nobody gave me time to actually :> test the 2.0 stuff in production, since we were all so worried about the :> extended reader functionality (sigh). : : Yeah, this was one of the things that caused me to recently put a :halt to my attempts to test Diablo 2.0. I've gotten busy with some :other problems since then, and haven't gotten back to it. : : However, in the meantime I'd really like to know how this option :works. Implementation is conceptually simple (and much of the code is too). Diablo maintains locality on its spool by making directories of the form "D.xxxxxxxx", where xxxxxxxx is a hex quantity that represents time and some other stuff. Articles received within a specific time frame get written into this directory. Expiration is handled by removing entire directories at a time, which is fine since the tendency is for new dirs to be created ~~ every 20 minutes. It is very fast, very efficient. Then, the history is forced to be reconciled with the current contents of the spool, again, in a reasonably fast and efficient manner. To retain the locality benefits, and because I didn't want to introduce new and unexpected complexities into the code, I chose to simply take that hex number, mod it against a variable, and wind up with N.xx/D.yyyyyyyy where xx is yyyyyyyy % DiabloSpoolDirs. This made most of the code trivial to modify, and left the complex stuff to dexpire, which then had to know how to monitor for space on a per-filesystem basis, and had to know how to recurse down into those directories. Unfortunately, I blew it. There is something goofy that goes on in the sequence numbers (and I bothered to figure out why, once, and then promptly forgot why)... they tend to end up being even numbers. So a straight mod places content in every other N.xx directory. The fix is simple and trivial, you simply divide by two before the mod. So I'm not really sure where I dug up the wrong code, since I had been using the right code in production for a Very Long Time. But these things happen. Sigh! :> Downside: it is not designed to be "flexible". It assumes that you are :> giving it N identical filesystems. It isn't policy driven (like "put :> alt.binaries on filesystem 2")... it just extends the existing Diablo :> spool paradigm to multiple filesystems. : : Based on your previous comments, I had anticipated that, and set up :the filesystems appropriately. This should be just fine. : :> If you need a correct and current snapshot, holler and it will find its :> way to you. : : HOLLER! ;-) Huuuh. I was going to be a smartie and tell you to check it out yourself. But you don't have an account. How'd that not happen? Send me your preferred login, a crypted pw, your preferred shell, and an IP address that you would be ssh'ing from to me via e-mail. I will set you up an account and you can get the code yourself. ... JG
Re: Diablo spool
Author: Russell Vincent
Date: Thu, 11 May 2000 00:00
Date: Thu, 11 May 2000 00:00
14 lines
1195 bytes
1195 bytes
Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote: > The 20000503-03 snapshot doesn't look correct to me. Could someone please try/review the patch: http://www.openusenet.org/diablo/download/spooldirfix.patch and let me know if it works. If it does, I will commit the code and roll another snapshot. -Russell
Re: Diablo spool
Author: Kjetil Torgrim Homme
Date: Mon, 15 May 2000 00:00
Date: Mon, 15 May 2000 00:00
28 lines
2055 bytes
2055 bytes
[Olaf Titz] > or better, use a true hash function. Perhaps something as > primitive as aabbccdd -> (bb^cc)+(aa^dd) mod n. > This way, you avoid higher patterns that could be in the time part > from the start. Hmm. I'm using 3 spools with the current scheme. This means that I am vulnerable to bursts in traffic which always appear on the same time of day or hour. If I have a peer which batches it up and sends it every 30 minutes, his batch will always hit the same spool. This isn't really a problem in my case, since most my traffic is "realtime", but it may be a concern for leaf sites. One workaround is to use a number of spools which is not divisible by 2, 3 or 5. 7 spools would be nice. Using a hash feels risky though. Diablo will store all the traffic from a 10 minute period into one directory on one spool. If the hash function is only slightly repetitive occasionally, you can cause havoc to the expiration times. On my feeder, each of my 3 spools is 4 GB, so I can hold 3 hours of a full feed in total... I think I prefer the deterministic algorithm, it being easier to reason about its consequences. Kjetil T.
Re: Diablo spool
Author: Russell Vincent
Date: Wed, 17 May 2000 00:00
Date: Wed, 17 May 2000 00:00
30 lines
2278 bytes
2278 bytes
Joe Greco <jgreco@ns.sol.net> wrote:
> I never really looked at how Matt had implemented the "reader mode"
> expiration stuff, and some of the code that's in there to do things
> like making sure directories exist are things that I've not done much
> research to figure out what's really going on. I think that'd be the
> biggest likely problem with any rewrite.
Aaah ... yes. I always forget about reader mode because I never
could get it working smoothly and prefer to use different machines
for different expire times. Not everyone can do that, though. :-)
In this case it means that for the first article that comes in for
a particular expire slot, the partitions will need to be scanned
to find on which partition a particular slot is found. After that, the
fd cache takes care of the location. i.e: In the worst case, the
code will need to do a stat() for each partition for the first article
received in a particular expire slot.
e.g: If you have 10 dexpire.ctl lines, each with a different %, then
for the first article received for each of those 10 lines, a
stat() scan will need to be done.
How about allowing different partitions to be specified for different
hierarchies and then using the standard fifo in each partition? A bit
like the CNFS specification in INN.
-Russell
Re: Diablo spool
Author: Joe Greco
Date: Wed, 17 May 2000 00:00
Date: Wed, 17 May 2000 00:00
18 lines
1600 bytes
1600 bytes
In news.software.nntp article <8fuha3$7rh$1@quince.news.easynet.net>, Russell Vincent <rv@openusenet.org> wrote: :Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote: :> so I can hold 3 hours of a full feed in total... I think I prefer the :> deterministic algorithm, it being easier to reason about its :> consequences. : :How about an algorithm that does a regular check (say every 10 minutes :when it switches spools) of free space and uses the spool with most :available space (perhaps only when below a threshold)? You lose determinism, and then have to search each spool when trying to retrieve an article. I do not like implementations which force performance to suffer... especially when news servers often run close to the edge already. ... JG
Re: Diablo spool
Author: Russell Vincent
Date: Wed, 17 May 2000 00:00
Date: Wed, 17 May 2000 00:00
24 lines
2042 bytes
2042 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote: > That would be more tricky to implement, AFAICT, because you'd have to > record additional information in the history entry. At present, what > gets recorded is the article's arrival time, which automatically tells > you which directory to look in to find the file. Adding an extra field to history was my intention. Diablo has a version number in the history, so adding fields that require a history rebuild can be done relatively easily (and it doesn't take too long). Doing it this way also allows you to have spools of different sizes. Dexpire would just search each spool partition/directory for the oldest directory and remove that. This would be the biggest performace hit, but dexpire usually does a bunch of sleeps anyway. I agree that it isn't a simple solution for upgrading, but the actual implementation is pretty easy as far as I can see. I am going to code it and have it as an option. -Russell
Re: Diablo spool
Author: Joe Greco
Date: Wed, 17 May 2000 00:00
Date: Wed, 17 May 2000 00:00
36 lines
2511 bytes
2511 bytes
In news.software.nntp article <1rln1b7snh.fsf@haey.ifi.uio.no>, Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote: :[Olaf Titz] : :> or better, use a true hash function. Perhaps something as :> primitive as aabbccdd -> (bb^cc)+(aa^dd) mod n. :> This way, you avoid higher patterns that could be in the time part :> from the start. : :Hmm. I'm using 3 spools with the current scheme. This means that I :am vulnerable to bursts in traffic which always appear on the same :time of day or hour. If I have a peer which batches it up and sends :it every 30 minutes, his batch will always hit the same spool. This :isn't really a problem in my case, since most my traffic is :"realtime", but it may be a concern for leaf sites. One workaround is :to use a number of spools which is not divisible by 2, 3 or 5. 7 :spools would be nice. : :Using a hash feels risky though. Diablo will store all the traffic :from a 10 minute period into one directory on one spool. If the hash :function is only slightly repetitive occasionally, you can cause havoc :to the expiration times. On my feeder, each of my 3 spools is 4 GB, :so I can hold 3 hours of a full feed in total... I think I prefer the :deterministic algorithm, it being easier to reason about its :consequences. <AOL>M33 T00!</AOL> The other thing to remember is that this patch was really designed more for sites with Way Large Spools (like some of my multi-terabyte spools), not really so much for smaller sites who just want to use it as an alternative for striping on a transit server. It does work for both, but it is more important that it work well for the VLS sites. ... JG
Re: Diablo spool
Author: Russell Vincent
Date: Wed, 17 May 2000 00:00
Date: Wed, 17 May 2000 00:00
13 lines
1396 bytes
1396 bytes
Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote: > so I can hold 3 hours of a full feed in total... I think I prefer the > deterministic algorithm, it being easier to reason about its > consequences. How about an algorithm that does a regular check (say every 10 minutes when it switches spools) of free space and uses the spool with most available space (perhaps only when below a threshold)? -Russell
Re: Diablo spool
Author: Joe Greco
Date: Wed, 17 May 2000 00:00
Date: Wed, 17 May 2000 00:00
33 lines
2392 bytes
2392 bytes
In news.software.nntp article <8fuoof$e8o$1@quince.news.easynet.net>, Russell Vincent <rv@openusenet.org> wrote: :Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote: :> That would be more tricky to implement, AFAICT, because you'd have to :> record additional information in the history entry. At present, what :> gets recorded is the article's arrival time, which automatically tells :> you which directory to look in to find the file. : :Adding an extra field to history was my intention. Diablo has a version :number in the history, so adding fields that require a history rebuild :can be done relatively easily (and it doesn't take too long). : :Doing it this way also allows you to have spools of different sizes. : :Dexpire would just search each spool partition/directory for the oldest :directory and remove that. This would be the biggest performace hit, :but dexpire usually does a bunch of sleeps anyway. : :I agree that it isn't a simple solution for upgrading, but the :actual implementation is pretty easy as far as I can see. I am going :to code it and have it as an option. Then we might as well revisit the whole concept a bit, and see if there isn't a better way to do it... I never really looked at how Matt had implemented the "reader mode" expiration stuff, and some of the code that's in there to do things like making sure directories exist are things that I've not done much research to figure out what's really going on. I think that'd be the biggest likely problem with any rewrite. ... JG
Re: Diablo spool
Author: Andrew Gierth
Date: Wed, 17 May 2000 00:00
Date: Wed, 17 May 2000 00:00
16 lines
1626 bytes
1626 bytes
>>>>> "Russell" == Russell Vincent <rv@openusenet.org> writes: Russell> How about an algorithm that does a regular check (say every Russell> 10 minutes when it switches spools) of free space and uses Russell> the spool with most available space (perhaps only when below Russell> a threshold)? That would be more tricky to implement, AFAICT, because you'd have to record additional information in the history entry. At present, what gets recorded is the article's arrival time, which automatically tells you which directory to look in to find the file. -- Andrew.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads