MQTT Performance Benchmark Testing: EMQX Single Node Supports 5M Connections

MQTT Performance Benchmark Testing: EMQX Single Node Supports 5M Connections

·

2 min read

MQTT Performance Benchmark Testing: EMQX Single Node Supports 5M Connections

In this post, we provide the benchmarking result of EMQX connection - a single node EMQX processes 5M concurrent connections.

Test Scenario

This benchmark testing simulates 5,000,000 MQTT clients connecting to EMQX, with a connection rate of 5,000 per second.

  • Concurrent connections: 5,000,000

  • Connection rate: 5000/s

  • Authentication: no

  • Keep alive: 300s

  • Clean session: true

Testbed

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

Machine Details:

ServiceDeploymentVersionOSCPUMemoryCloud Host model
EMQXsingle node5.0.21RHEL 8.564C128Ghfc6.16xlarge

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.

MQTT Benchmark Architecture

System Tuning

Please refer to EMQX Doc for the Linux Kernel tuning.

Benchmark Results

EMQX dashboard illustrates that over 5M concurrent connections are achieved, and the connection is rather stable throughout the 30-minute’s test.

Benchmark Results

MQTT Connections

Metrics

Average of connect response time2.93ms
Average of CPU usage14%
Max of CPU usage40%
Average of memory usage after all clients are connected48.7GB
Max of memory usage51.4GB

Wrapping up

This benchmark report demonstrates the robust concurrent connectivity performance of EMQX in a single-node deployment. It shows that EMQX can help users build larger scale IoT applications while using fewer machines, helping to reduce your total cost of ownership.

Originally published at emqx.com