I have a problem with the Garbage Collector of my application, I am working in a GCP environment with Kubernetes and BigTable as a data source.
Upon receiving loads, the application does not free up memory space and fills up until k8s restarts the POD. I use a profiler to see the behavior of the JVM and this is the result.
In the "Old Gen" pool it is seen that the memory is full but it never frees the space and it fills up until restarting and starting again.
In the pool "Eden Space" it is seen that while it is filling, the space is freed and never reaches the limit.
This is the JVM configuration when creating the docker image to deploy it in k8s.
java
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseCGroupMemoryLimitForHeap
-XX:+AlwaysPreTouch
-XX:ParallelGCThreads=5
-XX:GCTimeRatio=4
-XX:MaxGCPauseMillis=100
-XX:MinHeapFreeRatio=30
-XX:MaxHeapFreeRatio=30
-Xms512m
-Xmx4608m
This same configuration is applied in another application that makes REST calls and has never had memory filling problems as in this case.
Java version is 1.8
Thankful for your help.
Grettings.