Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Advice needed (long, sorry)

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"

shows:

[...]
25665
25720
25773
25829
25883
25939
25992
26048
26101
26156

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.


2015-02-14 16:49 GMT+01:00 Oegma2 <oegma2@xxxxxxxxx>:
Hi Manuel

All the best with your adventure with MQTT and scaling - I've learn in the last 8 months so much regarding MQTT, Mosquitto, AWS, HAProxy, ELB, KAfka, RAbbitMQ, HiveMQ, ActiveMQ, Nginx, NodeJS, MongoDB, Cassandra, Riak, and even Postgress, event sourcing, cqrs, clustering and more that it's been an wild ride - one that I will continue with and hope I can provide some adv i future - Michael's adv is really awesome and his ideas is so out there but yet so practical that you sometimes sit down and go "duh, why didn't I think of that - point in case the V1.4 http and mqtt via elb routing - sooolid idea!"

Keep us posted on your findings - love the linux kernel tweaking links! something i myself need to look at again this week

Warm regard
Izak Smit



On Sat, Feb 14, 2015 at 12:27 PM, Andrew McClure <andrew@xxxxxxxxxxxxxx> wrote:
Keep us posted.

If I had the time I'd like extended haproxy support an 'mqtt' mode with support for exactly the sort of functionality you describe.

Perhaps a crowd funding opportunity.  I did get a quote for 4k USD from an Eastern European guy who's done other good work for me of a high quality.

Andrew
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev


_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev



--
---
Manuel Domínguez Dorado
ingeniero ARROBA ManoloDominguez PUNTO com
http://www.ManoloDominguez.com

Back to the top