1

The following article on Google Cloud describes measuring latency, and uses ping and netperf.

https://cloud.google.com/blog/products/networking/using-netperf-and-ping-to-measure-network-latency

It explains discrepancy between measured latencies via ping and netperf by showing the difference in intervals between requests.

The following graph shows the measured latency vs the request interval:

enter image description here

Why does latency increase at higher intervals?

I would have expected latency to remain stable or decrease, assuming that load affects latency in the example.

Clarification The article explains the discrepancy between the tools, and when configuring to use the same intervals, produced the graph. I understand that any remaining difference is due to TCP vs ICMP. The question is regarding the increased latency at higher intervals - regardless of tool used.

1
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Dec 31, 2020 at 3:52

2 Answers 2

3

The "real" latency doesn't change. As the article (poorly) explains,

To explain, this is largely an artifact of the different intervals the two tools used by default.

In other words, the apparent increase in delay is caused by the way the programs calculate round trip delay, based on the interval used.

The details of why this is so gets into details of the operating system and the Ping program itself, both of which are off topic here. You could ask for more details on the Unix Stack Exchange.

2
  • Yes, I fully agree. The discrepancy is explained by the different default interval in the tools, as well as the different protocols. The question is (regardless of tool) why the latency increases as the interval increases. Is this due to the operating system / TCP/IP stack?
    – GCon
    Nov 12, 2020 at 23:46
  • The article doesn't say that the increase "is caused by the way the programs calculate round trip delay" - it claims roughly that the measured latency actually increases as the inter-ping time increases, and that the apparent large discrepancy in the tools is because of a different default inter-ping time. The OP is rightly asking why latency would increase as inter-ping time increases.
    – BeeOnRope
    Feb 20 at 22:17
1

ping - or rather the ICMP echo request/reply is a method to measure exactly that: the time it takes for a node to reply. Since ICMP messages are very low priority, ping replies take the network round-trip time plus any time it takes the host or any intermediate node to process/forward the ICMP message.

Accordingly, ping provides an upper bound for the actual round-trip time. The actual RTT may be smaller.

Any other request sent over the network takes the round-trip time (network delay) plus the time it takes to process the request (processing delay) plus the time it takes to receive and send any data (serialization delay). (You can mostly ignore the serialization delay for ping as it usually sends very small packets.)

If you'd like to measure processing delay alone, you need to leave out the network.

1
  • So, I still can't understand it. The difference between the tools can be explained by ICMP vs TCP round-trip (and that includes the processing etc). I am trying to understand why increasing the interval at which a request is sent increases the delay.
    – GCon
    Nov 13, 2020 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.