Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Increased load with v10 #250

Closed
fdw opened this issue Aug 21, 2024 · 4 comments
Closed

[BUG] Increased load with v10 #250

fdw opened this issue Aug 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@fdw
Copy link

fdw commented Aug 21, 2024

Go Hass Agent Version
v10.0.0

Describe the bug
I've noticed that the load on my system has gone significantly up since I started v10 of go-hass-agent. I'd like it to go down again, maybe by updating less often.

To Reproduce
Steps to reproduce the behaviour:

  1. Install the latest version
  2. Check the system's load
  3. See the increase vs v9

Expected behaviour
I expected the load to be about the same.

Logs
Nothing interesting there, I think.

Desktop (please complete the following information):

  • OS: Linux
  • Distribution: Manjaro
  • Version n/a
@fdw fdw added the bug Something isn't working label Aug 21, 2024
@joshuar
Copy link
Owner

joshuar commented Aug 26, 2024

Hey there @fdw!

That's a bit concerning, but before we dig in, how much is signifcant in this regard? In terms of, for example, total CPU % on the system, what are the values between v9 and v10 for Go Hass Agent? What kind of hardware/system is the agent running on?

To note, v10 has additional sensors and functionality and I am doubtful I can ensure that usage will remain constant with new functionality. 😬 Particularly when the data sources require polling (i.e. the agent needs to go fetch the data), like the new sensors added, which is probably the most costly way of getting the data.

Having said that, I have been looking at CPU profiling a lot since you filed this issue to see if I can't try to improve things 😜 I can see that the new CPU frequency sensors were causing an increase in CPU utilisation and I've adjusted the polling interval. These are also fetch in a more efficient way now. This will be part of the v10.1 release that will be next off the block.

What I am also slowly working towards is a way to make the polling interval of polled sensors and even selecting which sensors groups to get all user-configurable. That's been suggested in #171 and its a great idea. I'm hoping I can get that implemented soonish, at least in way where it can be configured via files as an MVP and then down the road in a UI.

Cheers!

@fdw
Copy link
Author

fdw commented Aug 26, 2024

I'm sorry, I tried to compare the load with go-hass-agent enabled and without, but I cannot reproduce my original problem. It now seems to depend more on other circumstances and even with it enabled, I can reach the usual low load (though not as often, but that is to be expected). Sorry for opening a ticket.

@joshuar
Copy link
Owner

joshuar commented Sep 3, 2024

Hey @fdw no problem! And no need to apologise! Good to hear the load is acceptable! I've released a new version which has the changes I mentioned earlier in it and I'm hoping those keep the load relatively consistent. Let me know if you do notice any odd increase though!

@joshuar
Copy link
Owner

joshuar commented Sep 13, 2024

I'm going to close this issue as I believe the load problem is resolved. If there is still an issue, please re-open!

@joshuar joshuar closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants