Article View: news.software.nntp
Article #37250Re: Abandoning uniover - but how?
From: cmsedore
Date: Wed, 05 May 1999 00:00
Date: Wed, 05 May 1999 00:00
63 lines
4316 bytes
4316 bytes
In article <19990504143226.915$cc@newsreader.com>, curt@kcwc.com (Curt Welch) wrote: > cmsedore@my-dejanews.com wrote: > > > Allow me to offer what I did in tortoise. I wrote the overview entries > > (sans number) for each article ahead of the article in the article store. > > This meant that I could grab them anytime I wanted for any group to which > > it was posted by just looking it up. > > So you just add the overview record as a new line in the front of the > article? Does that really buy you anything? Sounds to me like it just > mostly wastes disk space. If you have to read the block to get that > overview data it's not going to be much (any?) faster than just reading > the entire header and rebuilding the overview record. The much longer > delay there is the read -- not the parsing and constructing the overview > data. Depending on how your article store works, you might have to read > a few more blocks to get the entire header, but in most cases, I'd expect > the entire header to fall into one block anyway. It buys me two things. First, I don't have to worry about getting the overview entry into the cache instantly--I can retrieve it from the article store any time I want it (in fact, I can blow away the overview cache and it will rebuild it for me). I've thought about changing to build the overview record on the fly, but haven't written the code. I used to have a scheme that worked more like uniover, but switched to this because the other method didn't perform. > > In addition, I wrote an overview caching mechanism, which operates in one > > of two ways. The more traditional way is that it prebuilds data for each > > group as it receives articles. It writes the cached data (the entire > > overview range) into a cyclical store, in blocks which are sized on 16k > > intervals. New articles are appended until the whole allocated space is > > full, then the whole block is rewritten to the current position in the > > store. > > So you have one 16K block active in memory for each group? 16K x 30,000 > groups is 480 Meg of memory - not a very small memory foot print eh? Do > you always keep all those in memory or do you limit the memory usage > somehow - like by writing out cache block that haven't been accessed > recently? No, I allocate from the overview cache (which is just a special article store) in 16k blocks. Each group uses from 1 to (as many as necessary) 16k blocks to hold the data in the cache store. I fill the allocated cache blocks by writing in-place (ie not advancing the current offset in the store)--this allows you to update at very low cost. Once the space allocated in the store is used, the whole cache block is rewritten elsewhere. If you size the overview cache store appropriately, you can get a nice slow expire that essentially serves as garbage collection. FWIW, my usual strategy is to not worry too much about disk space. I figure that reducing the IO bottlenecks at the cost of disk space (within reason) is a good trade. You can buy disk space--buying your way out of a problematic i/o design is much more expensive. [...] -Chris -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<7goa75$eec$1@nnrp1.dejanews.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:
<7f5p31$vmq$1@news.netmar.com> <7g5b88$pi$1@twwells.com> <19990428114141.388$tD@newsreader.com> <7g87un$eob$1@twwells.com> <7gl2qc$4s1i$1@newssvr03-int.news.prodigy.com> <7glht1$2ag$1@nnrp1.dejanews.com> <19990504143226.915$cc@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <7goa75$eec$1@nnrp1.dejanews.com> Subject: Re: Abandoning uniover - but how? Date: Wed, 05 May 1999 00:00:00 +0000 From: cmsedore@my-dejanews.com References: <7f5p31$vmq$1@news.netmar.com> <7g5b88$pi$1@twwells.com> <19990428114141.388$tD@newsreader.com> <7g87un$eob$1@twwells.com> <7gl2qc$4s1i$1@newssvr03-int.news.prodigy.com> <7glht1$2ag$1@nnrp1.dejanews.com> <19990504143226.915$cc@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 X-Deja-AN: 474140135 X-Http-Proxy: 1.1 x14.dejanews.com:80 (Squid/1.1.22) for client 128.230.135.237 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed May 05 02:25:44 1999 GMT Newsgroups: news.software.nntp X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)