[MUD-Dev] [TECH] Server Bottlenecks
ceo
ceo at grexengine.com
Thu Sep 4 11:26:52 CEST 2003
Eamonn O'Brien wrote:
> So the question basically is this, "What is the major advantage of
> highly multithreaded design that I am missing out on?". The mud I
> am
...and while I was looking at the Kegel link (quoted in my last
post), I noticed this, which I don't remember reading before:
http://www.usenix.org/events/hotos03/tech/full_papers/vonbehren/vonbehren_html/
"We examine the claimed strengths of events over threads and show
that the weaknesses of threads are artifacts of specific threading
implementations and not inherent to the threading paradigm. As
evidence, we present a user-level thread package that scales to
100,000 threads and achieves excellent performance in a web
server. We also refine the duality argument of Lauer-Needham,
which implies that good implementations of thread systems and
event systems will have similar performance."
...although I have seen a few attacks on Lauer and Needham's duality
argument recently (which IIRC is merely a multi-processing specific
version of the Church/Turing hypothesis, and goes roughly "any
system you could implement with threads could equally well be
implemented with events; effectively, they are the same").
Ah yes, a quote from the vonbehren paper: "Lauer and Needham
attempted to end the discussion in 1978 by showing that
message-passing systems and process-based systems are duals, both in
terms of program structure and performance characteristics"
But this is like saying that an O(N) algorithm is just as fast as an
O(N) algorithm - or faster than an O(N^2) algo. If the hidden
constant of proportionality is high enouhg, O(N^2) could actually be
faster in all practical situations (IIRC that occurs in some matrix
algorithms; until you start working with matrices of 4x4 or greater,
the N-squared algo is actually faster/easier.).
So, I've seen several claims along the lines of "in general,
averaged out over all systems, Lauer-Needham is correct; but in many
specific cases, it doesn't hold true - and some of these exceptional
cases are quite typical in server/OS applications".
Adam M
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list