Measuring Round Trip Latency (messages are sometimes delayed for 4 seconds) #5650
Replies: 1 comment
-
Some additional info. The QoS settings can be found in the code repo I linked, but in summary:
And here are some additional observations which may help identify the issue:
Edit: It looks like the 4 second spikes become far less frequent if I remember to source Fast-DDS/install/setup.bash (oops). Still seeing occasional spikes to both 4s and 0.01s, I'm also curious what sourcing that file does that changes the performance in this way, and still wondering why the non-networked latency appears to be the same as networked in my current configuration. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I am attempting to accurately measure the round trip latency of FastDDS. I have a pair of machines connected with 10 gigabit ethernet.
The first machine runs two processes. A driver and a listener. The driver sends samples that contain timestamps. These are sent on a topic to which another participant/process on the second machine is subscribed. This second process is called the "server". It immediately relays every sample it receives back on a second topic, to which a third participant/process on the first machine is subscribed. This is the "listener" process. It measures the difference between the received timestamp and the current time, and calculates the average latency over the course of a test run.
I was getting unexpectedly high average latency, sometimes around 30 ms. I started printing out the latency of every sample and I am getting numbers around ~200000 nanoseconds for most of them. However in every test, some number of samples show a latency in excess of 4 seconds! This skews the average dramatically.
Here is my code: https://github.com/mechaniputer/LatencyBench-FastDDS
I have two questions.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions