Mosquitto: Mosquitto v1.5.1 on Windows uses a lot of CPU

Created on 31 Aug 2018  路  13Comments  路  Source: eclipse/mosquitto

On a machine with 2 cores, Mosquitto uses between 40 - 50% CPU of the complete machine. With previous versions, it almost didn't consume any CPU load. I don't think this is normal. Can somebody check this?
Thanks a lot!

bug mosquitto-broker

Most helpful comment

Does anybody has the same issues on Windows?

All 13 comments

How many clients do you have? Because 50% is 100% of one core, I suspect you may be affected by #948.

I don't have a lot of clients. I Publish/Subscribe with max. 5 clients. If I revert to the previous version, I don't have any CPU load - so for me it's really this version that causes the high CPU load.

Does anybody has the same issues on Windows?

@wiebeytec I downloaded and installed 1.5.1 (64 bit) on Win 10 Home(1803) with Win64OpenSSL v1.1.0i light as dependency. I also installed as service only to see if it crashes. CPU utilization was high at 30% on Core i5. I am sorry, I can't provide logs as I now moved to 1.4.9 to see how it behaves. Please note that I didn't start any clients at all. But this issue exists and is not related to clients.

@gbr8cke , @kiranpradeep , could you try only to run "mosquitto.exe -v" on command prompt? I tried it on Win10 Pro(32bit, 1511) on VirtualBox, but the issue was not reproduced. I'will update Windows and retry soon later.

I've reproduced after updating to Windows 10 Pro (32bit, 1803). I guess something wrong in mosquitto appeared.

p.s.
There are many issues for CPU usage on Windows 10-1803. But, this seems different from them because it occurs while mosquitto runs.

I don't think you have to search this in the Windows 10-1803 direction -> I had the issue on a Windows server 2008 R2. Maybe the verion of the .Net framework? (In my case it was 4.5 and another test with 4.7)

Have same problem on Windows with ver. 1.5.1.
On win 10, i3 with 4 core eat 30% of CPU, on win 2016 server with 2 core eat 50% of CPU.
Do not have connection at all.
They don't use .net.
I'm compile it using VC c++, only use vc_redist libs.

Check on mosquitto-1.4.15-install-win32 - normal use of CPU: 0%

I can confirm that I also have the same 40% to 50% CPU usage with 1.5.1 32 bit and 64 bit running on Windows 7. I switched back to 1.4.15 and it shows 0% CPU.

Still experiencing the same with v1.5.2 both on Win7 64 and Win10 64.

This is fixed by the pull request in #971, which will be in 1.5.3 shortly.

Was this page helpful?
0 / 5 - 0 ratings