0 ms latency

Started by Alan Cohen

Alan Cohen

0 ms latency   21 February 2017, 03:15

Can someone explain the difference been checking the box Enable Latency with 0ms delay and not enabling latency at all? I am seeing a much slower transfer speed when I check Enable Latency with a 0ms delay versus unchecking Enable Latency altogether.

Thanks.
SoftPerfect Support forum - Andrew avatar image

Re: 0 ms latency   21 February 2017, 09:48

If you enable the latency simulation even though it's set to zero, every packet is still placed into a queue and extracted from there a moment later.

This may add some latency due to processing overhead, but usually under 1ms. How much does it slow down?
Alan Cohen

Re: 0 ms latency   22 February 2017, 07:37

We're doing WCF streaming of large files and seeing significant performance degradation when we run with the simulator, even though we've disabled all options (even unchecking latency). It depends on the file sizes but it can go from 15 seconds to 30 - 40 seconds when the simulator is running. Does make sense that just running the simulator is enough to slow down streaming?
Alan Cohen

Re: 0 ms latency   22 February 2017, 07:46

Actually, disregard that. The performance issue happens only if I have Enable Latency checked, even with a Delay of 0 ms. Unchecking Enable Latency and running the simulation does not cause any degradation. That being said, given that you say it's possible to have 1 ms latency even with the delay set to 0 ms, I'm not entirely surprised that it slows down. Though, I am a bit surprised that it cause such a significant performance degradation.
SoftPerfect Support forum - Andrew avatar image

Re: 0 ms latency   22 February 2017, 10:17

Could you perhaps launch a continuous ping, i.e. ping x.x.x.x -t where x.x.x.x is a machine that the files are streamed to ?

This would allow us to see how the latency actually changes with ping's response times:
  • With Enable Latency unchecked
  • With Enable Latency checked
  • With Enable Latency checked and streaming being done

Re: 0 ms latency   23 February 2017, 02:04

Latency unchecked

C:\Windows\system32>ping -t 10.5.83.19

Pinging 10.5.83.19 with 32 bytes of data:
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128

Ping statistics for 10.5.83.19:
Packets: Sent = 29, Received = 29, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\Windows\system32>


Latency checked 0 ms

C:\Windows\system32>ping -t 10.5.83.19

Pinging 10.5.83.19 with 32 bytes of data:
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time<1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128

Ping statistics for 10.5.83.19:
Packets: Sent = 28, Received = 28, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 2ms, Average = 1ms
Control-C
^C
C:\Windows\system32>


Latency checked 0 ms while streaming

C:\Windows\system32>ping -t 10.5.83.19

Pinging 10.5.83.19 with 32 bytes of data:
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=3ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=15ms TTL=128
Reply from 10.5.83.19: bytes=32 time=3ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=27ms TTL=128
Reply from 10.5.83.19: bytes=32 time=9ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=45ms TTL=128
Reply from 10.5.83.19: bytes=32 time=53ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=3ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=7ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128
Reply from 10.5.83.19: bytes=32 time=11ms TTL=128
Reply from 10.5.83.19: bytes=32 time=3ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=12ms TTL=128
Reply from 10.5.83.19: bytes=32 time=54ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=2ms TTL=128
Reply from 10.5.83.19: bytes=32 time=20ms TTL=128
Reply from 10.5.83.19: bytes=32 time=18ms TTL=128
Reply from 10.5.83.19: bytes=32 time=1ms TTL=128

Ping statistics for 10.5.83.19:
Packets: Sent = 30, Received = 30, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 54ms, Average = 10ms
Control-C
^C
C:\Windows\system32>
SoftPerfect Support forum - Andrew avatar image

Re: 0 ms latency   23 February 2017, 10:25

Looks like, as I suspected, it adds about 1ms latency due to processing overhead. Given this and the standard TCP window size of 64 KB and using the formula TCP-Window-Size-in-bits / Latency-in-seconds = Bits-per-second-throughput, we get:
(65536 * 8) / 0.001 = 524288000 = 520 Mbit/s
Yet, if the latency goes up to 2ms like it did in a few rounds above, the theoretical maximum will be:
(65536 * 8) / 0.002 = 262144000 = 260 Mbit/s
It sounds about right, as you mentioned the transfer slows down "from 15 seconds to 30 - 40". Assuming the pure link latency is about 0.5ms and the Connection Emulator's overhead adds another 1ms, it would be around 1.5ms and half of the throughput.

I guess you can take this into account when specifying latency to compensate for the overhead, say if you want 5ms latency, it makes sense to specify 4ms in the settings for a more accurate result.

Sometimes you can get the answer faster if you try the forum search and/or have a look at the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • If possible, check your spelling and grammar.

Author:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **     **  ********  **     **  **    **  **        
  **   **      **     **     **  ***   **  **    **  
   ** **       **     **     **  ****  **  **    **  
    ***        **     **     **  ** ** **  **    **  
   ** **       **     **     **  **  ****  ********* 
  **   **      **     **     **  **   ***        **  
 **     **     **      *******   **    **        **  

Message: