link delay and wireshark RTT are inconsistent #614
-
i've noticed that if i create a very simple network with hosts and links, then set the delay parameter for the links, then send some traffic and measure RTT using wireshark, the RTT comes up as half of what i would expect it to be. for example, if i have a host1 <----> switch <----> host2 setup with each link specified as having 1ms delay, it should come up as an RTT = 4ms (1 for host1 -> switch, 1 for switch -> host2, 1 for host2 -> switch, 1 for switch to host1), but it comes up in wireshark as RTT = 2ms. does anyone know why this would happen? everything about the setup is based on defaults, and this happens in a fresh CORE install in a fresh Ubuntu VM. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
The default configuration of links using You can see this by running |
Beta Was this translation helpful? Give feedback.
-
There had been discussions before about possibly changing how things are done related to this in a variety of ways, but potential impact to any existing scenarios people may run was the reason to keep things as is for now. |
Beta Was this translation helpful? Give feedback.
-
i don't think that actually explains why wireshark only sees half of the latency. i see how the node wouldn't care about the switch, but wireshark is measuring round-trip time, so it should care about much more than what a single node would care about (while still not caring about the switch). in the case where we noticed this, the latencies were asymmetric around the switch (10x latency between client and switch compared to between server and switch), but wireshark still only saw 1/2 of what we expected. (i.e., 1ms -> 10ms -> 10ms -> 1ms, but wireshark reported 11ms, when we expected 22ms) |
Beta Was this translation helpful? Give feedback.
-
In your original example: This is the current effect: tc is configuring the veth pair of an interface inside a node on the host side currently, so delay only gets impacted when received by a node, not going out as one may assume. The switches have 0 delay in the scenario. |
Beta Was this translation helpful? Give feedback.
-
ok, i get it. thanks for the explanation. |
Beta Was this translation helpful? Give feedback.
In your original example:
RTT = 4ms (1 for host1 -> switch, 1 for switch -> host2, 1 for host2 -> switch, 1 for switch to host1), but it comes up in wireshark as RTT = 2ms
This is the current effect:
RTT = 2ms (0 for host1 -> switch, 1 for switch -> host2, 0 for host2 -> switch, 1 for switch to host1), which matches up with my above explanation
tc is configuring the veth pair of an interface inside a node on the host side currently, so delay only gets impacted when received by a node, not going out as one may assume. The switches have 0 delay in the scenario.