Dev Log: 1% Server CPU usage with 120+ connected players.

Discussion in 'Developers Blog' started by Chris, Dec 4, 2014.

  1. Chris

    Chris Well-Known Member Staff Member

    • Stardale Staff
    • Developer
    Joined:
    Mar 29, 2014
    Messages:
    157
    Likes Received:
    354
    Trophy Points:
    78
    mooCow
    Hey everyone, it's been a bit too long since my last dev log post. :mad: We're still here working hard :) This past week has been extremely slow. I've been optimizing the server and I've got it down to running at around 1% CPU usage with 120+ connected users. After 120 for some reason the CPU starts going up in a way that is somewhat odd, which needs to be figured out. I've ran the test server setup with up to 200 connected players, although the CPU spiked up from 1% at 120 to 30% at 200 (doesn't seem like a linear increase o_O), each player was sending a position update 4 times per second. This translates to 800 movement updates per second that the server was handling, then relaying the positions back to each player along with each other player position. :D

    So with that said, I'm happy it's coming together. Although it's a little odd that from 120 to 200 players connected the server would spike from ≈1% to ≈30%, it'll get figured out. I suspect it might be something to do with the thread handling.

    I hope everyone's thanksgiving was good last weekend, perhaps some of you found some nice black friday/cyber monday deals! ;)
     
    #1
    Andy, Serensetti, Raeden and 3 others like this.
  2. OldNESJunkie

    OldNESJunkie Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    23
    Likes Received:
    38
    Trophy Points:
    63
    mooCowmooCowmooCowmooCowmooCow
    Holy Snikes! That's awesome for 120+ connected players, last time I tried my hand at a networked game 2 players was killing the CPU at 100%, so yeah.....
     
    #2
    Sh4dowWalker96 and Chris like this.
  3. OFF

    OFF

    Joined:
    Sep 25, 2014
    Messages:
    27
    Likes Received:
    37
    Trophy Points:
    118
    mooCowmooCowmooCowmooCowmooCowmooCowmooCow
    I wonder what would ever happen with a thousand players.
     
    #3
    Sh4dowWalker96 and Chris like this.
  4. Chris

    Chris Well-Known Member Staff Member

    • Stardale Staff
    • Developer
    Joined:
    Mar 29, 2014
    Messages:
    157
    Likes Received:
    354
    Trophy Points:
    78
    mooCow
    Haha at one thousand players it might blow up at it's current state but on a high end server if I can get this to where I'd like it, 1k players is a possibility. That is my goal. I actually rewrote how I was sending data three times to increase performance, so it's been a little bit of trial and error but hopefully we see the benefit of that later on.
     
    #4
    Andy, Kane Hart and Sh4dowWalker96 like this.

Share This Page