we are operating InfluxDB in an Openshift Cluster with memory limitations and we frequently face OOMKills. I read several issues and blogs showing that there does not seem to be a way to limit the memory in a good way.
The question would still be if there is some kind of formula like:
Also, althought i think it is on by default in newer versions of Influx, you should check whether you are using the “inmem” or TSI indexing. TSI should help with some of the memory issues.
Unfortunately though there isn’t a lot you can do to restrict memory usage, i use an older version though (1.5.x) so it may have changed recently.
1st guide: Hardware sizing
2nd guide: series cardinality.