🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #30036

Re: madvise() works (!)

#30036
From: Joe Greco
Date: Sun, 26 Jul 1998 00:00
33 lines
2444 bytes
In comp.unix.bsd.freebsd.misc article <6pg4rq$drt$1@flea.best.net>, dillon@best.net (Matt Dillon) wrote:
:    I've started messing with calling madvise() after mmap().  It 
:    actually works!  At least on FreeBSD systems.
: [...]
:    I see a major increase in disk efficiency and a noticeable decrease in
:    dnewslink latencies.  On news1.best.com with 76+ dnewslink's running each
:    disk was saturating at around 1000 sps (essentially a seek-bound situation)
:    After changing dnewslink to call madvise with MADV_SEQUENTIAL, each disk
:    is now saturating at 1800 sps.  (I am presuming that the extra information
:    read from disk is being put to good use since dnewslink dumps the whole
:    article over the network). 
: [...]
:This is *very* cool stuff.

This is why I begged John Dyson to implement these functions.  I use them
for a variety of things under INN to help optimize memory accesses, on the
theory that I have a better idea of how news utilizes data than the std
algorithms in the OS does.  It was the difference between 400 nnrp clients
and 300 nnrp clients w/o here.

madvise() also works on Solaris systems, although the interactions are a
bit more complex than on FreeBSD.  However, the last time I actually looked
at the implementations was quite a while ago, so it's quite possible that
FreeBSD's implementation has surpassed the Solaris implementation (I would
tend to expect that of John Dyson, John we miss you!!  ...)

I am quite happy to hear that these features might be used under Diablo,
someday soon, since I'm very aware of their performance-enhancing abilities.
(Did you ever integrate the poll-on-file stuff?)

... JG

Technical Details
Message-ID: <6pgjnb$5n1@newsops.execpc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <6pg4rq$drt$1@flea.best.net>

Show Full Headers
Complete Article Headers
Message-ID: <6pgjnb$5n1@newsops.execpc.com>
Subject: Re: madvise() works (!)
Date: Sun, 26 Jul 1998 00:00:00 +0000
From: jgreco@ns.sol.net (Joe Greco)
References: <6pg4rq$drt$1@flea.best.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 375167052
Sender: jgreco@earth.execpc.com
X-Trace: gotham-globe.newsops.execpc.com 901501483 5857 (None) 169.207.16.1
Organization: sol.net Network Services - Milwaukee, WI
Newsgroups: news.software.nntp,comp.unix.bsd.freebsd.misc
X-Complaints-To: abuse@execpc.com