[MUD-Dev] [TECH] Server Bottlenecks

Lazarus lazarus at ourplace.org
Tue Sep 23 20:56:23 CEST 2003


On Mon, 1 Sep 2003, Jim Purbrick wrote:

> Where are the normal bottlenecks in server scalability? I've seen
> a lot of posts suggesting that thread-per-connection
> implementations limit scalability due to context switching. Are
> there any tools for Windows/Linux for diagnosing context switching
> problems? I've <cough>inherited</cough> a multiple thread per
> connection network library and will need to prove that its the
> limiting factor before I get to change it. Where else are server
> bottlenecks found and which tools are useful for finding them? As
> the context switching issue shows, straight profiling isn't always
> enough.

The thread-per-connection model presents several technical
challanges. One is the perceived context swap overhead.  In reality,
this is not as big an issue as it was even a few years ago.  The
context swap overhead itself is not all that bad.  What is costly is
having large numbers of threads blocking on the same resource as
well as task queue management. Few operating systems manage this
well.  Combine this with a model that many online game servers
follow where many (most ) client inputs require read/write access to
server wide shared data, it becomes apparant that managing access to
shared data becomes second only to handling I/O as the main
bottlenecks in a server.

Might I suggest looking into the C10k projects

  http://www.kegel.com/c10k.html to start

for some discussion on managing the I/O bottleneck in large scale
network client server projects.

Then, whether you use a single thread servicing all connections as a
way to avoid critical region management, or use a small number of
service threads all with appropriate mutual exclusion protection to
server global region(s), or a number of special purpose service
threads each of which handle connection requests for a specific
critical region (having a chat service separate from the movement
service is an obvious example) become issues that set your server
apart from others.
_______________________________________________
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