Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Mosquitto increasing maximum connection limit

Hi Manuel,

I want to know more information about it.  The points behind our calculations are these :

1. The capacity of Mosquitto broker is depending on the underlying OS and which in turn depends on what is maximum number of files (physical files or Network Sockets ) that OS can open concurrently. The maximum number of files that can be opened depends on what is the memory available for each process.

2. In linux the default value of max number of file open is 1024 and MQTT broker takes this value as its default. In order to set the max value beyond the 1024 , we need to change the linux settings for incr
easing the upper file limit.

3. The maximum value we can set on process level depending on how much memory is available on system for each process.

4. For each keep alive request memory conception is 16 bytes. Hence to keep 10k concurrent connection memory requirement is 160 MB and for 100k 1.6 GB

Now another important points are

1. we are opening the connection only based on the user activity. If user got notification, we are closing the connection.
2. So connection will not be open always.
3. Based on our understandings we can make more scalablility by introducing bridging of Mosquitto brokers

Please give me the answer for following questions :

1. At what point you couldn't able to support concurrent connections ? (Maximum limit of connection based on a specific configurations). ?

2. Is it correct that you are trying to support more than 100k connection using one mosquitto broker with the mentioned configuration ?

3. If possible please provide or tell me how will i get old archives of your mail, since i joined to the group recently.


Thanks & Regards
Jiji





On Tue, Dec 13, 2016 at 3:29 AM, Manuel Domínguez Dorado <manolodd@xxxxxxxxx> wrote:
Jiji,

I achieved this number of concurrent connections but everything goes wrong when they started to send messages. So, in practice, it is not feasible this number of connections using Mosquitto.

I started as usual and after that I continued tuning linux kernel, reducing the number of bits used in TLS certificates, increasing the keepalive time... look for my messages in the mailist archives if you need more info.

The main problem was that Mosquitto uses only one core that become exhausted. I've 48 GB RAM and 24 Xeon cores. Everything ok but one core (the one running Mosquitto, reached 100% quickly. Nothing to do :-(

Regards.

PS: Karl, again, no I did not documented the overall process in an empirical way. He, he

El 12/12/2016 22:50, "Roger Light" <roger@xxxxxxxxxx> escribió:
Hi Jiji,

> 1. I am using service mosquitto restart , is this upstart command. what is
> this limit nofile 4096 4096 ?

If you install mosquitto from the ppa provided by the project, or
through the normal ubuntu repository you will be using upstart. The
line I gave you will need to be added to /etc/init/mosquitto.conf to
allow mosquitto to use more than 1024 files - you should change the
4096 to the value of your choice.

> 2. Why you'r saying we can't able to establish a lakh o connection in Ubuntu
> 14.04 medium server with 4 GB memory. Please give me more details.

I'm saying that based on the experience of other people on this list
it will not be possible.

Regards,

Roger
_______________________________________________
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


Back to the top