Huge CPU load when adding mqtt broker mosquitto integration

Lately my HA is unusable since it eats huge amounts of CPU and RAM. The reason seems to be the MQTT broker (mosquitto) integration. I tested this by installing a clean fresh HA:stable. I just set up me as a user, no integrations. Then I added the mosquitto integration and the CPU jumps to 100% and RAM usage increases massively.


The screenshot of my portainer panel shows the CPU jump from ~1% to 100 when I added the mosquitto integration.
My setup: Intel NUC Atom, HA 2022.5.3 as docker.
I ran (older versions of) HA for some years with this setup flawlessly.
What could be the problem?

This is wild guess… (If connected to your existing network) is there something massively spamming the network?

I run some ESP devices as MQTT clients sending temperatures etc. Nothing big. Just a hand full of devices. I bridge 2 MQTT-brokers over wireguard.
I notice that the mosquitto snap package on my ubuntu server (22.04 lts) also eats between 10 and 30% CPU.

I might have found the reason: My little Ubuntu server 22.04 ran mosquitto as snap container. I stopped it and started mosquitto as a docker, too. Now, system load is back to normal. So the snap package of mosquitto was the problem.

1 Like