[MUD-Dev] [TECH] Server Bottlenecks

Daniel.Harman at barclayscapital.com Daniel.Harman at barclayscapital.com
Tue Sep 2 09:33:27 CEST 2003


From: Jim Purbrick [mailto:Jpurbrick at climax.co.uk]

> 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?

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).

> 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.

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?

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?

Dan

p.s. Are you working on Warhammer Online?
_______________________________________________
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