Debian Issue

I’ve recently upgraded to a more powerful NUC so that I can go down the Debian route so that I can use the NUC for more than just HomeAssistant if I wish too in the future

Installation of Debian wasn’t the easiest as I’m new to Linux but it’s up and running and everything functions as it should. HomeAssistant is in a docker container as well as portainer and everything else is installed through the supervisor in HomeAssistant. I also have the Gnome GUI as I prefer a GUI.

The problem I am facing is with CPU usage. For some reason over a short period of time my CPU usage goes from basically nothing up to a constant about 14% which of course is generating more heat, noise and power usage than should be required. Please see the image which shows where it rises too and you can see where I restarted the NUC and how it goes back up slowly afterwards. (top is CPU usage, bottom ram)

Screenshot 2021-01-27 at 19.14.58

Using the top command it seems there are a few services that spike CPU usage

Most common is “python3” which spikes up to a maximum of 25.6% CPU usage
“gnome shell” spikes up to 13.3%
“networkmanager” spikes up to 15.3%
and occasionally “nmdb” spikes up to 8.3%

I hope some Linux guru here can help in identifying what’s going on and how to solve this CPU usage issue, I really don’t want to go back to just the HomeAssistant image on this NUC when it is clearly capable of so much more

So, you run Home Assistant Supervised or Home Assistant Container?

Well, 14% is not really a problem, especially as Linux reports up to 100% per CPU core. Python is the programming language of Home Assistant.

Linux gurus don‘t use a GUI :wink:

I’ve been looking into this more and more and actually found out what the issue is

avahi-daemon seems to be popping up using up 100% of cpu usage on 1 core

So this is clearly the issue I just now need to find out how to resolve it…

As a temporary solution I have stopped and disabled it:

sudo systemctl stop avahi-daemon.socket
sudo systemctl stop avahi-daemon.service

sudo systemctl disable avahi-daemon.socket
sudo systemctl disable avahi-daemon.service