How to calculate influxDB memory usage based on wal and data size



I would like to understand how much memory influxDB will be used just for the wal files and tsm files stored. I would like to troubleshoot the memory issue with my influxDB. I am using grafana to query the influxDB. Recently I noticed that influxDB crashed very often because of the OOM killer. I would like to increase the memory for my influxDB node, but before that, I would like to have a understanding of how to calculate the memory usage for my influxDB.

I have two databases in my influxDB: k8s and monitoring and my node has 32GB memory. I have the following file size before my influxDB crashed:

139M /data_influx/data/_internal
29G /data_influx/data/k8s
25G /data_influx/data/monitoring
13k /data_influx/meta/meta.db
52M /data_influx/wal/_internal
208M /data_influx/wal/k8s
449M /data_influx/wal/monitoring

Is there a way I can calculate the memory usage(without taking into account the query usage) based on the data size above? I tried to search from internet but there seems to be no that kind of information.