I am relatively new to time series db world . I am running a Influxdb 1.8.x as a docker container, and I have configured the influxdb.conf file as a default config. Currently I am facing a issue of high CPU usage by influxdb, the CPU jumps to 80 to 90% and creating a problem for other process running on same machine. I have tried a solution given here ->> CPU issue but unfortunately It did not work? I am unable to understand the reason behind the issue and also struggling to get support in terms of documentation or community help.
Are you running this on a PI? What is your workload like? How much storage are you using?
@kramik1 Thanks for your comment! Here is my configuration
I am running this in a Docker Environment / Docker Swarm, where each of the Nodes has a configuration of 16 cores and 32 GB RAM and the resources are not restricted currently by docker.
Are there any restrictions on any of the containers? Do you have dedicated SSD storage for influxdb containers? Have you looked at dashboards for influxdb’s internal metrics? I took a quick look at the metrics and see some fields for query response times. Just speaking generically, your database should be able to cache a lot of the often queried data in memory and should have at least 4 CPU cores just to start in production. How many queries are you running a second? The metrics has numbers for how many active queries there are.
Hello @kramik1 Thanks for your response, I was able to resolve the issue with query analysis and CPU profile visualization i.e. using
EXPLAIN ANALYZE<query> there I noticed execution time the I improved the query. Now the container is stable and not eating CPU.
Out of curiosity, what was the query doing to eat so much CPU? Glad you were able to narrow it down so quickly.
I have same problem, but for influxdb 2.0. Have you some idea?
Using latest stable influxdb 2.* Docker image. InfluxDB is a winner in terms of CPU usage:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
f1b5c3ecb19c influxdb 199.29% 426.7MiB / 15.32GiB 2.72% 34.1MB / 12.3MB 643MB / 1.97TB 17
2-3 telegraf agents are sending data every 15 seconds, only me is using Grafana, everything is done in private network. Influxdb CPU usage is not normal.