Performance Analysis of Mosquitto, EMQX, and NanoMQ MQTT Brokers under Varying QoS Levels and CPU Allocations for Docker-Based IoT Edge Gateway Simulation

MQTT brokers are increasingly deployed on resource-constrained IoT edge gateways, yet most broker benchmarks run on unconstrained servers, rarely vary the Quality of Service (QoS) level under limited CPU, and seldom include NanoMQ, a broker designed specifically for the edge. This study evaluates Mosquitto 2.1.4, EMQX 6.3.3, and NanoMQ 0.25.7 in Docker containers whose CPU allocation was limited to one or two cores and whose memory was limited to 1 GB, simulating an edge gateway on a single host. A full factorial experiment combined three QoS levels (0, 1, 2), two CPU allocations, and four client loads (10 to 250 publishers at 10 messages/s), with five randomized repetitions, giving 360 runs. End-to-end latency, message loss, CPU and memory usage, and thread count were measured, and differences were tested with Kruskal-Wallis and Holm-corrected Mann-Whitney U tests. Broker latencies differed significantly in all 24 scenarios (p < 0.05). Mosquitto achieved median latencies of 0.66 to 3.53 ms with less than 8 MB of memory and was insensitive to CPU allocation. EMQX was equally reliable but used about 330 to 340 MB of memory. NanoMQ consumed its entire CPU quota from 50 to 100 clients onward and, with one core and 250 clients, saturated with median latencies of 3.4 to 49.6 s and 17 to 98% of messages undelivered within the measurement window; with two cores it recovered without loss. These results indicate that CPU allocation is a decisive factor when selecting an MQTT broker for edge gateways.

Authors

Institutions

Publication Details

Journal
SainsTech Innovation Journal
Published
2026-11-30
DOI
https://doi.org/10.37824/sij.v9i2.2026.1607
Primary Topic
IoT and Edge/Fog Computing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Performance Analysis of Mosquitto, EMQX, and NanoMQ MQTT Brokers under Varying QoS Levels and CPU Allocations for Docker-Based IoT Edge Gateway Simulation

Ayu Angreini, Rahmaniar, Jumriati
SainsTech Innovation Journal
IoT and Edge/Fog Computing
article

Performance Analysis of Mosquitto, EMQX, and NanoMQ MQTT Brokers under Varying QoS Levels and CPU Allocations for Docker-Based IoT Edge Gateway Simulation

Ayu Angreini, Rahmaniar, Jumriati
article en

Abstract

MQTT brokers are increasingly deployed on resource-constrained IoT edge gateways, yet most broker benchmarks run on unconstrained servers, rarely vary the Quality of Service (QoS) level under limited CPU, and seldom include NanoMQ, a broker designed specifically for the edge. This study evaluates Mosquitto 2.1.4, EMQX 6.3.3, and NanoMQ 0.25.7 in Docker containers whose CPU allocation was limited to one or two cores and whose memory was limited to 1 GB, simulating an edge gateway on a single host. A full factorial experiment combined three QoS levels (0, 1, 2), two CPU allocations, and four client loads (10 to 250 publishers at 10 messages/s), with five randomized repetitions, giving 360 runs. End-to-end latency, message loss, CPU and memory usage, and thread count were measured, and differences were tested with Kruskal-Wallis and Holm-corrected Mann-Whitney U tests. Broker latencies differed significantly in all 24 scenarios (p < 0.05). Mosquitto achieved median latencies of 0.66 to 3.53 ms with less than 8 MB of memory and was insensitive to CPU allocation. EMQX was equally reliable but used about 330 to 340 MB of memory. NanoMQ consumed its entire CPU quota from 50 to 100 clients onward and, with one core and 250 clients, saturated with median latencies of 3.4 to 49.6 s and 17 to 98% of messages undelivered within the measurement window; with two cores it recovered without loss. These results indicate that CPU allocation is a decisive factor when selecting an MQTT broker for edge gateways.

SainsTech Innovation JournalVol. 9(2)
Universitas Teknologi Akba Makassar (ID), State University of Makassar (ID)
IoT and Edge/Fog Computing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon