Improving the performance of InfluxDB

When I try to use the select expression with where and group by functions I face the problem of running out of RAM and interrupting the host (only 2Gb RAM). I have a database with 8 measurements in each of which 10-15 fields. Each measurement has ~1.8 M rows (10s intervals in 7 month). What are some tips to improve performance. Whether there are InfluxDB internal means to limit the RAM usage?

Hi ,

do you have a and time > now() - … in the select ?
best regards

Of course, this is one of the tags I group by. Namely, group by time < now()-*for example 1 month*

ok i meant in the where clause … can you give a complete select expression that causes the server to run out of RAM ?

Also, as far as i know there is no limit to memory consumption and you cannot change this. I’m on an older version though (1.5.2) it might have changed in more recent versions.

You could look into the difference between inmem and tsi.

SELECT mean(*) INTO DB.RP.:MEASUREMENT FROM DB.AUTOGEN./.*/ WHERE time>now()-30d GROUP BY time(1d), second_tag
This query causes a running out of RAM. The second_tag can take one of 7 values.

You need to switch to TSI for your index instead of inmem. It will increase performance and help alleviate situations where you may run out of memory. I can’t promise this will solve your problem, but it should help it