🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #41220

Re: History (was: Re: NoCeM & INN2.3)

#41220
From: Andrew
Date: Tue, 02 Nov 1999 00:00
46 lines
3323 bytes
In article <yld7ttpbug.fsf@windlord.stanford.edu>, Russ Allbery wrote:
>Well, the overflow code isn't so much buggy as just old and a rotted.  It
>was originally written for the case of either direct disk access or
>in-memory caching of the history file, and it relies on file holes when it
>extends the file.  I'm not sure if the code was ever checked with mmap to
>make sure that the mmap'd region extends properly when the first table
>overflows.

It never tries to extend the mmap region - access to overflow tables is
always via read/write (which is why excessive overflows murder the
performance).

>Anyway, replacement of records in place is another huge benefit of a
>binary history file format, yes.  (Well, a fixed-width format; you can get
>it without going binary, but I don't see much point.)  I was thinking
>about that more in the context of moving articles from one storage method
>to another than in the context of doing away with expire, but the latter
>would certainly be a nice bonus.  (expireover would still have to run, of
>course, and may still have to throttle the server on reading servers to
>deal with changing article history entries to non-article history entries,
>so it's not *that* exciting.)

In my case, I can do the necessary updates in another thread inside the
server anyway. Avoiding having to ever throttle in normal operation is a
goal of mine, and I have the luxury of not having to support non-threaded
systems.

>The trick, of course, is that right now the history file uses an extremely
>simple data structure; it's a pure hash table with linear probing.
[...]
>The obvious thing to do would be to put some amount of the arrival time
>into the mmap'd portion of the hash table, maybe only 16 bits of it to
>avoid increasing memory usage too badly, although you have to distinguish
>between history entries that are safe to expire (no corresponding article
>on the spool) and history entries that have to be retained.

Hmm... my solution was more subtle than that, and much more general-purpose
(I intend to use my code for lots of other things besides the history file,
including but not limited to the active file, the history cache, and
probably some spam-filtering databases too).

-- 
Andrew, Supernews
http://www.supernews.com - UK and US individual and corporate NNTP services

Technical Details
Message-ID: <slrn81u56b.r0u.andrew+news@uk21.supernews.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: <3819A774.9C57FDCA@boerde.de> <7vei02$1n3@bigred.inka.de> <ylu2n8cokb.fsf@windlord.stanford.edu> <7vhcis$oq9@bigred.inka.de> <yl7lk3llie.fsf@windlord.stanford.edu> <slrn81p29o.f2s.andrew+news@uk21.supernews.com> <yld7ttpbug.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrn81u56b.r0u.andrew+news@uk21.supernews.com>
Subject: Re: History (was: Re: NoCeM & INN2.3)
Date: Tue, 02 Nov 1999 00:00:00 +0000
From: andrew+news@supernews.com (Andrew)
References: <3819A774.9C57FDCA@boerde.de> <7vei02$1n3@bigred.inka.de> <ylu2n8cokb.fsf@windlord.stanford.edu> <7vhcis$oq9@bigred.inka.de> <yl7lk3llie.fsf@windlord.stanford.edu> <slrn81p29o.f2s.andrew+news@uk21.supernews.com> <yld7ttpbug.fsf@windlord.stanford.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-mail
X-Deja-AN: 543562798
X-Complaints-To: newsabuse@remarq.com
X-Trace: 941561036 .MYBPHMNN00017F00C uk21.supernews.com
Organization: RemarQ http://www.remarQ.com
User-Agent: slrn/0.9.5.4 (UNIX)
Reply-To: andrew@supernews.com
Newsgroups: news.software.nntp