Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2003
    Location
    VA
    Posts
    142
    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

  2. #2
    Join Date
    Nov 2002
    Location
    WebHostingTalk
    Posts
    8,901
    * Moved to Specialty Hosting and Markets....
    Sirius

  3. #3
    Join Date
    Dec 2007
    Posts
    612
    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.

  4. #4
    Join Date
    Oct 2003
    Location
    VA
    Posts
    142
    How can one verify that a game server thread is truly multi threaded? Do Developer's like Valve release this information in their SDKs?

  5. #5
    Join Date
    Dec 2007
    Posts
    612
    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)

  6. #6
    Join Date
    Oct 2003
    Location
    VA
    Posts
    142
    Thank you sir

  7. #7
    dasweb Guest
    "Source’s renderer utilizes advanced processor technologies such as multi-core and SIMD"
    http://developer.valvesoftware.com/wiki/Source_Engine_Features

  8. #8
    Felix Trogare Guest
    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

  9. #9
    Join Date
    May 2005
    Location
    New York
    Posts
    737
    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 :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •