System Requirements for Configuring HiveMQ
HiveMQ is a high-performance MQTT broker that is designed to run on server hardware. Although HiveMQ can also run on embedded devices, server hardware unleashes the full potential of our broker.
Operating Systems
-
Production: Linux and Windows Server 2016, 2019, and 2022.
-
Development: Windows, macOS, or Linux.
For general operation, HiveMQ requires Glibc version 2.12 or higher. For HiveMQ Data Hub Transformations, HiveMQ requires Glibc version 2.29 or higher. Additionally, the system user running the HiveMQ processes must have write permissions for the /tmp system directory.
|
Minimum Hardware Requirements per HiveMQ Broker Instance
-
At least 4 GB of RAM
-
4 or more CPUs
-
100 GB or more available disk space with at least 900 IOPS
The required resources must be allocated exclusively to each HiveMQ Broker instance. Running other applications alongside the HiveMQ Broker with shared resources can degrade the performance of the HiveMQ Broker.
For production deployments of HiveMQ in a containerized or virtualized environment, we recommend the exclusive allocation of physical server or virtual machine resources to each HiveMQ broker instance. |
The storage option you select determines the level of performance your HiveMQ Broker can deliver. To ensure high durability and optimal performance, we recommend the use of dedicated disks or storage options that deliver a minimum of 900 IOPS for HiveMQ in production. |
Environment
-
Production: OpenJDK JRE 11 or newer is required. OpenJDK 21 is recommended.
-
Development: OpenJDK 11 or higher is recommended. OpenJDK 21 is preferred.
System resources
HiveMQ scales with your system resources.
If you add more CPUs and RAM, HiveMQ delivers higher throughput and lower latencies.
The performance of the persistence layer and as such MQTT operations is also bound to the input and output capacity (IO) of the underlying system.
|
Linux Configuration Optimizations
You can optimise your Linux configuration in several ways:
Increase open file limit
If you run HiveMQ on a Linux operating system, make sure that HiveMQ processes are allowed to open a sufficient number of files.
To adjust the limit, add the following lines to the /etc/security/limits.conf
file:
hivemq hard nofile 1000000
hivemq soft nofile 1000000
root hard nofile 1000000
root soft nofile 1000000
HiveMQ automatically runs sanity checks during startup.
If your current open file configuration is insufficient, HiveMQ prints a warning to your HiveMQ log file: Soft limit for open files ({your-current-soft-limit}) is lower than the recommended limit (1000000). Please increase the open file limit to at least the recommended limit. and/or Hard limit for open files ({your-current-hard-limit}) is lower than the recommended limit (1000000). Please increase the open file limit to at least the recommended limit. HiveMQ repeats sanity checks every 12 hours to evaluate configuration changes that are made during runtime.
|
Adjust TCP settings
On systems with many connections, it can be necessary to adjust your TCP configurations and enable the system to open more sockets.
To make these adjustments, add the following lines to the /etc/sysctl.conf
file:
# This causes the kernel to actively send RST packets when a service is overloaded.
net.ipv4.tcp_fin_timeout = 30
# The maximum file handles that can be allocated.
fs.file-max = 5097152
# Enables fast recycling of waiting sockets.
net.ipv4.tcp_tw_recycle = 1
# Allows reuse of the waiting sockets for new connections, when it is safe from the viewpoint of the protocol .
net.ipv4.tcp_tw_reuse = 1
# The default size of the receive buffers that the sockets use.
net.core.rmem_default = 524288
# The default size of the send buffers that the sockets use.
net.core.wmem_default = 524288
# The maximum size of the received buffers that the sockets use.
net.core.rmem_max = 67108864
# The maximum size of the sent buffers that the sockets use.
net.core.wmem_max = 67108864
# The size of the receive buffer for each TCP connection. (min, default, max)
net.ipv4.tcp_rmem = 4096 87380 16777216
# The size of the sent buffer for each TCP connection. (min, default, max)
net.ipv4.tcp_wmem = 4096 65536 16777216
To apply your changes, type sysctl -p
or restart the system.