How to reduce lag and package losing


Hi,we are using phtonserver and pun for our realtime multiple player project,and we have purchased 4 commerial licenses(1 for master server,3 for game server) for our project,and we have a big problem on it now.

In other discussion,i found that phton officially recommand server and client side send 10 event duing 1sec,but in our game,we usually have 4 playes in a room on gameserver, and each of them send 30 events in a sec to have a realtime operation respond. this situation usually works fine with about 70-80ping lag,but sometimes this lag will suddenly increase to 200 or higher.May this because of some package losing problem?

Why would this happen,and what we can do to resolve this problem(we have tried to change several server settings to reduce the lag,such as DataSendingDelayMilliseconds,AckSendingDelayMilliseconds,MinimumRetransmitTimeout,but things didn't change much)


  • chvetsov

    hi, @mmm11

    well, it is difficult to say what is causing issues on your end. 30 events per second can turn into 120 events per second from server side. That does not look too big. we see more on public cloud

    how do you send your messages? do you know that if unreliable message is bigger than MTU it is split to reliable parts? this what I assume can happen.

    what version of server are you using?