Thoughts on a server

douchebagatrondouchebagatron Custom member title Join Date: 2003-12-20 Member: 24581Members, Constellation, Reinforced - Shadow
edited February 2011 in NS2 General Discussion
<div class="IPBDescription">from some dude who ran a server</div>So I ran a server all day yesterday and today. mostly because I was curious about the whole tickrate issue.

to start, here are my computer specs:

Intel core i7 920 @ 2.67GHz
3 GB ram
64 bit OS
Radeon HD 5770

I ran this server all day today, started it this morning before work at about 8am, came home to see no one had touched it at 5pm, then joined the server myself. at this point the idle server was still running at 25-30 ticks per second.

I idled in the server and left for a few hours, came back at 8pm to see the server full with people playing. server still running at 25-30 ticks per second.
I experienced a similar situation last night, where I was playing for about 2 hours with the server never dipping below 20 ticks per second, and averaging around 25.

While the tick rate was staying fairly high, people did complain about lag. I couldn't get any straight answers from anyone, but I'm betting I can attribute this to me running this off a home connection, and even doing it over wireless at that. no one had a terrible ping, but I can't find anything else that could be wrong.

I can't seem to figure out why my tickrate stayed around 30 the whole time, while every other server I connect to has trouble ever getting above 20. Is it my machine? or is there something with my setup that is preventing server degrading?

The only thing I can imagine that's different is that I'm running it off of a slower internet connection. Only way I can imagine that affecting anything is if the packets are coming in/out at a rate that lua can manage with garbage collection, but could that really even be the problem?

Also something interesting: I saw an incredibly regular spiking of processor power. Would that be from garbage collection too?

Comments

  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    What kind of a connection are we talking about? A consumer-grade internet-connection? Because those can be quite slow on the upload-front.
  • SquidgetSquidget Join Date: 2003-06-13 Member: 17334Members
    <!--quoteo(post=1831011:date=Feb 9 2011, 11:34 PM:name=6john)--><div class='quotetop'>QUOTE (6john @ Feb 9 2011, 11:34 PM) <a href="index.php?act=findpost&pid=1831011"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Also something interesting: I saw an incredibly regular spiking of processor power. Would that be from garbage collection too?<!--QuoteEnd--></div><!--QuoteEEnd-->

    As a programmer, this stands out. How "regular" is regular? Repeatability exposes bugs. Especially time-based repeatability.

    While I wouldn't ask you to bust out some advanced tools like Proc Explorer, could you at make a Task Manager screenshot of CPU Usage to show HOW regular? Bonus points for timing the interval, too, since Task Manager doesn't record timestamps.

    As to your question, modern versions of Lua (since 2006) are supposed to spread garbage collection (GC) over time, avoiding spikes that would cause latency (aka stutter). In theory, the GC shouldn't be spiking the CPU constantly unless there's some pathological memory abuse going on.

    Disclaimer: from bitter experience in embedded programming, I know there are so many edge cases, exceptions, and nuances that it's impossible know definitely unless you are really observing the program in action. tldr: Optimization is the devil.
  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    The simplest way to see the GC hitching is turning on "o_stats" in-game. Be warned, your fps will drop to single digits; however, every time the GC kicks in, you can see the objects and memory usage drop at the same time the "hitch" occurs. It's rather exaggerated with o_stats enabled, but in practice the effect is the same.
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    I've noticed that with 14 players my server will use about 2.5mbps upload, and negligible download.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    <!--quoteo(post=1831049:date=Feb 10 2011, 02:33 AM:name=endar)--><div class='quotetop'>QUOTE (endar @ Feb 10 2011, 02:33 AM) <a href="index.php?act=findpost&pid=1831049"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I've noticed that with 14 players my server will use about 2.5mbps upload, and negligible download.<!--QuoteEnd--></div><!--QuoteEEnd-->

    so its what max has said recently regarding solving how GC interfaces with C++ as being the issue alongside server stability, and once these are fixed the apparent "lag" people will be experiencing due to tick rate will disappear. (didnt he mention something regarding drastically re writing the Occlusion Culling as well to help?)
    since his only technical tasks listed currently are two, and they are simple, something tells me he is really focusing on these parts..
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    <!--quoteo(post=1831025:date=Feb 10 2011, 08:07 AM:name=McGlaspie)--><div class='quotetop'>QUOTE (McGlaspie @ Feb 10 2011, 08:07 AM) <a href="index.php?act=findpost&pid=1831025"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The simplest way to see the GC hitching is turning on "o_stats" in-game. Be warned, your fps will drop to single digits; however, every time the GC kicks in, you can see the objects and memory usage drop at the same time the "hitch" occurs. It's rather exaggerated with o_stats enabled, but in practice the effect is the same.<!--QuoteEnd--></div><!--QuoteEEnd-->

    o_stats is more usefull to see what makes the memory grow. If you just want to see the hitches profile 1 is perhaps more usefull. But it is true that with profile 1 you wont see what caused the hitch (well, you can pause on a hitch and look for a garbage collector in the method list)
  • endarendar Join Date: 2010-07-27 Member: 73256Members, Squad Five Blue
    <!--quoteo(post=1831011:date=Feb 10 2011, 03:34 PM:name=6john)--><div class='quotetop'>QUOTE (6john @ Feb 10 2011, 03:34 PM) <a href="index.php?act=findpost&pid=1831011"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I can't seem to figure out why my tickrate stayed around 30 the whole time, while every other server I connect to has trouble ever getting above 20. Is it my machine? or is there something with my setup that is preventing server degrading?<!--QuoteEnd--></div><!--QuoteEEnd-->
    From running my server on 3 forms of hardware, I can tell you that mhz is the most important feature. I started on a xeon at 2.4ghz, and moving to an i7 at 3.3~ghz helped increase the players I can have without tick rate dropping. Increasing that speed again to 4ghz also helped. Right now tick rate can stay at a stready 30 with up to about 12 players in a medium sized game, and 14 in a light game. Anything over this and tick rate dips below 25, which begins to cause problems. Actually I think anything below 30 (or the average of 30, since it is always hovering between 28 and 32) will start to cause noticable issues, getting worse and worse as the tick rate drops.
Sign In or Register to comment.