In short, I’d like to know how InfluxDB is using the allocated RAM when using TSI indexes, and possibly even monitor it to understand how much of the memory is used to do what.
My observation is that without any limitation InfluxDB will allocate all the available memory, after setting some OS level limitations to the allocated memory I was afraid to get an out-of-memory (OOM) error, but it kept running without issues, therefore the question became “how much memory is actually needed?”
After looking at docs and old posts I know that memory is used for the following:
- Running the engine itself (GO runtime)
- WAL Caching
- TSI Index Files
- ???
Here I’ve found the following:
The general behavior to expect is that InfluxDB will use as much memory as is available to maintain an in-memory index and fall back to disk for anything else.
{…} after TSI, when the memory limit gets hit, InfluxDB starts referring to those indices. Also, it loads the WAL in-mem, indices are paged in as required.
I’d also like to identify the index files that are memory-mapped (IndexFile) at OS level.
Will influxDB allocate all the available memory or just what it needs to work properly?
Is it possible to estimate or monitor how much memory is needed due to the data (index files)?
Is there something else I’ve left out that consumes memory?
Thanks