JVM memory is not released when the load decreases
JVM memory is not getting released even after the load on PRPC reduces.
Also here is the graph of Webtier JVM heap trending downwards. GC is also picking up, however it is not making a dent on memory consumed.
Error MessagesNot Applicable
Steps to ReproduceNot Applicable; issue in runtime environment.
It is not clear from this graph if there is a leak or if the application is just caching more data. Heap limit is set to 10GB and even 60% of that limit is not reached. It could be that the Java runtime is holding on to stuff for efficiency reasons.
Afterwards while taking the Heap Dump the memory decreases to around 3 GB from 6 GB. This is because in general full GC will be triggered before performing heap dump.
The question arises that why there are no major GC happened earlier before taking the Heap Dump. The probable answer might be that there are many short lived objects being allocated and a minor GC occurring, clearing them out. At the same time there were quite a lot of unreachable objects hanging around, which belongs to old generation. Then we made a heap dump which is itself an operation which consumes a lot of memory and as a result a major collection happened.
Whenever the heap usage reaches near 10 GB, the full GC occurs. This brings down the heap usage. This is an expected behaviour of JVM.
Published November 5, 2016 - Updated December 9, 2016