🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #47194

Re: Still having history problems

#47194
From: Russ Allbery
Date: Thu, 29 Jun 2000 00:00
40 lines
2713 bytes
Ronald Hello <hello@cs.utwente.nl> writes:
> Russ Allbery <rra@stanford.edu> writes:

>> It's basically just a straight hash table, where any collision kicks
>> the previous entry out.  So it pulls the first X bytes off the front of
>> the message ID hash, where X is sufficient to address the entire
>> history cache, and stores the message ID hash in that location in the
>> cache.  The entire cache is flushed every night when the history file
>> is reloaded after expire (or at least that's what it looks like to me).

> So you'd expect cache misses to be high in the first few hours after
> expire and to drop during the day ...

Right.

> Feeds with backlogs or with problems keeping up (both offering you
> articles far too late) seriously damage cache performance.

Right.  The ideal case is where all of your peers offer the same article
in close succession, far enough apart to avoid deferrals but otherwise
within a few seconds of each other.

> And the cache has no need for more entries then some 1.25 to 1.5 times a
> daily feed (just guessing, but hash distributions based on this
> mechanism can't be all bad).  Right?

Right.

> Apart from some memory consumption, no negative effect are to be
> expected from a oversized cahce-size. Do I understand that right?

Yup.  And actually, looking at this code right now, you *don't* need a
power of two because it doesn't do quite what I thought it would.  (It
copies the beginning of the message ID hash into an unsigned int and then
takes the modulus relative to the history cache size to get the index.)

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

Technical Details
Message-ID: <yllmzohlic.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
References: <8jcp64$96q$1@ares.cs.utwente.nl> <yl66qts4s9.fsf@windlord.stanford.edu> <8jer9a$4b6$1@ares.cs.utwente.nl> <ylem5hj7jj.fsf@windlord.stanford.edu> <8jeu9g$65v$1@ares.cs.utwente.nl> <ylr99hhqyq.fsf@windlord.stanford.edu> <8jf08h$71p$1@ares.cs.utwente.nl> <yl8zvoj29m.fsf@windlord.stanford.edu> <8jf3g2$882$1@ares.cs.utwente.nl> <ylwvj8hmv0.fsf@windlord.stanford.edu> <8jf57k$882$2@ares.cs.utwente.nl>

Show Full Headers
Complete Article Headers
Message-ID: <yllmzohlic.fsf@windlord.stanford.edu>
Subject: Re: Still having history problems
Date: Thu, 29 Jun 2000 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <8jcp64$96q$1@ares.cs.utwente.nl> <yl66qts4s9.fsf@windlord.stanford.edu> <8jer9a$4b6$1@ares.cs.utwente.nl> <ylem5hj7jj.fsf@windlord.stanford.edu> <8jeu9g$65v$1@ares.cs.utwente.nl> <ylr99hhqyq.fsf@windlord.stanford.edu> <8jf08h$71p$1@ares.cs.utwente.nl> <yl8zvoj29m.fsf@windlord.stanford.edu> <8jf3g2$882$1@ares.cs.utwente.nl> <ylwvj8hmv0.fsf@windlord.stanford.edu> <8jf57k$882$2@ares.cs.utwente.nl>
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: 640335083
Content-Type: text/plain; charset=us-ascii
Organization: The Eyrie
Mime-Version: 1.0
User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.1 (Biscayne)
Newsgroups: news.software.nntp