Article View: news.software.nntp
Article #38261Re: Submitting to Freenix
From: Joe Greco
Date: Fri, 25 Jun 1999 00:00
Date: Fri, 25 Jun 1999 00:00
75 lines
4678 bytes
4678 bytes
In news.software.nntp article <yl3dzg28yw.fsf@windlord.stanford.edu>, Russ Allbery <rra@stanford.edu> wrote: :T William Wells <bill@twwells.com> writes: :> Russ Allbery <rra@stanford.edu> wrote: :>> T William Wells <bill@twwells.com> writes: : :>>> Or even better, give up the idea of a monolithic innd. Instead, have a :>>> collection of daemons, each devoted to a particular part of the :>>> "job". Incoming connections would get their own nntpd, which would :>>> talk to historyd, actived, and newsfeedd (for outgoing). Gosh, that sounds like something I outlined a few years back. ;-) :>> That's threads, except hellishly slower. : :> I don't think it'd be that much slower. Most of the "action" would still :> take place within each process (or thread). : :Except you're going to have to context-switch constantly, which is :expensive and is definitely going to add to your latency. And the IPC :will be even worse. I'm willing to bet that INN as it is currently :written will have a better latency than such a scheme. I'm willing to bet otherwise, unless INN has suddenly become radically different than in the days of 1.4*. INN essentially causes I/O streams to sleep while it is busy doing other things (like serving other streams and waiting on disk I/O). This performs poorly on a single-CPU system, and sucks rocks on a SMP system where your other CPU could be doing something useful like accepting data, but isn't. INN really loses while trying to read a large binary article from a peer. You get this "Read TCP buffered data... do something else... read TCP buffered data... do something else" behaviour that might be OK if you have a lot of innd main loop idle time, but really stinks if you are only coming around the full set of select file descriptors every five or ten seconds. With a 16K receive buffer, it could take an entire minute to receive a 900K binary post. So much for better latency. My Diablo sucks that whole thing right down right away and then does a cxw notifying the parent diablo process. :Diablo already does something like this; I believe Matt's said in the past :that he doesn't really care about getting the last bit of latency and that :his process model isn't really designed for it. What "isn't designed for it" is the outbound feeding system in Diablo. The inbound is fantastic for handling incoming news... or, at least, I can't point out any inefficiencies. Diablo's outbound feeding strategy loses because, unlike Cyclone or a lot of other transmission utilities, only one stream per feed object is sent in "real time". Something like Cyclone (or innfeed I believe) will let you associate one feed object with several output streams, lowering the latency by multiplexing articles among the available streams. In addition, INN feeds articles to a monolithic innfeed via IPC (and Cyclone presumably queues data for a thread) which is a neatly select()'able operation. Diablo uses whatever facility the OS may have available to do the equivalent of a "tail -f", and you may have a hundred processes each reading their own individual batch file in this manner. In addition, to get realtime performance, one must fflush() the output stream which results in a write-per-article to the batch file for _each_ feed. I guess I shouldn't bitch about that, I wrote that code. Heh. So Diablo really suffers a lot more on outbound. Doing anything about it is difficult, though. Rewriting the Diablo output code to be more INN-ish has been on my mind, which would allow one to use a feed system like innfeed. Realistically, though, the context switching isn't a problem. My two- CPU Diablo boxes do a thousand per second with enough spare CPU to run RC5 at 90% of one CPU. I get twice as many interrupts per second as I do cxw's. ... JG
Technical Details
Message-ID:
<37731731$0$374@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-mailReferences:
<7g24e7$ckh$1@info.cs.uofs.edu> <ylogi6qrhj.fsf@windlord.stanford.edu> <7ktqaa$k06$1@twwells.com> <yl3dzg28yw.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <37731731$0$374@news.execpc.com> Subject: Re: Submitting to Freenix Date: Fri, 25 Jun 1999 00:00:00 +0000 From: jgreco@ns.sol.net (Joe Greco) References: <7g24e7$ckh$1@info.cs.uofs.edu> <ylogi6qrhj.fsf@windlord.stanford.edu> <7ktqaa$k06$1@twwells.com> <yl3dzg28yw.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: 493659048 Sender: jgreco@earth.execpc.com X-Trace: nreader1.newsops.execpc.com 930289457 374 jgreco@169.207.16.1 Organization: sol.net Network Services - Milwaukee, WI Newsgroups: news.software.nntp X-Complaints-To: abuse@execpc.com