Article View: news.software.nntp
Article #38561Re: Balancing flow to spools (was: Re: Broadband news sever comparison)
From: Curt Welch
Date: Fri, 09 Jul 1999 00:00
Date: Fri, 09 Jul 1999 00:00
146 lines
8714 bytes
8714 bytes
davidsen@tmr.com (bill davidsen) wrote: > I'm not sure what you mean by max size. If you use a partition the size > doesn't change, and if you use a file, unless you have a magic > filesystem you would always precreate a full size file to ensure it's > contiguous. At least on my systems the max size and the actual size are > one and the same number. I was talking about "max" size because my system works a bit differently. My spool files grow by adding articles to the end of them. I create new files when they reach 2GB or 1/10 the "defined" size of the spool. When the spool fills up, I remove the oldest file. So articles expire in large chunks. I don't precreate the files (they aren't cycbufs) so they start empty and then grow to full size. That's why I was thinking that way. BTW, I haven't done any testing, but I doubt the contiguous issue is a valid concern. The Berkeley file system allocates blocks in a fashion to minimize those types of problems. And though you write the files sequentialy, you seldom read them that way - so I suspect the pre-alocating the files to try and get them more continguous does little good. Pre-alocationg might be a big win because it prevents having to do the fs alocation work as you write - but not because of the contigous issue. At least that is my guess. > | Plus, the algorithm is to always put the next article into the buffer > | with the longest current expiration. If you used the actual size of > | a new buffer then it would look like a very small buffer, and therfor > | have a very short retention time. And that would force all the traffic > | into the other buffers leaving the new buffer unused. So that clearly > | wouldn't work. > > Obviously if there is no data in a cycbuff you treat it as infinitely > old, that's an obvious boundary condition check. If your logic is > checking dates and there are none, I can't imagine what other date you > would use. No that's has nothing to do with what I was thinking of. I don't use the actual age of the articles in the buffer at all. I calculate the "expected" retention based on the current rate of flow of data into the buffer and it's size. I was just talking about the issues of using the "current" size of the buffer (in my system where bufs start small when new). > | > AFAIK the INN stuff is round robin, although I haven't checked the > | > code. Using age of oldest article as a weighting factor would > | > probably produce some desirable results. > | > | I thought about that as well but after some examination of the idea > | I realized it had some real problems. If you use the age of the oldest > | article in a buffer which is holding 30 days of news, then you are > | putting new news into the buffer based on news flows that happened 30 > | days ago. That means that if you change something (say either in your > | incoming news stream or in the config of your spools) it could take a > | full 30 days to cycle though the buffers for the first time - and may > | take many many full cycles before it stabilizes (i.e. months). And > | depending on the actual algorithm it could actually oscillate forever > | (I think). > > You have to use a weighting to determine which cycbuff to use. One > factor would be age of oldest article, the other would be percent full > (assuming 100% after the first wrap). Sure, if you are using the age of the oldest article in you algorithm, then the obvious thing to do for a partially full buffer is to extrapelate a number based on the the actually age of the oldest article and the % full number. > Preferentially using a new cycbuff > both spreads the reader load quickly and speeds the extension of > effective retention period. Making an effort to keep the oldest article > in all cycbuffs the same age lengthens the retention also, Yes, that makes some sense for cycbufs. But in my system where 1/10 of the entire spool will vanish in 3 seconds - the concept of keeping the articles the same age is mostly impossible. So that's why I didn't bother with trying to optimize for that when I selected my algorithm. > By weighting the preferences any oscilation is damped and the system > tends to remain near optimal. Given that optimal changes with each new > article I think you can waste a lot of time chasing the goal. I want the > disk rates to be within 10-15% on cycbuffs, and oldest date within > minutes rather than days, but perfection is not the goal. > | > | For example, you have three bufs the same size. You use two to hold > | binary posts and one for text. You have 10 days retention in the text > | group and 2 days retention in the binary bufs. You decide to change > | one of the binary buffers into a "text" buffer. > > Honestly, I can't imagine doing that. Adding more storage is a regular > problem, but changing an existing cycbuff seems like an infrequent > operation. Now watch 20 admins post that they do it weekly:-( Yeah that's true. I picked the exmaple only as a good worse case to try and illustrate my point about potential problems with these types of algorithms. > | So, using the date of the oldest article in the buf to decide which buf > | to write an article to works nicely in the fact that it's always > | overwriting the oldest news (which is what you want from a logical > | perspective), but it causes "shock" waves to travel though your spools > | for days or weeks after you make a change and durring that time you end > | up with a very unbalanced I/O patterns to your disks (like bufs that > | don't get any new articles for 8 days in the above example). > > Honestly I've never moved a cycbuff from one metacycbuff to another, and > I wouldn't bet a penny that the old data would be valid until I reread > the code. I don't have inn 2.x around here anymore and my memory about how all that is configured is a bit gone at this point - so I was really talking about my system and assuming it applied to others - like INN. It might not. In my system, you have multiple spools. Each spool is a single directory which you tell the server to store up to N MB of articles in. For each spool, you define which articles you want to go in to it using the same complex language you use when defining feeds to other servers. At any time, you can change those definitions about which articles are being stored in which spool, and it has no effect on the old articles already stored there (other than the fact that it changes how quickly those old articles are being overwritten), but it has a big effect on where new articles are stored. You can also change the size of these spools at any time with no problem as well. Since there's none of that pre-allocation stuff going on, there's nothing complex about telling the system to allow more articles to be stored before removing old ones or telling it to remove a bunch of old ones to get the size down to something smaller. (i.e. you don't have to write a lot of special case code to deal with a size change - it just works). > I think your method is a clever solution, but I don't believe it > optimizes the same things I think are most important. Yeah, there's both the issue of what we may "want" (while will always be different for any two people) and what we may "think" is the most important when it comes to performace. Most of my major design decisions are based on gut instinct and not on testing. Testing is always good -- just not as fun :). -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<19990709174730.429$lS@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-mailReferences:
<7lj35i$cct$1@usenet45.supernews.com> <19990708084149.553$A8_-_@newsreader.com> <7m2uii$1j78$1@newssvr03-int.news.prodigy.com> <19990708205106.164$l5@newsreader.com> <7m5ekb$2mfg$1@newssvr03-int.news.prodigy.com>Show Full Headers
Complete Article Headers
Message-ID: <19990709174730.429$lS@newsreader.com>
Subject: Re: Balancing flow to spools (was: Re: Broadband news sever comparison)
Date: Fri, 09 Jul 1999 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <7lj35i$cct$1@usenet45.supernews.com> <19990708084149.553$A8_-_@newsreader.com> <7m2uii$1j78$1@newssvr03-int.news.prodigy.com> <19990708205106.164$l5@newsreader.com> <7m5ekb$2mfg$1@newssvr03-int.news.prodigy.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: 499260805
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp