Mustard010
01-21-2009, 05:50 PM
Hello all!
My questions are simple:
1.) Why are game servers single-threaded? Why can't they program game servers to work as a multi-threaded process?
2.) If game servers are so resource-intensive, why don't the developers optimize the "code" to run more efficiently? I understand that as more players join, the CPU usage grows exponentially, but isn't there a solution to optimizing these resource hogs?
Thanks
sirius
01-21-2009, 05:53 PM
* Moved to Specialty Hosting and Markets....
Sirius
Matt - Kerplunc
01-21-2009, 08:20 PM
1) I'm fairly certain that most game servers are multi-threaded now. All of Valve's Source servers are i think.
2) Developers definitely do optimize their code to run efficiently. There is only so much optimizing you can do, some things just use a lot of resources.
Mustard010
01-21-2009, 10:14 PM
How can one verify that a game server thread is truly multi threaded? Do Developer's like Valve release this information in their SDKs?
Matt - Kerplunc
01-22-2009, 02:52 AM
How can one verify that a game server thread is truly multi threaded? Do Developer's like Valve release this information in their SDKs?
I believe they release that information. Maybe look around on their developer wiki (http://developer.valvesoftware.com/wiki/Main_Page)
dasweb
01-23-2009, 03:34 AM
"Source’s renderer utilizes advanced processor technologies such as multi-core and SIMD"
http://developer.valvesoftware.com/wiki/Source_Engine_Features
:)
Felix Trogare
01-26-2009, 10:49 PM
Hi forum.
I am just beginning in Web Hosting; may you tell me what a game server is?
Thanks so much for your help!
Felix Trogare
New York University
jNive
01-27-2009, 05:29 PM
The game server however which do not do any rendering or client i/o are primarily single-core (non-parrallel, multi-thread) due to the realtime, linear nature of the server-side world-update calculations. When you do not need to do additional/simultaneous tasks such as get player input, or render to screen, then executing instructions in parrallel could cause issues with the time-based calculations of the majority of a game server. The percentage of code that could be run in parallel is pretty small, the majority of the CPU usage would still need to be sequential. (Note: just because a program runs on multiple cores doesnt mean it runs on all cores at the same time - the threads are moved around, but executed on one core at any one time)
Note: At least that has been the case up until recently unless there have been major changes in engines :-)