# Installation and deployment
# What's EMQX suggested OS?
EMQX supports deployment on Linux, Windows, MacOS, ARM system, however it is recommended to deploy the product on one of the supported Linux distributions, such as CentOS, Ubuntu and Debian.
# How to estimate resource usage of EMQX?
Tags: Resource estimation
The following factors will have an impact on EMQX resource consumption, mainly on CPU and memory usage.
Number of connections: EMQX creates 2 Erlang process for each MQTT connection, and every Erlang process consumes some resource. The more connections, the more resources are required.
Average throughput: Throughput means (pub message number + sub message number) processed by EMQX per second. With higher throughput value, more resource will be used for handling route and message delivery in EMQX.
Payload size: With bigger size of payload, more memory and CPU are required for message cache and processing.
Number of topics: With more topics, the route table in EMQX will increase, and more resource is required.
QoS: With higher message QoS level, more resource will be used for message handling.
If client devices connect to EMQX through TLS, more CPU resource is required for encryption and decryption. Our suggested solution is to add a load balancer in front of EMQX nodes, the TLS is offloaded at load balance node, connections between load balancer and backend EMQX nodes use plain TCP connections.
You can use our online calculation tool https://www.emqx.com/en/server-estimate (opens new window) to estimate the resource consumption.
# When I was executing stress test, the connection number and throughput are lower than expected. How can I tune the system to make full use of it?
When executing a stress test, besides ensuring the necessary hardware resource, it is also necessary to tune the OS and the Erlang VM to make the maximum use of the resource. The most common tuning is to modify the global limitation of file handles, the user limitation of file handles, the TCP backlog and buffer, the limitation of process number of Erlang VM and so on. You will also need to tune the client machine to ensure it has the ability and resource to handle all the subs and pubs.
Different use cases require different tuning. In the EMQX document there is a chapter about tuning the system for general purpose. TODO (opens new window)
# My connections number is small, do I still need to deploy multiple nodes in production?
Even when the connection number is low, or message rate is low, it still makes sense to deploy a cluster with multiple nodes in production. Clustering improves the availability of system: when a single node goes down, the rest of the nodes in the cluster ensure that the service is not interrupted.