appdaemon icon indicating copy to clipboard operation
appdaemon copied to clipboard

Add ability to trigger a manual check_app_update or to set a custom interval (or: is utility_delay safe to change?)

Open sanzoghenzo opened this issue 6 months ago • 0 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues

Your feature request

Hi there, just started using appdaemon and I'm very impressed by the work you've done!

I'm running it in my "homelab sever", a lenovo ThinkCentre with intel i5-9500T CPU in a docker container, along with Home assistant an a bunch of other services.

I had it running for a week with only the hello world app, and on my grafana dashboard I saw it running at an average of 1.5%, while Home Assistant with 18 automations (among the other things) is at 1.12% (although it uses a lot more memory).

After reading #1030 and other CPU related issues, I used py-spy to confirm that the check_app_updates call is the one that affect the most the CPU usage.

Since I'm still at the beginning, I didn't want to disable the app update checks with the production config variable; I found the (undocumented) utility_delay variable, and after setting it to 15 (an arbitrary number, it is prometheus default polling frequency) the cpu dropped to 0.7%.

But the utility loop does many other things after checking the app updates, so I am wondering: is it safe to change this variable?

If this is not the case, I would ask to add either:

  • a "check apps update" button in the web UI to manually trigger the updates if the production config variable is set, to avoid a complete appdeamon reload
  • another config variable to only configure the update check interval for the app (I suppose it would mean to have a separate loop just for this)

Thanks for the attention, keep up the good work!

sanzoghenzo avatar Dec 14 '23 08:12 sanzoghenzo