hassio-addons/addon-glances

Impossibly high CPU usage

Salvora opened this issue · 6 comments

Problem/Motivation

The glances addon, cpu usage was more than %100 percent all the time.

image

I don't know if this behavior is the result but the glances integration in HA was almost impossible to add. Failed to connect almost everytime. When it connected, the sensors were mostly unavailable.
image

Expected behavior

Should not happen.

Actual behavior

No idea

Steps to reproduce

I did start a new HA installation. One of the first addons, I installed was Glances. So there is almost no integration or sensor setup. Only a couple of addons.

Home Assistant OS 5.11 64-bit
core-2021.2.3

Raspberry pi 4b 8gb
Overclocked with
over_voltage=6
arm_freq=2000

Just guessing but overclocking might be affecting the base values so it is showing more than 100 percent?

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

The usage is based on the number of cores * 100%, you have 4 cores, so the max is 400%.

Is the issue here that you can't add the integration?

The usage is based on the number of cores * 100%, you have 4 cores, so the max is 400%.

Is the issue here that you can't add the integration?

Well, this is embarrassing then. Thanks for pointing out.

But the glances integration is still shaky. Any idea for the reason?

Even a simple curl command to glances api from the localhost takes like 20 secs. This should be instant right? They are both on the same machine etc.

curl -X GET http://localhost:61209/api/3/mem/free

I would agree it should be quick, as its localhost it can't be name resolution, however I'm really not sure that this is an issue with the addon, rather the integration.

I would agree it should be quick, as its localhost it can't be name resolution, however I'm really not sure that this is an issue with the addon, rather the integration.

The addon should be the problem. Because if making API calls with CURL lags so much on the localhost, the integration sensors will time out naturally.

Or it might be an SD card issue. I will take a look at it again.

The usage is based on the number of cores * 100%, you have 4 cores, so the max is 400%.

Is the issue here that you can't add the integration?

I am posting this in order to inform other people but I think you are wrong about that. It should not go past 100%. I just did a complete reinstall of HA set up everything from scratch. After installing glances, the values went back to normal. I don't see any relation but with the new installation, I switched from SD card to SSD storage. I think SD card went bad at some point.

If there is a relation and this is the result of bad SD card, we can close this?

The addon wraps existing software, the relation to any hardware issues would need to be investigated upstream. There is nothing we could do to assist with that.