Irregular use of Memory resources inside docker container

Hello , we are noticed that InfluxDB ( 1.8.9 ) is allocating to much memory inside the docker image. But as you can see in the picture in HeapAlloc/HeapInUse shows the correct behaviour of our current load. ( ~2Gb in front of ~20Gb of

This fact is specially annoying because it is working inside a kubernetes pod sharing memory with many other services that needs for this memory if not currently needed for influxdb.

How can I force free unused memory ?

I’ve found this golang issue about this same problem. (runtime: GC: heap idle is not released to linux · Issue #33376 · golang/go · GitHub) , it seems that like this GOLANG variable could help GODEBUG=madvdontneed=1 . did anybody test it?