MQTT Performance Benchmark Testing: EMQX Single Node Supports 2M Message Throughput

EMQ Technologies
3 min readAug 31, 2023

--

Background

In this post, we provide the benchmarking result of EMQX message throughput — a single node EMQX processes 2M message throughput per second.

Test Scenario

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 test/#
  • QoS: 0
  • Payload: 16 bytes
  • Message Throughput: 2,000,000/second

Testbed

The test environment is configured on Alibaba Cloud, and all virtual machines are within a VPC (virtual private cloud) subnet.

Machine Details

Test Tool

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.

System Tuning

Please refer to EMQX Doc for the Linux Kernel tuning.

Benchmark Results

EMQX dashboard illustrates that over 2M outgoing messages per second are achieved, and the rate is rather stable throughout the 30-minute’s test.

Metrics

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

Wrapping up

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.

Originally published at www.emqx.com

--

--

EMQ Technologies

EMQ is an open-source IoT data infrastructure software provider, delivering the world’s leading open-source MQTT message broker and stream processing database.