We are using InfluxDB v1.8.3 (git: 1.8 563e6c3) as our time-series database in our startup. I create a github issue influxd keeps high memory usage · Issue #21965 · influxdata/influxdb · GitHub, We don’t have any problem for writing data to the database. What we faced is after several queries to the database, our Memory (RAM)usage goes up and never comes down even after the query has finished.
So if we continue to execute a new query to Influxdb, it uses more memory, and at some point, it causes memory and OOM occurs.
I had already checked out this topic, and added this configuration GODEBUG=madvdontneed=1 in /etc/default/influxdb, restarted influxd, and did my test on 2021/08/03. The result is the same. Memory usage is remaining high after querying.
@Ruke_Chen - are you running influxd in a docker container? I wasn’t 100% sure from your description here or in the issue. We’ve got a few open issues related to memory usage, particularly running docker containers, that we are investigating. It’s not a quick fix, but I appreciate you taking the time to write up such clear instructions on how to reproduce the issue so that we can include it in our investigation!
@Ruke_Chen - we’re working pretty hard on performance improvements and memory usage is on the radar. I don’t have any other news right now but we definitely haven’t forgotten about it!