Why is Internal memory in java Native Memory Tracking increasing Why is Internal memory in java Native Memory Tracking increasing docker docker

Why is Internal memory in java Native Memory Tracking increasing


This is not answer to your question, it is just a workaround.

I have observed same problem in docker containers running JRuby on java version "1.8.0_45". The solution was to explicitly invoke Garbage Collection. I have absolutely no idea, why this works, but after GC Internal Java memory returned to 8MB.


Recently Our application met the same problem. In our case, we use netty, and netty allocate direct memory, when many io connnection exists, the internal memory in java Native Memory Tracking increasing.
And finalllyWe use two parameters to limit the native memory.

-Dio.netty.maxDirectMemory=1073741824-XX:MaxDirectMemorySize=1024m


Do you have -XX:+DisableExplicitGC configured?

If yes, please remove that.

If no "-XX:+DisableExplicitGC" configured, how about the situation after triggering a full GC via JConsole