Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Mosquitto broker consumes too much memory and never release it.

Hi Prashant,

I'm afraid I don't see the behaviour you describe using your code and 1.4. I've tried increasing the message count to 500k, but with no change in behaviour.

Could you please run the broker under massif/valgrind then run your test and send me (not to the list) the resulting massif.out.* file?
 The command to run is:

valgrind --tool=massif <the normal way you would run mosquitto>

So for example:

valgrind --tool=massif mosquitto -c prashant.conf

Thanks,

Roger


On Wed, Jan 28, 2015 at 2:50 PM, Prashant Kedia <prashantkedia22@xxxxxxxxx> wrote:
Hi Roger,

As suggested, I just tried it with 1.4 and it's still reproducible. The difference is on 1.3.1 memory consumption goes up even when I try to publish 25000 messages, but it takes 50000 messages to reproduce same issue with 1.4.

And it does not releases memory in any of the two versions.

Attached is my source code for my sample test case.

On Wed, Jan 28, 2015 at 6:21 PM, Roger Light <roger@xxxxxxxxxx> wrote:

Hi Prashant,

Do you have some code you can share that helps.reproduce this?

I notice you're using mosquitto 1.3.1, could you try again using the 1.4 branch please?

Thanks,

Roger

On Jan 28, 2015 12:09 PM, "Prashant Kedia" <prashantkedia22@xxxxxxxxx> wrote:
Hi All,

Recently I observed that, on my test environment (AWS micro instance) some of the mosquitto brokers are consuming about more than 250 MB of memory.

I have done some analysis and found that it consumes more memory while publishing QoS 0 messages with log_type information.

Below are the results of analysis done on my local machine with a simple test case.

Platform: Linux Mint 17 Qiana
Mosquitto version: 1.3.1
Mqtt Client used: Paho APIs 1.0.1
Number of message published: 25000 X 5 (5 threads simultaneously publishing 25000 messages each, on the same broker, on the same topic)
Number of clients subscribed: 4

QoSLog_TypeMemoryCPU %Approx time for each thread to publish (millis)
0Info42 MB845500
0Debug8.6 MB323300
1Info11.7 MB4460000
1Debug6.2 MB40105000
2Info1.6 MB8430000
2Debug2.8 MB8218000
 
It does not even release consumed memory after all published messages are received by the client.

So, I want to know if there is any way, I can publish QoS 0 messages with log level info, without consuming so much memory.

And is there any way to make broker, to release the consumed memory once all messages are received.

Note: retained parameter is false while publishing messages.

--
Thanks and Regards,

Prashant Kedia
Co-Founder and Developer
Bizlers Technologies Pvt. Ltd.

_______________________________________________
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



--
Thanks and Regards,

Prashant Kedia
Co-Founder and Developer
Bizlers Technologies Pvt. Ltd.

_______________________________________________
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