[MUD-Dev] [TECH] Server Bottlenecks

Jim Purbrick Jpurbrick at climax.co.uk
Wed Sep 3 13:09:43 CEST 2003


Hi Daniel,

> Under NT, 'Task Manager' is all you need to discover if you are
> doing a lot of context switches. Just make sure you have
> view->'kernel times' checked.  If the red lines in your graph are
> overly high then you may have cause to investigate.

> A better tool is 'Pmon' from http://www.sysinternals.com/ . It
> shows thread creation/deletion and context switching (you need a
> checked build of windows or a multiprocessing box for the latter).

Thanks, I'll check them out.

> As JC mentions, its very hard to know if it really is a problem
> without more information. How many threads have you got? 10 isn't
> going to make much difference, 10,000 is (presuming you don't have
> lots of locking problems).  Also depending on your project how
> fast does it need to be?

Currently we've got a send and receive thread per-connection and
need to support ~2500 connections per box, so we're going to end up
with ~5000 threads.

> I'm guessing that your game is using TCP connections as it doesn't
> seem particularly natural to me to spawn huge numbers of threads
> for UDP. If so, is TCP the correct transport for your game in the
> first place?

No, TCP is wrong. Currently clients have TCP connections to front
end proxy servers, which create 1 TCP connection per client to back
end game servers.  We're going to move to UDP to the proxy servers
and should probably move to 1 TCP connection from each proxy server
to the game servers it needs to talk to, which will solve all the
threading issues in one go as no server will need thousands of TCP
connections. We'd have to do our own (de)multiplexing to work out
which client(s) a message is going to/from, but I don't think that's
a problem and will act as a port concentrator to avoid some of the
problems of many sockets. The only thing that 1 TCP connection per
client to the game server gives us is the ability to have the game
server respond to back pressure on a per-client basis, potentially
adjusting interest expressions for the client's player etc.

> p.s. Are you working on Warhammer Online?

Yes. I wasn't sure whether to introduce myself or just dive in with
the questions. I was wondering if anyone would make the
Climax-Warhammer connection ;-) I've been working on the network and
distribution aspects of Warhammer for nearly a year and previously
worked with Chris Greenhalgh at the University of Nottingham. This
list is a great resource and a really good compliment to the
academic CVE research I'm more familiar with from my time at
Nottingham. Thanks to everyone for your help. Hopefully I'll be able
to return the favour.
_______________________________________________
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