Understanding ping calculation
Understanding ping calculation
We enabled lag monitor with Queuesize 1, we didn't receive ping for scheduled interval (1 second). We received ping after 6 seconds, however, the lag value was shown to be around 900 ms. Wanted to understand how it is possible? Shouldn't the ping be like 6000ms?
Re: Understanding ping calculation
Hi,
can you give us more details?
What SFS2X version are you using?
What API platform and version?
Also can you show the code used to start the Lag Monitor?
I have tested locally using the latest SFS2X and Java API and didn't see anything strange. Keep in mind that the ping/pong interaction is run every few seconds (by default 4).
In our local test the client on my machine is pinging SFS2X running on a Raspberry PI, with a reported latency of 8-10ms.
The settings in my tests are:
Pinging every 2 seconds, with the queue size set to 1
Cheers
can you give us more details?
What SFS2X version are you using?
What API platform and version?
Also can you show the code used to start the Lag Monitor?
I have tested locally using the latest SFS2X and Java API and didn't see anything strange. Keep in mind that the ping/pong interaction is run every few seconds (by default 4).
In our local test the client on my machine is pinging SFS2X running on a Raspberry PI, with a reported latency of 8-10ms.
The settings in my tests are:
Code: Select all
sfs.enableLagMonitor(true, 2, 1);
Pinging every 2 seconds, with the queue size set to 1
Cheers
Re: Understanding ping calculation
Hey,
Our client is on Unity, version 1.7.13. Server is 2.16.1.
The code to start the lag monitor is the equivalent of - EnableLagMonitor(true, 1, 1); (we use variables whose values are set to 1 and 1 for Queuesize and interval).
Please let me know in case more details are required.
Thanks
Our client is on Unity, version 1.7.13. Server is 2.16.1.
The code to start the lag monitor is the equivalent of - EnableLagMonitor(true, 1, 1); (we use variables whose values are set to 1 and 1 for Queuesize and interval).
Please let me know in case more details are required.
Thanks
Re: Understanding ping calculation
2.16.1 is pretty old, I would recommend repeating the test with a more recent version version (2.18.x)
Also you mentioned that it took 6 seconds for the response to come back: how exactly did you measure this? Did you start keeping time when the "ping" request goes out?
( A better way to double check this would be using Wireshark where you can actually see the times at which packets are being sent and received )
I ask because there could be all kinds of other activities going on in the client that may cause some delay and have nothing to do with the network. The Lag Monitor takes only the network in account and nothing else.
Side note: in production I wouldn't recommend to run the LagMonitor at a frequency of 1sec. 4-5 seconds is usually more than enough and will save you some bandwidth.
Cheers
Also you mentioned that it took 6 seconds for the response to come back: how exactly did you measure this? Did you start keeping time when the "ping" request goes out?
( A better way to double check this would be using Wireshark where you can actually see the times at which packets are being sent and received )
I ask because there could be all kinds of other activities going on in the client that may cause some delay and have nothing to do with the network. The Lag Monitor takes only the network in account and nothing else.
Side note: in production I wouldn't recommend to run the LagMonitor at a frequency of 1sec. 4-5 seconds is usually more than enough and will save you some bandwidth.
Cheers
Re: Understanding ping calculation
2.16.1 is pretty old, I would recommend repeating the test with a more recent version version (2.18.x)
Also you mentioned that it took 6 seconds for the response to come back: how exactly did you measure this? Did you start keeping time when the "ping" request goes out?
( A better way to double check this would be using Wireshark where you can actually see the times at which packets are being sent and received )
I ask because there could be all kinds of other activities going on in the client that may cause some delay and have nothing to do with the network. The Lag Monitor takes only the network in account and nothing else.
Side note: in production I wouldn't recommend to run the LagMonitor at a frequency of 1sec. 4-5 seconds is usually more than enough and will save you some bandwidth.
Cheers
Also you mentioned that it took 6 seconds for the response to come back: how exactly did you measure this? Did you start keeping time when the "ping" request goes out?
( A better way to double check this would be using Wireshark where you can actually see the times at which packets are being sent and received )
I ask because there could be all kinds of other activities going on in the client that may cause some delay and have nothing to do with the network. The Lag Monitor takes only the network in account and nothing else.
Side note: in production I wouldn't recommend to run the LagMonitor at a frequency of 1sec. 4-5 seconds is usually more than enough and will save you some bandwidth.
Cheers
Who is online
Users browsing this forum: Baidu [Spider] and 63 guests