Limiting CPU Usage

Hi everyone.
I’m having a situation where I created a custom add-on several months ago with no problems whatsoever. Recently with the new updates from Core + Host the CPU usage of my add-on has been skyrocketing to the point where I lose my Home Assistant completely. Does not respond to pings so I can’t access it via web UI. The only is solution is to do a power cycle. The uptime is inconsistent, it can stay online for either 6 hours or 6 minutes.

These are my specs:

  • Operating System: Home Assistant OS 6.0
  • Core Version: core-2021.6.3
  • Hardware: Raspberry Pi 4 Model B 4GB RAM

Is there any way to limit the CPU usage of the add-on? Or does anyone suggest a better solution?

Thank you in advance.

Update your addon to work with whatever has changed in Home Assistant?

I’ve noticed that add-ons that have problems, can wind up restarting over and over. These restarts will drive really high cpu usage. As Tom suggests it might be time to look in your code and see what needs to be fixed.

Frankly creating an addon that runs away with your cpu, and then trying to find a way to reduce the addon’s cpu access is just wrong.

Fix the addon.

1 Like

Hi @tom_l,
Thanks for the honest input. I will check the difference in Home Assistant versions to what may cause this problem.

Best of regards

Hi @nickrout,
The moment I created the add-on there was no issue with cpu performance, only with recent Home Assistant updates, but I appreciate your comment and will correct my add-on