Mutli-core support?

fireshroomfireshroom Join Date: 2009-03-22 Member: 66856Members
Is it just me or does NS2 server doesn’t do a very good job with CPU scheduling and mutli-core support?

I have a 16 core server and does a horrible job utilizing them. Is there a -parameter that enables it or just bad server client for now?

Comments

  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Client has some multithreading (mainly rendering is done on a second thread), but the server doesn't have much iirc. Most of the servers running NS2 right now are actually locking each server instance to a single core. Its a known issue and UWE is working on increasing server performance (which is preferred method to just dumping stuff on other threads).
  • dePARAdePARA Join Date: 2011-04-29 Member: 96321Members, Squad Five Blue
    edited August 2012
    NS2 use only 1 core @ full load and around 5% of an 2nd core, no matter what ghz your cpu has.
    Wich mean: it use 25% on an quadcore @ 2ghz and 25% @ 5ghz.

    So, your 16 core wont help here. All you need is ghz. Thats why all good servers OCd ones around 4,5 ghz.

    Performance is getting better for sure, but thats the current state of the beta. (216)
  • falcfalc Join Date: 2011-03-18 Member: 87128Members
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->* Server CPU now idles in select() when no work to be done.
    * Server CPU spreads out work better to increase load resistance.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I noticed this in the changelog of 217. But i'm not quite sure how much this improves the usage of additional cores as i forgot to look at it yet.
  • matsomatso Master of Patches Join Date: 2002-11-05 Member: 7000Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer
    <!--quoteo(post=1968136:date=Aug 29 2012, 01:14 PM:name=falc)--><div class='quotetop'>QUOTE (falc @ Aug 29 2012, 01:14 PM) <a href="index.php?act=findpost&pid=1968136"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I noticed this in the changelog of 217. But i'm not quite sure how much this improves the usage of additional cores as i forgot to look at it yet.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Does not affect the use of additional cores.

    The server is mostly single threaded; it offloads some physics calcs and the preparation of outgoing packets to a second thread. The second
    part goes up with game size (more entities to prepare) and number of players (number of packets to prepare), but even at its best, it won't
    do more than 5-15% difference.

    There are some very parallel sections in the architecture that would be nice targets for multi-threading, but its strictly single threaded - for now.
  • falcfalc Join Date: 2011-03-18 Member: 87128Members
    <!--quoteo(post=1969959:date=Sep 2 2012, 06:00 AM:name=matso)--><div class='quotetop'>QUOTE (matso @ Sep 2 2012, 06:00 AM) <a href="index.php?act=findpost&pid=1969959"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Does not affect the use of additional cores.

    The server is mostly single threaded; it offloads some physics calcs and the preparation of outgoing packets to a second thread. The second
    part goes up with game size (more entities to prepare) and number of players (number of packets to prepare), but even at its best, it won't
    do more than 5-15% difference.

    There are some very parallel sections in the architecture that would be nice targets for multi-threading, but its strictly single threaded - for now.<!--QuoteEnd--></div><!--QuoteEEnd-->

    A difference is still a difference. ;)

    Anyway, thanks for clearing that up.
  • WarboyWarboy Join Date: 2012-09-05 Member: 157929Members, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    The primary thread for my server is at 90%, and the 2nd thread is at about 20% [under max players]

    It starts to feel laggy when I tested it higher then 18 players, also is there a ping limiter plugin yet?
Sign In or Register to comment.