Hi,
today we have been doing some test after adittional linux tunning. A very simple one:
- Desktop PC (4 cores, 8 GB RAM) runing a single nodejs test that establishes TLS connections to the Mosquitto broker at 10 new connections/sec.
- A mosquitto broker 1.3.5 in a Virtual Machine with 3 processors and 1 GB RAM configured only in TLS mode.
We've reached 26156 concurrent MQTT/TLS connections. Subscribing to
mosquitto_sub --cafile enzina-CA.crt --tls-version tlsv1 -h 192.168.1.15 -p 8883 -u OneUser -P OnePassword -t "\$SYS/broker/clients/active"
At this point nodejs crashed due to memory problems:
FATAL ERROR: Malloced operator new Allocation failed - process out of memory
We'll try again using --max-old-space-size=2048 for nodejs, hehe.
But, anyway this is by far our most successful attempt to obtain 100K concurrent connections. Mainly taking into account that in our previous best attempt we used 20-30 virtual machines creating connections; and in this case we only used one desktop PC.
Anyway the desktop PC that originated connections experimented a load increase (mainly in CPU usage) but not enough to not support another 30K connections.
In the other hand, the Mosquitto VM machine had a high CPU usage for one of the three processors and the others were almost unused ¿?¿?¿ While the memory used to maintain these +26K connections was "only" 240 MB
We'are configuring a real server, not a VM, that will have a Mosquitto 1.4 configured with several listener over virtual loopback interfaces and behind a Haproxy. This server has 8 processors and 16 GB RAM and we expect to be able to achieve our desired 100K connection using four or five VM to generate TLS connections. If everything goes well, we will have the opportunity of start generating messages over these connections.
Thanks for your help.
Best regards.