hassio-addons/addon-influxdb

Sudden high CPU load

jrhansen opened this issue · 11 comments

Problem/Motivation

CPU load caused by InfluxDB (4.5.0) suddenly increases drastically until it is restarted. On a RPi4 running HA 2023.1.4, the CPU load increases from about 5 % to about 30-40 %r. The extranous load is caused by InfluxDB. After restarting InfluxDB, the CPU load drops to the normal level for a number of hours, after which the CPU load increases again.

This is plot of the CPU load for the last seven days. The problem has occured three times for the past two days. The red arrows indicate where InfluxDB is restarted.

Skærmbillede 2023-01-16 kl  15 20 39

How can I debug this further?

Expected behavior

Normal CPU load.

Actual behavior

Well... increased CPU load.

Steps to reproduce

Now, it happens by itself. I do not remember, though, if I updated HA, just prior to the problem arising. I did some work on a dashboard (which is now deleted again). Other than that, I don't know what it takes to reproduce.

Anyone?

I keep seeing this, but now it doesn't help to restart InfluxDB, which will hog the CPU right away. However, I did notice this new thing in the InfluxDB log:

[11:08:44] INFO: Starting the InfluxDB...
ts=2023-01-23T10:09:04.500290Z lvl=error msg="Cannot read corrupt tsm file, renaming" log_id=0fZXTc30000 engine=tsm1 service=filestore path=/data/influxdb/data/homeassistant/autogen/84/000000007-000000002.tsm id=0 error="cannot allocate memory"

Please, help me debug this! :-)

Same here CPU Load peaks at 30 on a Pi !!

Home Assistant 2023.1.7
Supervisor 2022.12.1
Interface utilisateur : 20230110.0 - latest

My versions are:

Home Assistant: 2023.1.7
Supervisor: 2023.01.1
User interface: 20230110.0 - latest
InfluxDB: 4.5.0

@Vartkat Did you find any way to debug or even fix it?

CPU load is increasing. Now at 60 %-ish.

20C2EC13-7B10-4694-8E61-99B05A0180C0

Some one must know how to debug this...

@Vartkat Did you find any way to debug or even fix it?

No I just removed the addon waiting for a fix.... :-(

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

kjk25 commented

Hi, the same on my Rasp 4
io.hass.base.version | 6.0.0
io.hass.version | 4.5.0
ghcr.io/hassio-addons/influxdb/armv7:4.5.0
Add-on version: 4.5.0
You are running the latest version of this add-on.
System: Raspbian GNU/Linux 11 (bullseye) (armv7 / raspberrypi4)
Home Assistant Core: 2023.3.1
Home Assistant Supervisor: 2023.01.1

grafik

grafik

CPU load is increasing. Now at 60 %-ish.

[image]

Some one must know how to debug this...

Same issue here, restarting the add-on used to fix the high CPU but now it's just constantly hovering around 60% for days with no errors in the logs. Hope someone with more expertise can shed some light.

After asking the question in several other forums with little to no result, I fixed it by moving to the 64 bit OS. I found no other way than the hard one :-/

I actually managed to fix mine too, after searching through similar closed issues. There were two envvars I've added, not sure which did the trick but here they are:

- name: INFLUXDB_DATA_INDEX_VERSION
  value: tsi1
- name: INFLUXDB_MONITOR_STORE_ENABLE
  value: "false"

After the first add-on restart the add-on CPU usage came down to the 30's and after the 2nd is now settled at around 0.1%

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!