[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

10202: Re: [MUD-Dev] Multi-threaded mud server.

[Full Header] [Plain Text]
From: Jo Dillon <emily@thelonious.new.ox.ac.uk>
Newsgroups: nu.kanga.list.mud-dev
Date: Mon, 17 May 1999 17:09:54 +0100
References: [1] [2] [3] <-newest
Organization: Kanga.Nu
Jon A. Lambert (jlsysinc@ix.netcom.com) spake thusly:
> Here's a common example:
>  
> There exists a 400 mhz Pentium II single-processor with 64 Mb of memory 
> running Redhat Linux.  Running on the server is ftpd, httpd, telnetd,
> smptd, dns, a stock Diku mud server, a DGD LP mud server, and a ColdMUD 
> server.  The server is probably underloaded.   
> 
> Is there context switching going on here?  YES! Loads and loads of the 
> "expensive" process-level context switching.  
> 
> <rant>
> Now suppose I wish to redesign and multi-thread that Diku mud server.  
> Why would I WORRY about the overhead of "cheaper" thread-level context 
> switching?
> Why should I CARE at the application-level how many processors are 
> present on the friggin box!?!@#!??
> </rant>
> 

  Isn't the point that every time you context switch you invalidate the
cache (since the new thread of execution will be in a different chunk of
memory to the old one), and therefore if you have more threads than 
processors you context-switch <bignum> times a second, therefore constantly 
invalidating your cache and giving yourself a big speed hit?

--
	Jo





_______________________________________________
MUD-Dev maillist  -  MUD-Dev@kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev