emqx / MQTTX

A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.
https://mqttx.app
Apache License 2.0
3.81k stars 438 forks source link

[Help] Speed ​​problems using mqttx on linux terminal #1740

Open Snak3in opened 3 weeks ago

Snak3in commented 3 weeks ago

hi, yesterday I managed to use and understand how to make mqttx work from a Linux terminal, but now I realize that the connection seems really slow and for example sending a message on a topic, from when I send the command to when the action completes about 10 seconds pass and I was wondering if this was normal. My internet connection is not a problem and is not slow, can you help me?

ysfscream commented 2 weeks ago

Thank you for reporting this issue. To better understand the problem:

  1. Please use the --debug flag to identify where the delay occurs.
image
  1. Provide more details about your setup and usage, including:

    • MQTTX version
    • Linux distribution and version
    • Exact commands used
Snak3in commented 2 weeks ago

Thanks for the reply, I used the debug by posting on a topic and I noticed that the times are normal, the problem is right at the beginning when I send the command because MQTTX takes 100% of the CPU, I tried both on Ubuntu 18.04 on an ATOM processor and the delay is about 8 seconds, while on Ubuntu 22 mounted on a virtual machine on a PC with Intel Core i7 the delay is 2/3 seconds. Maybe there is some bug? The mqttx version is always the latest release in both cases

ysfscream commented 2 weeks ago

So, you mean it gets stuck or delay whenever you run the mqttx command, right?

Snak3in commented 2 weeks ago

yes

ysfscream commented 2 weeks ago

Could you please provide more details about the system info? For example, if it's 2 Core 4 GB. It will help us try to reproduce the issue with those specific settings. This problem might occur because MQTTX CLI is built on Node.js, which isn't the most lightweight solution.

Snak3in commented 2 weeks ago

yes, this is the system info: Intel® Atom™ Processor E3826 (1M Cache, Upto 1.46 GHz SoC, 7W TDP), 2GB RAM