cutee
Posts: 1
Joined: Fri May 17, 2019 7:42 pm

mqtt limit speed

Fri May 17, 2019 7:57 pm

i am trying to publish 100 to 10000 random number 100 times in interval of 0.01 s on mqtt tcp\ip protocol but time measured by the client who subscribe to the broker is not right it's
the time for sending 10000 data is lower than the time 100 ,1000 data t
but when i try to change the interval of time to 0.1 to 1s the time measure in right.
what is the limits of data to transmit data in real time on mqtt protocol tcp-ip
and what can cause such problem
ps : the client is on the same pi

thank you

B.Goode
Posts: 7678
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: mqtt limit speed

Sat May 18, 2019 7:58 am

Welcome to the Raspberry Pi forums.
cutee wrote:
Fri May 17, 2019 7:57 pm
i am trying to publish 100 to 10000 random number 100 times in interval of 0.01 s on mqtt tcp\ip protocol but time measured by the client who subscribe to the broker is not right it's
the time for sending 10000 data is lower than the time 100 ,1000 data t
but when i try to change the interval of time to 0.1 to 1s the time measure in right.
what is the limits of data to transmit data in real time on mqtt protocol tcp-ip
and what can cause such problem
ps : the client is on the same pi

thank you

You have not mentioned what model of RPi board you are using, or what Operating System is installed on it. Nor how your MQTT infrastructure is implemented. So this is general advice only.

Raspbian, as a version of Linux, is not a Real Time Operating System. It is a multi-user time-shared operating system which can choose to allocate processing resources to tasks other than your application. And that might depend on what else your RPi is being used for.

Perhaps this is a case where the useful limits of reliable performance are best determined by trial and error in your own particular circumstances?

ghp
Posts: 1315
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: mqtt limit speed

Sat May 18, 2019 2:36 pm

There are many reports about mqtt performance, e.g.

https://flespi.com/blog/http-vs-mqtt-performance-tests
http://www.scalagent.com/IMG/pdf/Benchm ... s-v1-1.pdf
http://www.bitreactive.com/blog/2015/06 ... -messages/

What are your scripts to send data ? And which QOS are you using ?

Return to “Python”