[MUD-Dev] Multi-threaded mud server.

Jo Dillon emily at thelonious.new.ox.ac.uk
Mon May 17 17:09:54 CEST 1999


Jon A. Lambert (jlsysinc at 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 at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev




More information about the mud-dev-archive mailing list