🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #38281

News server architecture (was: Submitting to Freenix)

#38281
From: Russ Allbery
Date: Sat, 26 Jun 1999 00:00
59 lines
3110 bytes
T William Wells <bill@twwells.com> writes:

> A context switch does not involve serious overhead. It's just a matter
> of entering the kernel, fiddling a few registers and loading others, and
> leaving the kernel. That's CPU time but measured in microseconds; it's
> just not terribly significant compared to other delays. Admittedly, a
> good thread context switch is faster, since it can skip the kernel
> entry/exit, but the difference just isn't meaningful compared to other
> slowdowns in the process.

The big difference between a context switch between threads and a context
switch between processes isn't really the kernel entry/exit; threads have
been implemented as full kernel processes on a lot of architectures and
still have a significant speedup.  The difference is that you don't have
to do a TLB flush.

Now admittedly because people have been doing separate processes a lot
more than separate threads, a lot of hard work has gone into making TLB
flushes fast.  You all have convinced me that I'm considering this to be
more significant than it probably is.

> Ultimately, you can't get rid of the delays -- what you can do is
> arrange things so that whenever one part of the system delays, other
> parts can take over. The present innd design doesn't allow that, since
> the delays processing one input prevent return to the main loop. A
> threaded implementation, or a multi-process implementation, can avoid
> this problem.

True.

> INN does not rely on mmap.

Does now, in 2.3 CURRENT.  It would be nice to fix that, I agree, but I'm
not sure if it will happen before the release.

> It can *use* mmap if it's available and works. But there are still buggy
> implementations of mmap out there.... I suspect that'll be the state of
> affairs regarding threads, for a long time.

Quite probably; the Highwind folks have been blazing the trail there for
us some and discovering what platforms really don't have working thread
implementations.  :)

> True. You'd want to have, as part of the API, a means to say "don't
> initiate anything you don't have to". Configuration changes are another
> icky kettle of fish.

Yeah.

> whispered: (overview)
> :)

That's looking a *lot* better.  But the same batch of patches that fixed
that caused us to depend on mmap().

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Technical Details
Message-ID: <ylogi3s8qs.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
References: <7g24e7$ckh$1@info.cs.uofs.edu> <ylogi6qrhj.fsf@windlord.stanford.edu> <7ktqaa$k06$1@twwells.com> <yl3dzg28yw.fsf@windlord.stanford.edu> <7l127f$24lt$1@twwells.com>

Show Full Headers
Complete Article Headers
Message-ID: <ylogi3s8qs.fsf_-_@windlord.stanford.edu>
Subject: News server architecture (was: Submitting to Freenix)
Date: Sat, 26 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> <7l127f$24lt$1@twwells.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: 494066850
Organization: The Eyrie
Newsgroups: news.software.nntp