MQTT Performance Benchmark Testing: EMQX Single Node Supports 2M Message Throughput
In this post, we provide the benchmarking result of EMQX message throughput — a single node EMQX processes 2M message throughput per second.
This benchmark testing simulates 20 publishers and 1000 subscribers connecting to EMQX. After all connections are established, each publisher publishes 100 QoS 0 messages with the payload of 16 bytes per second. Subscribers subscribe to messages from all publishers via topic wildcards.
- Concurrent connections: 20 publishers, 1000 subscribers
- Publish Topics: each publisher has a unique topic with
test/as the prefix
- Subscribe Topics: all subscribers subscribe to a wildcard topic of the form
- QoS: 0
- Payload: 16 bytes
- Message Throughput: 2,000,000/second
The test environment is configured on Alibaba Cloud, and all virtual machines are within a VPC (virtual private cloud) subnet.
XMeter is used in this benchmark test to simulate MQTT clients. XMeter is built on top of JMeter but with enhanced scalability and more capabilities. It provides comprehensive and real-time test reports during the test. Additionally, its built-in monitoring tools are used to track the resource usage of the EMQX machines.
XMeter provides a private deployment version (on-premise) and a public cloud SaaS version. A private XMeter is deployed in the same VPC as the EMQX in this testing.
Please refer to EMQX Doc for the Linux Kernel tuning.
EMQX dashboard illustrates that over 2M outgoing messages per second are achieved, and the rate is rather stable throughout the 30-minute’s test.
average of pub-to-sub latency2.93msCPU usage during the phase of messagingthe max is 92%, and the average is 88%Memory usage during the phase of messagingthe max is 1.2GB, and the average is 1.1GB
This benchmark report demonstrates the powerful performance of EMQX message throughput in a single node deployment. EMQX can be used in complex business scenarios while maintaining low message latency even under massive message transmission.