Article View: news.software.nntp
Article #38262Re: Submitting to Freenix
From: Russ Allbery
Date: Fri, 25 Jun 1999 00:00
Date: Fri, 25 Jun 1999 00:00
71 lines
4349 bytes
4349 bytes
Joe Greco <jgreco@ns.sol.net> writes: > 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. Oh, you'll definitely get throughput improvements with multiple processes. I just don't find that problem particularly interesting, since in my experience INN without overview has more than enough throughput to spare, and with overview writing overview becomes the overwhelming problem and nothing else is worth optimizing. What multiple processes aren't going to help with is *latency*, except possibly in the case of a large number of large articles (and splitting your incoming feeds will fix that for small articles, although large articles are still going to be slow). And doing those context switches is going to hurt your latency for small articles fairly badly, I think. > 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. I've never seen innd without tons of main loop idle time. I don't think I've seen it drop below 40% idle even when it's taking in 75 articles a second. Maybe on traditional spool, but then your disk effects are dominating, not your TCP reads. >> 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. Well, yeah, but you need both. Latency is how fast you can turn articles around. Both INN and Diablo suffer from the fact that they're doing IPC and context switching to get an article out the door. INN is also writing the article to disk and then reading it back in again, which really sucks. For a really fast transit server, you want innfeed running as a thread inside innd, which then just hands it a buffer that it blats out to all your peers at the same time that another thread is writing it out to disk. > 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. It's not just the context switches; it's sharing data. Threading innd by itself is going to improve matters, but probably not drastically. Threading innfeed, ditto. But once they're both threaded, there's no reason not to just run them as the same process, and then transit becomes *blazingly* fast. I got a 17% improvement out of INN's Perl filters just by not doing a needless copy of the article. Using IPC to talk to another daemon is *two* needless copies, through kernel space no less. Now you can duplicate the same effect in shared memory, but between shared memory and threads I'd really rather write threads. -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Technical Details
Message-ID:
<ylg13gyawh.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-mailReferences:
<7g24e7$ckh$1@info.cs.uofs.edu> <ylogi6qrhj.fsf@windlord.stanford.edu> <7ktqaa$k06$1@twwells.com> <yl3dzg28yw.fsf@windlord.stanford.edu> <37731731$0$374@news.execpc.com>Show Full Headers
Complete Article Headers
Message-ID: <ylg13gyawh.fsf@windlord.stanford.edu> Subject: Re: Submitting to Freenix Date: Fri, 25 Jun 1999 00:00:00 +0000 From: Russ Allbery <rra@stanford.edu> References: <7g24e7$ckh$1@info.cs.uofs.edu> <ylogi6qrhj.fsf@windlord.stanford.edu> <7ktqaa$k06$1@twwells.com> <yl3dzg28yw.fsf@windlord.stanford.edu> <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-mail X-Deja-AN: 493688143 Organization: The Eyrie Newsgroups: news.software.nntp