Open maurerle opened 1 day ago
When configuring the mosquitto server to use set_tcp_nodelay
, the roundtrip times are reduced dramatically:
https://github.com/eclipse-paho/paho.mqtt.python/issues/874#issuecomment-2510788188
MQTT still bottlenecks at around 1000 roundtrips/s while tcp can do about 5000 roundtrips/s, but it is far better of than the 20ish roundtrips/s without set_tcp_nodelay
See also: https://www.man7.org/linux/man-pages/man7/tcp.7.html
The paho MQTT library somehow does schedule messages in a weird order. Some messages, are sent directly, while others are then sent 40ms later.
This happens even with QoS = 0
Using TCP is much faster in these cases by means of factor 100. An example where this can be seen is given below.
The idea here is to have an agent, which responds directly
The info log messages from the distributed clock show, that there is a delay of 40ms multiple times. I tried to look into this issue and reproduce it with plain paho, but did not have a lot of luck yet - except when using QoS = 1.