-
-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Problem/Motivation
I'm currently using Home Assistant's (OS) integration to control an Adguard Home installation in a docker container (outside OS).
I was previously using AH inside HA and everything was fine, however, now that I moved AH ouside the integration to control it increases AH cpu usage from ~0.5% average to around 3% average.
This might sound like a small change but im running a NUC and that extra CPU consumes quite a lot of power. My HA consumes a total of 5% so that integration alone uses an extra half of that. Also, running AH inside HA did not generate that extra cpu.
I know the extra cpu comes from the integration because cpu changes when enabled and every 10s (when cpu increases) there is a GET in AH's logs.
Sorry if this issue does not belong here and instead to HA core but i tried to check if the issue is related to the way this code works.
Here is my monitoring of the AH container in Home assistant

Here is the monitoring in Portainer, there are huge spikes every 10s from the API which seems to average to the 3%.

Expected behavior
As a very small amount of data is transfered in each 10s check I would expect the containers CPU consumption to increase very little.
Actual behavior
CPU consumption of running Adguard Home integration is 5 times the consumption of the container alone.
Other people have experienced this here
Steps to reproduce
Run HA OS 10 with HA core 2023.7.1
Run Adguardhome container in docker adguard/adguardhome:v0.108.0-a.586
Setup the integration Adguardhome in Home assistant.
Proposed changes
Firstly, sorry if the inneficiency comes with the way Adguard Home created their API or if this huge cpu consumption is completly normal.
Let me know if you think this is normal or if you have any insight on what might be causing it.
I'm setting up an environment to test this repository, I'm trying to understand how it works and if there is any tweak that can be done to solve the problem.