🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #40190

Re: Diablo vs. INN questions...

#40190
From: Joe Greco
Date: Tue, 28 Sep 1999 00:00
56 lines
3555 bytes
In news.software.nntp article <1rn1u6y649.fsf@ganglot.ifi.uio.no>, Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
:[Joe Greco]
:
:>   :Well, the Diablo design didn't concentrate on latency at all, the
:>   :intended configuration would run the batches every five minutes.  The
:>   :realtime feeds are a hack.
:>   
:>   Hey, come on, that was mostly _my_ hack...  :-(  don't go insulting the
:>   hacks.
:
:Sorry! ;-)
:
:>   :Lars Olafsen has patched our Diablo[1] so that the dnewslink listens
:>   :on a pipe rather than polling the feed file every second.  This
:>   :improves latency quite a bit (it's down to less than a second), but
:>   :INN is of course faster still.
:>   
:>   Why's that?
:
:Uhm, well, we haven't timed it on the same hardware, so it's just a
:hunch.  The problem is that the select loop in the diablo master
:process is "overwhelmed" by all the incoming and outgoing
:communication, so it takes time between each time it visits a feed.

Argument in favor of my outgoing feed process idea, methinks...

Seriously, though, I'd think that this by itself wouldn't be a real
bottleneck.  Many programs manage to talk to huge fleets of descriptors
in a select oriented model, including dreaderd, X11, your average IRC
server, and INN - to name a very few.  If you're running into performance
bottlenecks, it is probably more because you're also running a filter
alongside Diablo, which is causing a lock-step delay in the select loop
processing.  Yeah, yeah, I know it's a crappy architecture, but this
thread has already covered some potential improvements.  And I can say
it's a crappy architecture since I chose that way to implement the
filter and I _know_ it's crappy.

:You see, the communication with the dnewslink process is via a two-way
:pipe.  dnewslink tells the diablo master how many bytes it has read
:from the pipe, so that the master knows when to stop jamming data into
:the pipe, avoiding write() blocking.  We chose this method since it
:was portable, but I am sure there are better ways of doing this
:communication.

Yeah, use nonblocking I/O and buffer up the overflow (or write it into
batch files).  That's portable too, but admittedly a bit more difficult
to code up.  Ultimately, you need something like that to be able to work
with nntplink or innfeed or the feed-tool-of-your-choice though, and if
I ever get some free time, I'd really like to work on that.  But my real
problem is (shhh!  don't tell anyone!) I'm not a real programmer, I'm
just a hacker who is good with C, and such large architectural changes
on someone else's code is a bit more than I usually like to tackle.

... JG

Technical Details
Message-ID: <37f15e8e$0$10174@news.execpc.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: <brad-2709991944100001@brad.techos.skynet.be> <1r7llcmch6.fsf@haey.ifi.uio.no> <37f058c1$0$7742@news.execpc.com> <1rn1u6y649.fsf@ganglot.ifi.uio.no>

Show Full Headers
Complete Article Headers
Message-ID: <37f15e8e$0$10174@news.execpc.com>
Subject: Re: Diablo vs. INN questions...
Date: Tue, 28 Sep 1999 00:00:00 +0000
From: jgreco@ns.sol.net (Joe Greco)
References: <brad-2709991944100001@brad.techos.skynet.be> <1r7llcmch6.fsf@haey.ifi.uio.no> <37f058c1$0$7742@news.execpc.com> <1rn1u6y649.fsf@ganglot.ifi.uio.no>
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: 530516738
Sender: jgreco@earth.execpc.com
X-Trace: S=T[4Gb?NPQI5[332>a9Y[bfNiaEHUgJWRYcgIRLSUE]_=?B_U>YR5Zdi=E`0kgm@P3LX7T::^=K\GhaMU<hZ^NWF4FfQ?Mh6U]
Organization: sol.net Network Services - Milwaukee, WI
Newsgroups: news.software.nntp
X-Complaints-To: abuse@execpc.com