core
core copied to clipboard
AdGuard Home Integration causes high CPU usage on AdGuard Home server
The problem
As per title, the CPU usage went up to a constant 50% and after some investigation, the root cause is the usage of basic authentication for all the integration polls, since the password needs to be hashed via BCrypt.
See issue on AdguardHome repository here with the potential solution, which is basically to move to Cookie authentication.
What version of Home Assistant Core has the issue?
core-2024.1.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
AdGuard Home
Link to integration documentation on our website
https://www.home-assistant.io/integrations/adguard/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (adguard) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of adguard can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign adguardRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
adguard documentation adguard source (message by IssueLinks)
Same here … I am using the AdGuard Home integration. Almost every quarter hour the cpu temperature is rising from 34 Celsius to about 50.
If I disable the integration it will not happen.
System: Core 2024.2.2 Supervisor 2024.02.0 Operating System 11.5 Frontend 20240207.1
Same problem here. Suddenly my Adguard consumes about 70-80% of a single CPU core. I'm also running HA as a VM on Proxmox. Internal hardware report shows only < 5% of processor usage by AdGuard, although the usage drops from around 30-40 % to 1-3 % when I stop the Addon.
See used versions below: Core: 2024.3.0 Supervisor: 2024.03.0 Operating System: 12.0 Frontend: 20240306.0 AdGuard Home: 5.0.4
When Addon is running:
When Addon is stopped:
So glad I found this issue. My home server has been acting sluggish and website initial loads from my home network have been sluggish as well, kinda like AdGuard is slowed down. Now I looked at CPU usage and it's spiking like crazy just for my AdGuard Home container. I disabled the integration and everything is working like it should again.
Also, I'm seeing the AdGuard Protection status in HA drop out and become unavailable. This seems to be aligned with the CPU spikes.
I should note that AdGuard Home is running in docker on my home server, but Home Assistant is running on its own machine separately (with the AdGuard integration used to interface and control it)
Is this issue about the addon or the integration?
I suffer from high CPU usage when using Adguard integration. I previously had HA OS and no issues (and moved to docker around a year ago). As soon as i tried to connect to Adguard in docker i saw this behaviour, I stopped using the integration. I see you use the OS so I don't know if previously when using the Addon, HA skipped the authentication or something and now it affects both platforms.
I have the same issue. Brand new install of adguard (in a proxmox LXC fwiw). Basically 0% CPU load when under normal use, but jumps to 4% when HA integration was added, and drops back to zero when it's disabled.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I'm still having this issue of high cpu usage with the integration.
Same here, using the integration my Lxc container Adguard environment has consistently 20% CPU power. When I disable the integration I have 0,04 up to 2%. No problems when using PIHole with the ha PiHole integration. From my point of view this is a critical bug to be solved with high priority. Otherwise the integration is unusable. Using the Adguard home add on I can not remember having this issues...
The Integration causes ~3.5% CPU load in my Adguard LXC in Proxmox.
With the Integration disabled the load is negligible as you would expect:
Core 2024.12.5 Supervisor 2024.12.0 Operating System 14.1 Frontend 20241127.8 Adguard Version: v0.107.55
For now I found a work around. In the integration configuration I disabled the option that home assistant actively pulls information from Adguard. To get some information from Adguard, I configured a switch to reload Agduard integration in HA. Works!
bug still persists
I updated to 2025.1 and saw a huge drop of cpu in general with HA. This integration seems to also have resolved for me, i see no increase on my adguard container anymore after enabling. I see number sensor updating sparsly, i dont remember if thats a change, maybe the api is less agressive. Works well.
I updated to 2025.1 and saw a huge drop of cpu in general with HA. This integration seems to also have resolved for me, i see no increase on my adguard container anymore after enabling. I see number sensor updating sparsly, i dont remember if thats a change, maybe the api is less agressive. Works well.
The polling seems to be only every 5 minutes in terms of how often the HA integration gets data, but my Adguard LXC still shows the same CPU usage. If I look at the CPU real-time it spikes to 15-20% every 5-10 seconds or so which is odd given the 5 minute intervals in HA.
If I turn off the polling in the HA Integration, those CPU spikes disappear, so it looks like the integration is constantly polling but only 'recording' values every 5 minutes which is odd behaviour. I'll just leave it off for now, if I want to look at the metrics then i'll just go to the Adguard UI.
The polling seems to be only every 5 minutes in terms of how often the HA integration gets data, but my Adguard LXC still shows the same CPU usage. If I look at the CPU real-time it spikes to 15-20% every 5-10 seconds or so which is odd given the 5 minute intervals in HA.
Scan interval is actually 10s for switches and 300s for sensors. If you don't need switches, try disabling them in home assistant.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This would be fixed by
https://github.com/frenck/python-adguardhome/pull/1447 https://github.com/home-assistant/core/pull/142125
but maintainers have yet to review them. Commenting in hope that this work doesn't get forgotten and that they eventually find the time.