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
High CPU and memory usage under 0.108.0 #33866
Comments
It's high probably that nodered is leaking. |
I'm doing tests disabling the custom integrations. |
I do not have any custom integration The new release introduced
|
Happy to hear that maybe is not node red related and I'm not alone in this problem. I think I see it with node red because I have sensors and flows that react from one to the other and maybe for some reason they don't do it like in the earlier version (maybe some sensor is out of control?). I tested too 0.108.1 without luck, as you. I have made rollback to 0.107.7 and now all works as expected again. If someone has some idea, I can upgrade again to 0.108.1 to test it, but until them, is impossible for me to remain in this version. |
I have already updated to 0.108.1 and I have te same issue. Before 0.108 my CPU was around 5% on idle, and memory around 45%. |
0.108.2 it is still present I use old 2 core/4gb RAM/SSD laptop as host with Ubuntu 18 Server. What I use with HA: I am using MariaDB in container next to HA, as a storage. |
Actually I notice that for me |
I also thought it solved problem for me, but then 1h hour passed, and everything came back. |
The CPU usage as high is a clear symptom that the problem is still there. |
Struggling with the same issue |
@mountainsandcode can you give more information about your system? Are you using unofficial integrations like Node Red? |
I'm running HASS on a Synology using Docker - I have HACS running and two self-programmed integrations, but they have been running for quite a while. I suspect this may be due to #33882 (comment) as I can also see two python processes |
I don't have Homekit integration, so in my case I don't think it is it. |
I have the same issue updating from 107.7 to 108.3. Rolling back to version 107.7 the issue disappeared (memory consumption is flat). Alessandro |
Same issue. I'm using docker on a i5 and I'm not using Nodered. |
I also have a HA Core in Docker, maybe the last change is the cause of the problem?
|
Since version |
Same here (except the memory). Issue experienced first with 0.108.? then upgraded to 0.108.3, still the same. Now back to 0.107.7 and issue is gone (all other components are not downgraded). ha | 2020-04-13 22:22:17 INFO (MainThread) [homeassistant.components.mqtt] Got update for entity with hash: ('binary_sensor', '0x0017880104b53dcc occupancy') '{'payload_on': True, 'payload_off': False, 'value_template': '{{ value_json.occupancy }}', 'device_class': 'motion', 'state_topic': 'zigbee2mqtt/hal_1_sensor_1', 'json_attributes_topic': 'zigbee2mqtt/hal_1_sensor_1', 'name': 'hal_1_sensor_1_occupancy', 'unique_id': '0x0017880104b53dcc_occupancy_zigbee2mqtt', 'device': {'identifiers': ['zigbee2mqtt_0x0017880104b53dcc'], 'name': 'hal_1_sensor_1', 'sw_version': 'Zigbee2mqtt 1.12.2', 'model': 'Hue motion sensor (9290012607)', 'manufacturer': 'Philips'}, 'availability_topic': 'zigbee2mqtt/bridge/state', 'platform': 'mqtt'}'
ha | 2020-04-13 22:22:17 INFO (MainThread) [homeassistant.components.mqtt] Updating component: binary_sensor.hal_1_sensor_1_occupancy (not sure which of the two rows is first) For every entity (thus devices multiplied by the number of entities on it), this log is written every second. My config: Ubuntu with Docker Compose running mosquitto 1.6.9, Zigbee2mqtt 1.12.2 (firmware 20200328). Stopping the mosquitto container reduces the CPU, listening on the MQTT shows that hundreds of messages per second are processed. |
0.108.4 seems to have fixed the problem for me so far |
@andriej you're right, I totally forgot about that, but I did it right before the 0.108.4 update |
My latest test with |
I have observed that some users use Someone from here is able to execute it? I don't know nothing about python so I don't know if it can be executed in a running released hass.io/homeassistant instance. |
Other user with problems in reddit too: https://www.reddit.com/r/homeassistant/comments/fykg8l/ha_108_on_roller_coaster_cpumem_ride/ |
I have the same problem, even using 108.4. I have reverted to 107.7 |
I also have the same issue with the 108.5 version .... :-( |
As far as I can see, they do request data from coordinator which might enqueue multiple data requests. Now, since coordinator registers listeners it is likely that each sensor might request a new Now, after re-testing again with Brother power off, HASS restarted I clearly see an increasing in CPU usage, something that is not happening when Brother integration is disabled: Can you re-test on your side with the following conditions? For reference I run HASS on |
OK guys, I have to admit that something is wrong.
Four different coordinator objects are trying to update the data from the printer. EDIT: |
Good catch @bieniu ! Let's go for the fix! 😁 |
Fix: #34317 |
Ok, but I have high CPU and no brother integration. So I think the problem is more general. My log is full of messages about updating components (see above). |
The fix applies to all integration using |
I updated my install. Will monitor :) Thanks @bieniu :) So far graphs are significantly more healthy. |
Yes, i confirm problem was Brother integration. Now it's ok, i've also updated to latest version! Thanks to all! |
@D43m0n666 This was a |
So far, everything seems stable.
…On Fri, Apr 17, 2020 at 2:47 PM Maciej Bieniek ***@***.***> wrote:
@D43m0n666 <https://github.com/D43m0n666> This was a Data Update
Coordinator issue and affected all integrations using it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33866 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASOSQJVFNCGHPB7I26WNKDRNBFUXANCNFSM4MEP6JRQ>
.
|
It is definitely a magnitude better, but for me it still seems that there's some performance impact of having and not having Brother enabled: As you can see baseline did jump from ~4.5% to ~6% of CPU usage (given that this is not the only task running there it is in fact 33% increase in CPU usage) after upgrade from 0.108.4 to 0.108.8. The only other difference is I enabled Brother integration. I'm running another test now. I disabled and lets see the difference in next 12/18 hours :) |
1,5% percent of difference between having and not having snmp queries in background... what hardware are you on where it matters? ;-) |
Upgraded tot 0.108.6, seems to fix a lot. My CPU is now around 5%. In my opinion this is not 'low', but way better than the previous 60%. |
Given that this machine is: my router, dual wifi with 5 SSIDs, firewall, VPN server, HASS (with 100 entities), zigbee2mqtt (with 40 entities), Prometheus scraping 15 targets, MQTT, esphome frontend, and pihole it is doing pretty well with that average. There is a clearly noticeable performance regression when running brother integration with a printer being unreachable. It is very likely that it was as that before, but it still does not make sense to use so much resources by service where there's in fact no data processing. I will look how performant is EDIT: It takes around EDIT 2: The problem is related for the cost of running EDIT 3: This happens as the whole OID database seems to be imported each time: https://github.com/etingof/pysnmp/blob/master/pysnmp/entity/engine.py#L99. Likely, it would be better to re-use It seems that a single EDIT 4: Initing |
Updating to 108.6 fix the issue on my installation: memory and CPU are as expected |
All is ok for me. It seems that my cpu is maybe a little bigger (maybe 1%) but I don't know if this can be addressed or where the origin is. |
After two days os testing, all seems stable but I see my memory a little high. The home assistant docker is taking more than 400M. It has been taken more memory slowly. The memory total is about 50% (Raspberry Pi 2Gb). Usually I had less memory used, but I'm always changing things, so maybe is simply normal but I comment about this here to see if more people has noticed something. As I say it seems stable and I have no problems. |
Yes, it seems that i have the same issue, memory and swap is growing to 100% for both after 2 days on my RPi3b+ |
I have the same problem. I see a clear increase of memory usage every hour during the night when not much is going on rather than one automation that determines the max day temperature every 15 minutes. I already set the recorder to only record the automations and two sensors because the recorder send to eat up a lot of memory. |
I had this same issue as well, starting in 0.108.0 and the changes in 0.108.6 did fix it for me. The issue then returned in 0.109.0 and has consisted through 0.110.x. Both CPU and RAM will creep up and then eventually bring HA to a standstill until rebooted. |
Ain't it google backup addon doing it's job? |
Please post a
You'll have to change the |
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. |
The problem
Since the installation of HA version 0.108.0 the CPU and memory usage in my system grows. I have restarted several times (HA and the raspberry) but this does not fix nothing.
This graph shows the difference from 0.107.7 to 0.108.0:
You can see the low CPU in blue and the memory stable at about 30% in red until the installation of 0.108.0. Since then the memory and the CPU grows in the time. I have restarted it several times without luck, as you see in the graph.
My first idea is to go back to 0.107.7 but I prefer to comment this here because maybe there is a bug and I can help giving information.
Environment
Problem-relevant
configuration.yaml
I don't know what to attach. My complete configuration?
Traceback/Error logs
I can't see any error, only the Brother that can't find the powered off printer, but this was the same in 0.107.7.
Additional information
I have some custom integration, but they were there in earlier versions too:
The text was updated successfully, but these errors were encountered: