Influx memory usage

influxdb
#1

Hi, I’ve noticed high memory usage for influxd process.

We have a database storing about 38000 series, data resolution is 1h, data range is last 3 years.
influxd process is using minimum 13G of memory all the time, and when I’m trying to copy data memory usage peak is sometimes more than 30G.

I need to copy one influx database into another (the reason is that when I want to regenerate production database then I’m regenerating database on a temporary influx database to avoid downtime and also because this is failsafe. Then when the temporary database is generated I just want to copy or rename it into production).

This proved very hard for Influx database, please see this: https://github.com/influxdata/influxdb/issues/7758#issuecomment-336479123

I came with a solution:

This is a custom program to copy all series from one database into another. I’m quite sure that I’m doing all things right. All connections are closed, resources freed etc. program itself consumes maximum 400M of memory, but influxd process can go as high as 31G !!

How can I control influxd memory usage? What can I do?

What other details can I provide to help?
lukaszgryglicki@o2.pl

Addressing the growing RAM vs usage issue, aka, unexpected "out of memory"
#2

Same problem, v1.3.6 aJust rebooted, no queries, no writes, and memory usage went through the room VIRT=20.7G, RES, 9.69G, SHR 3.9G for influx