New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websockets slow for large (ish) payloads #1390
Comments
The commit I just pushed helps a lot with this. It seems as though I was making libwebsockets unhappy with write sizes and buffer sizes. The commit message marks this as closed, but it doesn't meet the tcp performance. |
@ralight what kind of performance does it get with your changes? How can I get this version of mosquitto to test? |
I was getting ~170ms per message. You can get this version by getting the fixes branch:
Or get https://github.com/eclipse/mosquitto/archive/fixes.zip Are you ok compiling yourself or would you like help? |
@ralight I would love help getting it working in a docker image. |
In the root of the source from above, run |
@ralight last question, when do you guys plan on making a release cut (tagged docker image) with this code? Or at least an expected wait time? |
The aim is for roughly monthly bug fix releases, so soon. I'm trying to just figure a couple of other issues first. |
@ralight I just tested mosquitto docker image:
The emqx broker runs in 200 ms on scenario 1 & 2. Any ideas on why there is such a difference in performance over local and internet? |
That's bonkers. I've tested this out on test.mosquitto.org, which is under load but isn't using the docker image. Using pubsub.py I get:
Those results are pretty consistent across runs. I've tried with libwebsockets 2.4.2 and 3.1.0 with the same results. I haven't tried with the docker image yet. If I understand what you are saying, you get 10,000ms latency right from the first message. Could you please try the python code with your instance to see what you get? You'll need the Paho python client paho-mqtt. |
I am having an issue where sending a 1mb+ payload over mqtt takes 5-10 seconds to complete over localhost.
The same request over tcp takes 32 ms.
I have created a repo that reproduces the issue: https://github.com/Smart-Ag/mqtt_bug_report
To run the repo:
I have tested the same clients with the emqx mosquitto broker and it was 10-40 times faster.
The text was updated successfully, but these errors were encountered: