Jump to content

  • Log In with Google      Sign In   
  • Create Account

Gintas Z.

Member Since 27 Mar 2013
Offline Last Active Jul 21 2016 07:09 AM

Posts I've Made

In Topic: How can I optimize Linux server for lowest latency game server?

17 June 2016 - 01:26 PM

The ping is measured in-game. Client sends a ping packet to the server, server sends it back and then client measures how long did it take.

Hmm, I don't know the traceroute, I don't live in there. How would it help?

How much ping can that jitter add up? The CPU is staying up to ~15% all the time now.

 

Do you mean I should somehow optimise my game to let players play with a bigger ping? It's a 2D platformer shooter, you can take a look at it by clicking the link in my signature.

 

I'm really not sure how should I be solving this ping problem...


In Topic: How can I optimize Linux server for lowest latency game server?

17 June 2016 - 07:53 AM

I fixed the CPU rise, turns out I wasn't removing one bullet type from physics world.

 

However, ping problems are still there. How can I debug what is wrong? I'm using Google Compute Engine, maybe they limit network performance?

E.g. asia server is located in Taiwan and player in South Korea has ping ~140 on WiFi, so he cannot play. What should I do?

UOwmpQI.png


In Topic: How can I optimize Linux server for lowest latency game server?

22 May 2016 - 04:46 AM

Hmm, I noticed there is still some lag and high ping. I noticed it sometimes lags even with low ping. Here are some stats:

 

fR0rLwj.png

 

4lyr4bH.png

CvuO6Xm.png

xGnaTXf.png

 

Why is the CPU always rising? How can I debug what is wrong?


In Topic: How can I optimize Linux server for lowest latency game server?

14 May 2016 - 03:31 AM

But that it not the latency I am measuring, because Kryonet's networking runs on a separate thread, so main thread's sleep time does not affect it.. And sending update packet only 20x a second and interpolating everything looks and feels nice in reality, I don't think there is anything wrong with it.

In Topic: How can I optimize Linux server for lowest latency game server?

13 May 2016 - 04:49 PM

I have just pushed the update for my game, so I will take a look at how it will go. I actually am allocating quite a fewobjects every loop. But I'm making thread sleep, so that it runs only 20x a second, so I adjust the sleep time with consideration on how long it took to finish the last iteration. For measuring latency, I use Kryonet's updateReturnTripTime(). I just looked into it, and it turns out it is using TCP... But I'm calling it only 2x a second. I need to check ping repeatedly so that I can extrapolate positions from update packets.

I found these parameters on this ServerFault question. Do they actually do anything useful?

net.core.rmem_default = 10000000
net.core.wmem_default = 10000000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216

PARTNERS