Server Performance

causticsodacausticsoda Join Date: 2012-04-30 Member: 151327Members
<div class="IPBDescription">Server Requirements, tips and tricks</div>Hi all,

I have a couple of questions related to server performance:

1) Currently, what would be the recommended specs to run a well performing Natural Selection 2 Server? Can any server admins share what hardware they are running their server on, what what kind of performance levels (tickrate etc) they are seeing.


2) I recently set up a 16 player server on a Dual CPU Xeon E5645 (12x 2.4GHz Cores) server with 48GB RAM, and have seen very poor performance, with tickrate between 3 and 6 during a game with 16 Players. Is there any tweaks I can make to the OS or NS2 configuration to improve performance? Should I be expecting better performance with my hardware?

Thanks all for your help.

Comments

  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    Raw single-threaded CPU-horsepower is about all that matters. 2.4GHz won't get you anywhere near decent tickrates, think more along the lines of between 4 and 5 GHz (sandybridge cycles).
  • FloodinatorFloodinator [HBZ] Member Join Date: 2005-02-22 Member: 42087Members, Reinforced - Shadow
    Player has right.
    All you can do to get a better performance, is to lower the maximum slots to 8-12.
  • causticsodacausticsoda Join Date: 2012-04-30 Member: 151327Members
    <!--quoteo(post=1932139:date=May 1 2012, 06:11 PM:name=player)--><div class='quotetop'>QUOTE (player @ May 1 2012, 06:11 PM) <a href="index.php?act=findpost&pid=1932139"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Raw single-threaded CPU-horsepower is about all that matters. 2.4GHz won't get you anywhere near decent tickrates, think more along the lines of between 4 and 5 GHz (sandybridge cycles).<!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks player, I am interpreting from those requirements that NS2 Server currently runs on a single core?

    I'll have to look into if I can get a CPU with a higher clockrate, do Intel even sell 4-5GHz SB Xeons?

    Cheers.
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    I think you'll find most dedicated-servers for games are decidedly single-threaded (it's the nature of game-logic).

    That 4-5GHz I quoted were a reference to the current top-servers for NS2, which are all running desktop overclocked Sandybridges, the fastest most similar server-based hardware you might find is a 3.8GHz (or thereabouts) Xeon. I believe invTempest suggested the slot\performance-curve was an exponential one, so dropping from 16 to 12 should already yield a significant tickrate-increase.
  • causticsodacausticsoda Join Date: 2012-04-30 Member: 151327Members
    edited May 2012
    Thanks again player, I have dropped my server to 12 Slots, will see how it goes.
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    With the current build, 4.5 GHz will get you a mostly smooth 16 player server (i.e. above 10 ticks/s for the vast majority of a match). NS2 is multithreaded server-side (I believe some of the physics calculations are handled on another thread), but the vast majority, including the bottlenecks, run on a single thread, hence the need for a hefty single-core clock speed. Your only options atm are either to 1) get a higher clock speed server or 2) reduce the server playercount.
  • CLARK_KENTCLARK_KENT Vancouver, Canada Join Date: 2002-11-21 Member: 9508Members, Reinforced - Silver
    Sorry to partially jack this thread, but ScardyBob, is the client-side single-threaded? I think that might be the case, which is why a faster clocked CPU works better? But then I tried to set affinity to one core only, and received an FPS drop?
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    <!--quoteo(post=1932365:date=May 1 2012, 10:32 PM:name=Furious_Gorge)--><div class='quotetop'>QUOTE (Furious_Gorge @ May 1 2012, 10:32 PM) <a href="index.php?act=findpost&pid=1932365"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Sorry to partially jack this thread, but ScardyBob, is the client-side single-threaded? I think that might be the case, which is why a faster clocked CPU works better? But then I tried to set affinity to one core only, and received an FPS drop?<!--QuoteEnd--></div><!--QuoteEEnd-->
    This game does multithread. It just doesn't/can't do it well. The bottleneck is game logic and game logic is next to impossible to multithread, as things happen in succession.
    E.g. you can't process movement before you check whether the player is actually already dead. You can't check whether he's dead before applying damage to him. You can't apply damage before checking whether he was hit. And so on.

    You will always get better FPS by overclocking your CPU, in any game. It's just that NS2 is severely bottlenecked on the CPU side, which is quite the opposite of almost all other games out there, which are mostly GPU bound. That is why you see much greater benefits in NS2.
  • invTempestinvTempest Join Date: 2003-03-02 Member: 14223Members, Constellation, Squad Five Blue
    Client side is multi-threaded - You don't want to limit NS2 to a single core on the client side as both the game logic and rendering will be done on the same core effectively lowering your FPS.

    The server is multi-threaded, however I believe that only physx calculations are done on a different thread. There are only very slight gains to server performance (3-5% tops) when running a server with more than 1 core.

    The preferred CPU that I use for all my servers is the i5 2500k due to the fact that it can be overclocked to 4.4+ Ghz while staying below 70 degrees C (1u chassis) while running 3 NS2 servers 24/7. Your hardware would be able to power through any normal game with ease but NS2 is still very much unoptimized and as such it currently requires a very high single core clock speed to run it effectively.

    Going the route I posted above would mean that you would need to custom build your own server as no GSP or dedicated server provider (other than ns2servers.com) offers overclocked hardware for rent.
  • Omega_K2Omega_K2 Join Date: 2011-12-25 Member: 139013Members, Reinforced - Shadow
    <!--quoteo(post=1932365:date=May 1 2012, 10:32 PM:name=Furious_Gorge)--><div class='quotetop'>QUOTE (Furious_Gorge @ May 1 2012, 10:32 PM) <a href="index.php?act=findpost&pid=1932365"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Sorry to partially jack this thread, but ScardyBob, is the client-side single-threaded? I think that might be the case, which is why a faster clocked CPU works better? But then I tried to set affinity to one core only, and received an FPS drop?<!--QuoteEnd--></div><!--QuoteEEnd-->

    It currently runs in 2 threads. One of these threads does the majority of work (about 5 times as much as the other one), so basically you are most of the time waiting on that singel thread which is why better clock speeds help.
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    <!--quoteo(post=1932486:date=May 2 2012, 03:20 AM:name=Omega_K2)--><div class='quotetop'>QUOTE (Omega_K2 @ May 2 2012, 03:20 AM) <a href="index.php?act=findpost&pid=1932486"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It currently runs in 2 threads. One of these threads does the majority of work (about 5 times as much as the other one), so basically you are most of the time waiting on that singel thread which is why better clock speeds help.<!--QuoteEnd--></div><!--QuoteEEnd-->
    I seriously doubt it's only 2 threads. I'd say at least one for physics, sound, rendering tasks, animations, networking and game logic each, most likely more.
  • causticsodacausticsoda Join Date: 2012-04-30 Member: 151327Members
    after dropping to 12 players tickrate runs at around 8-15. better, but still not a great playing experience.
  • Omega_K2Omega_K2 Join Date: 2011-12-25 Member: 139013Members, Reinforced - Shadow
    Looking at CPU usage and the profile output it seems to be true though. I just checked again and it seems there are additonal threads, but they are mostly nelgible.

    Thread 1: Almost verything, taking up majority up cpu time (this is what most lilky keeps one core at 100%)
    Thread 2: "Finish rendering" (this is what keeps one core at something like 30% :P)
    Thread 3: Colliisions
    some extra threads that occasionnaly do something memory related appear as well
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    edited May 2012
    <!--quoteo(post=1933109:date=May 3 2012, 05:56 PM:name=Omega_K2)--><div class='quotetop'>QUOTE (Omega_K2 @ May 3 2012, 05:56 PM) <a href="index.php?act=findpost&pid=1933109"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Looking at CPU usage and the profile output it seems to be true though. I just checked again and it seems there are additonal threads, but they are mostly nelgible.

    Thread 1: Almost verything, taking up majority up cpu time (this is what most lilky keeps one core at 100%)
    Thread 2: "Finish rendering" (this is what keeps one core at something like 30% :P)
    Thread 3: Colliisions
    some extra threads that occasionnaly do something memory related appear as well<!--QuoteEnd--></div><!--QuoteEEnd-->
    CPU usage does not indicate how many threads are being used. The only limit is that you can't have more than (Threads/Corecount) usage. Yes, it is true that one of the threads does the most work (or the slowest work, depending on how you look at it). That's why clock speed matters so much. It's a matter of wording. If you state that it only uses two threads because it can't saturate two cores, it's simply wrong.
Sign In or Register to comment.