im pretty new here and using hivemq ce.
For testing purposes i have two Raspberry pi4 4gb. One is using mosquitto and one is using hivemq in performance mode.
I ran a few simulations with HiveMQ Swarm and saw that HiveMQ is slower than mosquitto (despite Mosquitto uses only 1 core) up until a certain amount of messages:
Here you see 15 publisher publishing messages with qos1 (amount of messages = publisher * messages per publisher) and 1 Subscriber subscribing to them. Until about 546.000 Messages (about. 36400 messages per publisher) hivemq is pretty steady and slow and mosquitto performs better. But above that and hivemq is suddenly much better and getting better.
Can you explain what happens here and how i might make it perform like that directly?
Hello @djs_jo ,
It is really great to see your interest in HiveMQ and MQTT, please welcome to our community!
Thank you for sharing interesting results. Could you please also share, what and how exactly did you count in your model?
I am guessing, that
Amount_of_messages – is that amount of Publish packets sent by publishers?
Throughput_per_second – is that amount of PubAck packets or it is amount of messages received by the subscriber?
Dasha from HiveMQ team
every dot you see is basically one hivemq swarm run with 15 publishers. I start with 1 Message per publisher and go up 4000 messages per publisher for each dot until i have a run with 15 publisher sending 100.000 messages each.
The amount of messages is just a product of the count variables in hivemq swarm so the last dot is 15 Publishers * 100.000 Messages each= 1.500.000 messages (amount_of_messages).
in the hivemq swarm run im stoping the time before and after the whole hivemq swarm run is finished.
In the hivemq swarm we have the mentioned publishers sending sending the messages and one subscriber waiting for the overall amount of messages to arrive. for example in the last case the subscriber waits for 1.500.000 messages. once the messages arrived i stop the time and calculate the amount_of_messages / time it took to send and receive them. So the throughput is basically the amount of messages the receiver receives per second.
the outliners at the bottom are timeouts because of a lost connection or something. i have a problem with the autoreconnect parameter of hivemq swarm. If i use it hivemq swarm cant really connect and always tries to reconnect.
I hope that clarifies everything a little bit.