java memory log analysis

 

GC start of the log "[GC" and "[Full GC" describes the type of garbage collection pause, rather than used to distinguish the new generation of GC or GC years old. If there is "Full", explained the GC is happening Stop-The-World, for example, the following piece of the new generation of collectors ParNew log will appear "[Full GC" (This is usually because there has been a failure of guarantee allocation the class of problem, so that led to STW). If collection calls System.gc () method is triggered, it will appear here "[Full GC (System)".

 

The next "[DefNew", "[Tenured", "[Perm" represents a region GC occurred, GC collector region name used here is closely related to, for example, Serial sample collector used in the above the new generation called "DefaultNew Generation", it shows "[DefNew". If ParNew collector, the name of the new generation will become "[ParNew", which means "Parallel New Generation". If Parallel Scavenge collector, and that it is supporting the new generation called "PSYoungGen", years old and permanent generations Similarly, the name is determined by the collector. Inside brackets following "3324K-> 152K (3712K)" means "GC front area of ​​memory used capacity -> GC after the memory area used capacity (total capacity of the memory area)." In addition to square brackets "3324K-> 152K (11904K)" represents "GC before the Java heap used capacity -> after GC Java heap used capacity (Java heap total capacity)."

 

eclipse print gc log configuration parameters

-verbose:gc -Xms20M -Xmx20M -Xmn10M -XX:+PrintGCDetails

-XX:SurvivorRatio=8 -XX:PermSize=1M -XX:MaxPermSize=2M 

Configuration class loading / unloading  

-verbose:class -XX:+TraceClassLoading -XX:+TraceClassUnloading

Guess you like

Origin www.cnblogs.com/yanghaolie/p/11653445.html