🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #38674

Re: Diablo w/ history file on mfs?

#38674
From: Andrew Gierth
Date: Wed, 14 Jul 1999 00:00
24 lines
1888 bytes
>>>>> "Brad" == Brad Knowles <brad@shub-internet.org> writes:

 Brad>     On a related note, it is my understanding that Diablo will
 Brad> use mmap() on the history file (which will cause the data to be
 Brad> pulled into the buffer cache), up to a certain maximum size,
 Brad> and beyond that it will just use lseek() (which should avoid
 Brad> having the rest of the file pulled into buffer cache).

 Brad>     However, my C skills are extraordinarily rusty, and I'm not
 Brad> able to find any obvious HISTORY_MMAP_MAX definition within the
 Brad> source.  Can anyone tell me what the appropriate section of
 Brad> code is that makes this determination, and how it decides when
 Brad> to stop mmap()ing the history file and to start lseek()ing it
 Brad> past that point?

What it does, AIUI, is to mmap() the file header and hashtable that
appears at the start of the file (there's a define somewhere that sets
the size of the hashtable), and use lseek/read/write for the actual
history entries.

-- 
Andrew.

Technical Details
Message-ID: <874sj7hzfj.fsf@erlenstar.demon.co.uk>
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: <brad-1407991926010001@brad.techos.skynet.be>

Show Full Headers
Complete Article Headers
Message-ID: <874sj7hzfj.fsf@erlenstar.demon.co.uk>
Subject: Re: Diablo w/ history file on mfs?
Date: Wed, 14 Jul 1999 00:00:00 +0000
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
References: <brad-1407991926010001@brad.techos.skynet.be>
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: 501016571
X-Mayan-Date: Long count = 12.19.6.6.9; tzolkin = 7 Muluc; haab = 17 Tzec
X-Complaints-To: andrew@erlenstar.demon.co.uk
Organization: disorganised
X-Attribution: AG
X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29
X-P-Persistent-Headers: are a bad idea.
Newsgroups: news.software.nntp
X-Post-Filter: postfilter v0.6 alpha