Article View: news.software.nntp
Article #21288Re: NNRPD resource consumption
From: Christopher Sedore
Date: Fri, 05 Sep 1997 00:00
Date: Fri, 05 Sep 1997 00:00
78 lines
4261 bytes
4261 bytes
[...] >Overview Indices > - Adds a flat binaries index that as stored in the same directory as the > overview text file, but in another file. The index stores the article > number along with the offset that the overview record starts at. > - NNRPD reads the index into memory when overview is opened as uses the > index to locate articles in the overview text file instead of linear > searching. > - We instrumented NNRPD to report the amount of overview data read from > disk compared to what was actually sent to the client. We were seeing > about 50% more overview data read per day than article data, even though > only sent about 10% of the overview data to the client. With indices, > the overhead to search overhead to reduced to about 10% as opposed to an > order of magnitude. > >I haven't seen anyone suggest structure for overview that's better than this. > >Anyone have ideas on how to improve on the above? I've thought about a CNFS >style mechanism, but I think we gain a lot currently by having the >records (at least logically) sequential. I also think we need to >rewrite expireover so that it doesn't bother to sort the overview >entries anymore. If we do that then we can eliminate the memory >footprint and cpu overhead of expireover. I've implemented a CNFS style mechanism in my own reader code, and am now working on enhancing it with caching. My methodology involves storing a pointer to the overview data (minus article number) in the history. To track groups, I have a database that tracks the articles in each group and maintains pointers into the history db. It works quite well and scales better than the overview file methodology currently used (I've only tested it up to 33,000 articles, though :). You do lose a lot by skipping through the the history, though not as much as I had originally thought. One of the advantages I like is that it will return overview data up to the instant it finishes working through the database (including new inserts and cancel processing)--no rebuilds or expires are necessary. I'm thinking now of doing a cyclical cache for the overview data. It would almost turn out to work like a cyclical LFS as I have it designed now. This would give the best of all worlds: complete cyclical operation, instant article addition, and better reading since overview data will be grouped together in the file. Plus, you could really "cache" instead of keeping all the data for all groups allowing on the fly generation with caching for the next request for the same data. I'm planning on doing what I think of as a "page based" cache. In my group database, each db page (maybe better said "bucket") tracks 30 articles. I'm going to add an offset into the cache for each page. This will give me within 30 article accuracy without having to store a pointer per article (which makes db caching harder because of the added storage of a 4 byte int per article). I'm curious if people have some stats on overview vs article storage requirements. My measurements so have been imprecise and are a little off of what INN does because I only write one copy of the overview regardless of crossposts at this point. I'm just concerned about whether there is any reason to allow for >32bit offsets into overview data (my max storage size presently is 1TB per store at 32 stores max. Each store has its own overview data store, though). -Chris
Technical Details
Message-ID:
<4E86915F977FD0119BCD08002BE28C4B045D58@exchange.maxwell.syr.edu>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:
<5unqlf$jfa@shell.monmouth.com> <5uo3j0$fah@dfw-ixnews1.ix.netcom.com> <5uphmp$86q$1@flea.best.net> <5upijp$2oi@shell.monmouth.com> <5upqc7$6tf$1@jake.probe.net> <86iuwfv14m.fsf@blah.erols.com>Show Full Headers
Complete Article Headers
Message-ID: <4E86915F977FD0119BCD08002BE28C4B045D58@exchange.maxwell.syr.edu> Subject: Re: NNRPD resource consumption Date: Fri, 05 Sep 1997 00:00:00 +0000 From: Christopher Sedore <cmsedore@maxwell.syr.edu> References: <5unqlf$jfa@shell.monmouth.com> <5uo3j0$fah@dfw-ixnews1.ix.netcom.com> <5uphmp$86q$1@flea.best.net> <5upijp$2oi@shell.monmouth.com> <5upqc7$6tf$1@jake.probe.net> <86iuwfv14m.fsf@blah.erols.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: 270129682 Sender: Christopher Sedore <cmsedore@maxwell.syr.edu> Newsgroups: news.software.nntp