We have an an enterprise application deployed in wildfly 8.2 with min & max heap set to 1.5 GB. One of the actions is causing too much objects to be loaded into the heap. Although the object is dereferenced after the action, the jvm heap usage is not coming down.
But, if I manually trigger GC externally(using jcmd), I am seeing a huge dip in the heap usage. Why is normal GC not reducing the memory as much as GC.run?
JVM settings
-Xms1536m -Xmx1536m -XX:MaxMetaspaceSize=512m -XX:ReservedCodeCacheSize=128M -server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Djsse.enableSNIExtension=false -Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000