Reduce time for which influxdb holds data in cache


20 concurrent requests coming every minute to influxdb to query for some points and all the queries are unique (queries for data from different measurements and with different aggregated functions).

When I do these query to influxdb via influx Http API. I see that the RAM Usage by influxd spikes up and after some time (noticed around 10m), the memory is released. I am guessing that influxdb holds data in cache for serving any similar incoming query.

I wanted to know if the time for which influxdb hold data in cache, can it be reduced?

@amoondra19 We use mmap to allow the underlying OS to take care of caching for us. There are no configurable parameters for that, however the memory is just reserved by Influx, not used so it will be released if it is needed.

@jackzampolin Oh okay. So If I have a subsequent set of requests (with different data query) coming to influxdb, then influxdb will not consume any additional memory but use the existing memory (this assuming the set of queries coming are similar in size to previous set of queries)?

@amoondra19 Yup! The database mmaps the hot shards so that all recent data is readily available for queries.