High CPU Usage - Thoughts for fixes?

Hello,

Using HA with Rasberian (not haas.io), my CPU usage has been high. This issue has been going on for a while and I am on the latest version (93.1). All packages are up to date as well.

2.37 (1m), 1.98 (5m), 1.87 (15m)

Attached is a screen shot of htop. The only thought is cloudmqtt. Do you have any ideas?

you really need to help us understand your setup, as in what else does you Pi do (what other apps/scripts you have, whether it’s a light install, LAMP, Desktop with GNU, etc)
That aside, what do you consider high CPU usage? Unless I’m mistaken you’re only using 5.3% of your CPU capacity? (4.6+2.0+1.3+0.7+0.7)

Yeah, that doesn’t look like high usage at all.

I was thinking the same.
CPU is only at 6% or so?

But I did notice that the load appears to be high… that makes me wonder since the two don’t seem to match…
But I’m rather new to linux - so not sure if I am seeing it correctly.

don’t think the load is high. He’s using about 60% of his memory, but then it’s only 1GB, so not bad considering…

Pi is strictly for Home Assistant - no other apps, scripts, etc. Raspbian and HA. SSH runs really slow and it takes forever to run a command, which is why I wrote. Thought it was due to high CPU, now what are your thoughts?

I was referring the to load average in the top right.
If I understand this correctly from my learning of linux… the first # is the last 1 minute, second # is 5 minutes, third # is fifteen minutes.

A load of 1 is equivalent to the load of a single processor core/thread/whatever. So he’s floating around 1.75 which would be almost 2 cores. So since we see 4 cores it would almost be about 50% CPU load.

What I don’t understand is how his CPU is low, but the system load is high. If I understand this correctly the system has enough threads/processing running and waiting to use almost 2 of the available cores/threads. BUT for some reason the CPU is not running high… I wonder if this could mean there is a bottleneck somewhere that is preventing the threads from being processed?

For example the SD card is slow and can’t keep up (I hint toward this since there is available memory we can see).

Anyway, this is my loose understanding and could be way off target.
Someone with more understanding of linux can hopefully give a better answer.

DeadEnd

not exactly. Load average is the average number of processes running.
It’s actually a little bit more complicated than that, but you can simplify it with what I just wrote.
For more details, check this:

So there’s no way there is high CPU usage here.

@MontyRisk,
Can you see any changes to memory usage and CPU usage when you start SSH?
Also what exactly do you do in SSH? how do you connect to your Pi (Ethernet/WiFi) Could be instead that the is too much data sent and received by/from the Pi and therefore the lack of speed is a network bottleneck?

The PI is using a wired connection on a 1gig connection. I am using OwnTracks and CloudMQTT so I can automate devices based on location.