NS2 Server lagging/chugging

Mikeym1Mikeym1 Join Date: 2012-11-16 Member: 171951Members
We are currently running an 8 core xeon with 16GB on a 100mbps burst port, and once the server hits 24 players, the server starts to chug (even though only at 10% CPU / 18% RAM) and lag every couple seconds teleporting players back a few seconds. We're unsure the cause, and was hoping somebody else had the same problem. We do see "Error! Maximum number of snapshots exceeded" once this begins to happen.

Comments

  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited November 2012
    Seems to be using one core, I take it you've got the affinity set to one core for server.exe and want to run at least 7 servers on there? Also what speed are the cores running at. I'm not sure but for a 24 player server, I think you need at least 4Ghz+
  • Mikeym1Mikeym1 Join Date: 2012-11-16 Member: 171951Members
    <!--quoteo(post=2026538:date=Nov 16 2012, 08:15 PM:name=Kouji_San)--><div class='quotetop'>QUOTE (Kouji_San @ Nov 16 2012, 08:15 PM) <a href="index.php?act=findpost&pid=2026538"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Seems to be using one core, I take it you've got the affinity set to one core for server.exe and want to run at least 7 servers on there? Also what speed are the cores running at. I'm not sure but for a 24 player server, I think you need at least 4Ghz+<!--QuoteEnd--></div><!--QuoteEEnd-->
    The server is running on all 8 cores (all processors) on high affinity (we've tested with lower affinity also) and the cores at 2.5Ghz each.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited November 2012
    Any instance of server.exe is only using one core and a tiny fraction of a second core, your clockspeed is also too low for a 24 player server. At 2.5 Ghz you may be able to run 10 to 12 player servers. If you want to have a server at 24players, the absolute minimum clockspeed is 4Ghz. If it is a 4 core CPU with 4HT cores, I'd turn off hyper threading as well, those virtual cores are not helping the performance for a NS2 server and will most likely cause more CPU stress.

    Core affinity should be set as such:
    0: Reserved for the OS (Windows)
    1: Server #1
    2: Server #2
    3: Server #3
  • DarkScytheDarkScythe Join Date: 2012-08-30 Member: 156876Members
    The server does not appear to be very heavily multithreaded at the moment, so although your 8 cores don't seem to be pegged very badly, it's mostly because it's only taxing one core, and the system is load-balancing across the cores. Pure clockspeed appears to be king right now.

    The issue you describe has to do with the server tick rate dying - type net_stats in your console when this occurs. It should nominally stay around 30, but when people start warping, it usually has dipped to 10 or below.
    Our server runs a 2.83GHz Q9550 and even with 16 players, the tick rate bounces between 15-25 in the late game.
  • Mikeym1Mikeym1 Join Date: 2012-11-16 Member: 171951Members
    <!--quoteo(post=2026551:date=Nov 16 2012, 08:30 PM:name=Kouji_San)--><div class='quotetop'>QUOTE (Kouji_San @ Nov 16 2012, 08:30 PM) <a href="index.php?act=findpost&pid=2026551"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Any instance of server.exe is only using one core and a tiny fraction of a second core, your clockspeed is also too low for a 24 player server. At 2.5 Ghz you may be able to run 10 to 12 player servers. If you want to have a server at 24players, the absolute minimum clockspeed is 4Ghz. If it is a 4 core CPU with 4HT cores, I'd turn off hyper threading as well, those virtual cores are not helping the performance for a NS2 server and will most likely cause more CPU stress.

    Core affinity should be set as such:
    0: Reserved for the OS (Windows)
    1: Server #1
    2: Server #2
    3: Server #3<!--QuoteEnd--></div><!--QuoteEEnd-->
    No, they are two actual CPUs.

    So there's no way to get it to use multiple cores at the moment?
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited November 2012
    No like I said, server.exe uses 1 core as much as it can and offloads some small parts to a second core. The offloading to the second core is negligible in terms of actual performance gain compared to cost per core for server (when renting one). It's the way servers applications for games usually are set up. But even that offloading is rare from what I heard, in terms of game server multi-threading.

    Gaming server hosts usually sell their servers per box based on available CPU cores. So in terms of cost for server, a Quad Core CPU being able to run 3 servers with core 0 for OS, is a common setup. There is that and to expand on this, a NS2 server is very dependent on pure brute CPU power in terms of GHz
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    NS2 servers do a small amount of multithreading, but not enough right now to make lower-clocked, many-cored CPUs viable for high playercount. The rough, rule of thumb is that
    24 Players = >4.0GHz CPU
    16 Players = >3.0GHz CPU
    8 Players = >2.0GHz CPU

    Also, you can lock down each server to one core, but I've personally haven't found it to improve performance. The two biggest things you can do to increase performance are 1) get a CPU with a higher clock speed (or overclock) and 2) disable EIST and C-states (the functions that downclock when the computer is idle), which have been known to make performance less stable.
  • xLithxLith Join Date: 2012-11-02 Member: 165969Members
    Maybe I'm lucky but I'm not exaggerating either. We run a 1GBPS BW, Xeon E3-1270 (3.5GHZ), 32GB RAM, W2K3 64bit, and 128GB SSD and host multiple games and it never struggles. I don't even set affinity. We have 3 TF2 servers, 2 Chivalry servers, CS:S, CS:GO, TS3, SQL, HLStatsX and of course 24 slot NS2. Most of those servers fill during prime time and I never see it struggle. Our CPU spends a lot of time around 70%.

    I'm astonished that you're struggling but maybe the pure clock speed does make that much of a difference.
  • DarkScytheDarkScythe Join Date: 2012-08-30 Member: 156876Members
    <!--quoteo(post=2027941:date=Nov 18 2012, 12:35 PM:name=xLith)--><div class='quotetop'>QUOTE (xLith @ Nov 18 2012, 12:35 PM) <a href="index.php?act=findpost&pid=2027941"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Maybe I'm lucky but I'm not exaggerating either. We run a 1GBPS BW, Xeon E3-1270 (3.5GHZ), 32GB RAM, W2K3 64bit, and 128GB SSD and host multiple games and it never struggles. I don't even set affinity. We have 3 TF2 servers, 2 Chivalry servers, CS:S, CS:GO, TS3, SQL, HLStatsX and of course 24 slot NS2. Most of those servers fill during prime time and I never see it struggle. Our CPU spends a lot of time around 70%.

    I'm astonished that you're struggling but maybe the pure clock speed does make that much of a difference.<!--QuoteEnd--></div><!--QuoteEEnd-->

    In terms of raw numbers, it does appear to dip a bit, or at least not be 100% stable.
    <a href="http://ns2servers.devicenull.org/servers/6709/69.162.82.210:27018" target="_blank">http://ns2servers.devicenull.org/servers/6...62.82.210:27018</a>
    Whether or not it's noticeable in-game, I'm not sure.

    From my experience, a lot of players seem to notice it, but then assume it's their own PC's rather than the server.
    Granted, this is on other servers that have this problem; I've never played on your server before, so I can't say.
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    <!--quoteo(post=2028172:date=Nov 18 2012, 01:54 PM:name=DarkScythe)--><div class='quotetop'>QUOTE (DarkScythe @ Nov 18 2012, 01:54 PM) <a href="index.php?act=findpost&pid=2028172"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->In terms of raw numbers, it does appear to dip a bit, or at least not be 100% stable.
    <a href="http://ns2servers.devicenull.org/servers/6709/69.162.82.210:27018" target="_blank">http://ns2servers.devicenull.org/servers/6...62.82.210:27018</a>
    Whether or not it's noticeable in-game, I'm not sure.

    From my experience, a lot of players seem to notice it, but then assume it's their own PC's rather than the server.
    Granted, this is on other servers that have this problem; I've never played on your server before, so I can't say.<!--QuoteEnd--></div><!--QuoteEEnd-->
    That's acceptable performance. My personal criteria for server performance is:
    Perfect = Almost no tickrate drop (29-30 all the time)
    Ideal = No drops lower than 20 tickrate
    Acceptable = No drops lower than 10 tickrate
    Bad/Unacceptable = Drops below 10 tickrate
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited November 2012
    Hmm I'd say 15 ticks is the acceptable limit, below that it is already very iffy in terms of hitting stuff and rubber banding...
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    I like numbers of never below 15 in any circumstances (except script errors, bugs), and never below 25 for a "standard" game of up to about 45 minutes. The only time I feel 25 to 15 is acceptable, is when people kind of expect it, like they can comfortably say "well we did spam 400 cysts" or similar.
  • xLithxLith Join Date: 2012-11-02 Member: 165969Members
    edited November 2012
    <!--quoteo(post=2028172:date=Nov 18 2012, 03:54 PM:name=DarkScythe)--><div class='quotetop'>QUOTE (DarkScythe @ Nov 18 2012, 03:54 PM) <a href="index.php?act=findpost&pid=2028172"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->In terms of raw numbers, it does appear to dip a bit, or at least not be 100% stable.
    <a href="http://ns2servers.devicenull.org/servers/6709/69.162.82.210:27018" target="_blank">http://ns2servers.devicenull.org/servers/6...62.82.210:27018</a>
    Whether or not it's noticeable in-game, I'm not sure.

    From my experience, a lot of players seem to notice it, but then assume it's their own PC's rather than the server.
    Granted, this is on other servers that have this problem; I've never played on your server before, so I can't say.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Interesting I didn't even know you could see stats like that. I've never noticed anything major. There's a few times when it's felt just a little off but like you said I just assumed it's my PC. I only remember noticing anything when it's like a major firefight with Onos/Exos/ARCs, etc. It is nice to see that chart. Thanks for sharing.

    Guessing average 20-25 with 24 players is decent?
Sign In or Register to comment.