home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.88k stars 30.95k forks source link

AdGuard Home Integration causes high CPU usage on AdGuard Home server #108553

Open josefelixh opened 10 months ago

josefelixh commented 10 months ago

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

home-assistant[bot] commented 10 months ago

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 close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign adguard` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove 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)

DJeeens commented 9 months ago

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. IMG_4168

System: Core 2024.2.2 Supervisor 2024.02.0 Operating System 11.5 Frontend 20240207.1

LineC0der commented 8 months ago

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: image

When Addon is stopped: image

nukefrenzy commented 7 months ago

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. image

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)

joostlek commented 7 months ago

Is this issue about the addon or the integration?

dsolva commented 4 months ago

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.

lyricnz commented 3 months ago

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.

image
issue-triage-workflows[bot] commented 1 week ago

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.

nukefrenzy commented 1 week ago

I'm still having this issue of high cpu usage with the integration.