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

Upgrade to 2024.5.1 : High memory and CPU usage #116872

Closed
jymorel opened this issue May 5, 2024 · 11 comments
Closed

Upgrade to 2024.5.1 : High memory and CPU usage #116872

jymorel opened this issue May 5, 2024 · 11 comments

Comments

@jymorel
Copy link

jymorel commented May 5, 2024

The problem

HAOS. RPI4 8 Gb. After upgrade from 2024.4.4 to 2024.5.1, I see a significant increase of memory and cpu usage.
(Memory : 10 -->25%, CPU 25 --> 50).
Downgrading to 2024.4.4 solved the issue.
2024.4.4:
HAOS_2024 4 4
2024.5.1:
HAOS_2024 5 1

What version of Home Assistant Core has the issue?

2024.5.1

What was the last working version of Home Assistant Core?

2024.4.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

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

@bdraco
Copy link
Member

bdraco commented May 5, 2024

Please follow the instructions at https://community.home-assistant.io/t/2024-5-tracking-down-instability-issues-caused-by-integrations/724441 and post a callgrind file

@jymorel
Copy link
Author

jymorel commented May 6, 2024

so I have installed again version 2024.5.1yesterday evening at about 9:00pm. You will find attached the history of CPU and memory usage. And a callgrind file. Thank you
HAOS_2024 5 1_2024-05-06
callgrind.out.1715013163860053.txt

@bdraco
Copy link
Member

bdraco commented May 6, 2024

Looks like a run-away template

Screenshot 2024-05-06 at 1 23 03 PM

@bdraco
Copy link
Member

bdraco commented May 6, 2024

@jymorel
Copy link
Author

jymorel commented May 6, 2024

Idid that and I looked at the log. I found 2 templates used in sensors for getting lists of last seen devices and unavailable devices with more than 100000 renders ...
But strangely, cpu and memory usage decreased significantly and returned to normal after installing 2024.5.2...? Seems to be stable now.
HA 2024 5 2_installation

@jymorel
Copy link
Author

jymorel commented May 7, 2024

fixed by
HA 2024 5 2 before and after
upgrade to 2024.5.2.

@jymorel jymorel closed this as completed May 7, 2024
@bdraco
Copy link
Member

bdraco commented May 7, 2024

I'm not 100% sure that this problem is fixed, as there wasn't anything specifically for templates in 2024.5.2. Perhaps it was the statistics fix? Do you use the statistics integration?

If you send another callgrind file. I'll also take a look and see if there's anything obvious going on that might cause the problem to reoccur.

@jymorel
Copy link
Author

jymorel commented May 7, 2024

No I don’t use the statistics integration. Only 1 history_stats sensor for testing.
Ok attached a new callgrind file.
FYI, not a best practise for testing, but I installed go2rtc and alexa media player updates at the same time as HA 2024.5.2 update …
callgrind.out.1715104561015525.txt

@jymorel jymorel reopened this May 7, 2024
@issue-triage-workflows
Copy link

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.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
@bdraco
Copy link
Member

bdraco commented May 29, 2024

Screenshot 2024-05-28 at 3 52 17 PM

It does look like you still have a lot of template renders

@bdraco
Copy link
Member

bdraco commented May 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants