🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #38266

Re: Submitting to Freenix

#38266
From: Chris Sedore
Date: Fri, 25 Jun 1999 00:00
86 lines
5328 bytes
[somewhat trimmed]
Joe Greco wrote in message <3773780d$0$374@news.execpc.com>...
>In news.software.nntp article <ylg13gyawh.fsf@windlord.stanford.edu>, Russ
Allbery <rra@stanford.edu> wrote:
>: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.
>
>In my experience, that's not true...  and I ran things like MD5-based
>article storage and CNFS before most of the rest of the world had even
>heard of them.  This is, of course, not with current revisions, but my
>experiences did do a great job of pointing out architectural flaws (and
>innd-timer was part of all that).
>
>First off, I will (of course) immediately concede that a good design
>with real threads would beat either Diablo or INN quite easily.


Threads are not the only possibility:  async IO can provide an alternative
design methodology.

I've been playing with a transit engine running on FreeBSD that is single
threaded and uses aio routines (which are also standardized and appearing
widely in Unix implementations, though I've tweaked this one from stock
sources and added at least one thing not in the standard to make up for
missing real-time signals in FreeBSD).  It doesn't have trouble with IO on
incoming feeds (the outgoing feeds take about 45 seconds to pick up, so they
haven't yet kicked in--unfortunately most backlogs don't last long enough to
see how it fairs when both are running flat out) :

           input        (Total)           output
   packets  errs      bytes    packets  errs      bytes colls
      1809     0    3257897        891     0      98597     0
      1924     0    4075061        930     0     227497     0
      2233     0    2264377       1109     0     138921     0
      3197     0    2987793       1598     0      98647     0
      1485     0    2261637        791     0      91590     0
      1887     0    6675199        920     0     190608     0
      1634     0    9529512        849     0     206752     0
      4689     0    8909461       2170     0     239357     0
     12466     0    9499728       4987     0     193668     0
      6421     0    9778203       2483     0     180523     0
      6521     0   10294603       2277     0     200523     0
      6886     0    7840352       2567     0     177535     0
      5354     0    2766388       2107     0     125505     0
      2059     0    2919413       1035     0     111776     0
      1981     0    2185197        992     0     109553     0
      1488     0    2624960        779     0      85456     0
      1912     0    3740051        935     0     165187     0
      2562     0    3440910       1201     0     157444     0
      2470     0    4002023       1252     0     159650     0

I've seen peaks of 360 incoming articles/second, and it is just loafing at
50-70 articles per second..  This machine is a 512MB PII-400, so it isn't
puny hardware.  Just one disk (system and spool) and a single full-duplex
100Mbit link.

As Joe correclty pointed out (in a part trimmed), you have to be careful wrt
threads packages.  FreeBSD's threads are userland wrappers around select(),
etc and they really won't do anything significant to improve the situation.
I believe Linux is in this boat also.  (Both offer kernel threads, but the
implementations are a bit immature and suffer from other problems).

One other area worth noting is select().  Select becomes considerably less
efficient as more connections are added to check.  For the aio routines
(which are not as efficient as I hope they will eventually be), there is a
crossover at about 40 descriptors where it becomes faster to use aio
routines over select.  The crossover is FreeBSD specific, but I suspect it
holds true for any OS that implements select() by running through the
descriptor table and setting a flag for each.

-Chris



Technical Details
Message-ID: <9303290311991906734-1@dp-news.maxwell.syr.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
References: <7g24e7$ckh$1@info.cs.uofs.edu> <yl3dzg28yw.fsf@windlord.stanford.edu> <37731731$0$374@news.execpc.com> <ylg13gyawh.fsf@windlord.stanford.edu> <3773780d$0$374@news.execpc.com>

Show Full Headers
Complete Article Headers
Message-ID: <9303290311991906734-1@dp-news.maxwell.syr.edu>
Subject: Re: Submitting to Freenix
Date: Fri, 25 Jun 1999 00:00:00 +0000
From: "Chris Sedore" <cmsedore@maxwell.syr.edu>
References: <7g24e7$ckh$1@info.cs.uofs.edu> <yl3dzg28yw.fsf@windlord.stanford.edu> <37731731$0$374@news.execpc.com> <ylg13gyawh.fsf@windlord.stanford.edu> <3773780d$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: 493830360
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Newsgroups: news.software.nntp