Why does the GC increase after performing the execution of the allocated size of the constant generation?

Below are the snapshots taken after executing the GC from jvisualvm. Heap stats and Permgen stats

The first image is heap statistics, and the second is permenting statistics. I cannot understand when the GC used heap size decreased (as expected), but the increased constant generation size increased (although the used pergman size remained the same). What could be the possible explanation of such behavior?

JVM arguments used

 -Xbootclasspath/p:../xyz.jar -Xbootclasspath/a:../abc.jar -Djava.endorsed.dirs=../resolver -Djava.library.path=../framework -Djavax.management.builder.initial=JBeanServerBuilder -Djavax.net.ssl.trustStore=../certs -Dorg.mortbay.log.class=JettyLogger -Xms128m -Xmx256m -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=2000 

Note. I changed the name (ex xyz.jar) for reasons related to the sentence.

JVm Information:

 JVM: Java HotSpot(TM) 64-Bit Server VM (23.6-b04, mixed mode) Java: version 1.7.0_11, vendor Oracle Corporation Java Home: /home/aniket/jdk1.7.0_11/jre JVM Flags: <none> 
+7
java garbage-collection jvm permgen heap-memory
source share
2 answers
  • Separating memory cells / Perm / Eden / Young / S 1 / S2 with memory, etc. depend on the underlying algorithm used for the GC.
  • The allocation of memory to the above spaces is not defined as parameters of absolute values. They are defined as relations to the total / perm heap available to the JVM.
  • Above two points, it is probably indicated that when the heap size is changed, all memory allocations to all spaces are re-evaluated to maintain the relationship that is defined.

The link below will be really useful:

http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html

+3
source share

since no one gives an answer, I give my comment, although this is a bit vague:

I would suggest that the GC overestimates the various sizes that it should control as part of the collection's launch. Thus, he can decide that he is a little tense on the side of the Permian generation of things. Increase it.

+1
source share

All Articles