I. Related orders
Use the GC log command-line options to:
-xx:+printgctimestamps
-xx:+printgcdetails
-xloggc:<filename>
Second, detailed
JVM "-server"
GlassFish Application Server-server start the garbage collector by default combination of
New generation: Parallel Scavenge parallel recovery GC
Older generation and durable generation: Parallel old parallel GC
GC Log Printing information:
-xx:+printgctimestamps output Format:
289.556: [GC [psyounggen:314113k->15937k (300928K)] 405513k->107901k (407680K), 0.0178568 secs] [times:user=0.06 sys=0.00, real=0.01 secs]
293.271: [GC [Psyounggen:300865k->6577k (310720K)] 392829k->108873k (417472K), 0.0176464 secs] [times:user=0.06 sys=0.00, real=0.01 secs]
Description
293.271 is the time from the start of the JVM until the garbage collection takes place, and the GC indicates that this is a minor GC (generation garbage collection); [psyounggen:300865k->6577k (310720K)] Provides information about the new generation of space, Psyounggen, which indicates that the new generation uses a multithreaded garbage collector parallel scavenge. 300865K indicates that the new generation occupies space before garbage collection, and 6577K represents the new generation of space after garbage collection. The Cenozoic is subdivided into one Eden area and two survivor areas, Minor GC after the Eden area is empty, 6577K is the space occupied by survivor. The 310720K in parentheses represents the size of the entire young generation.
392829k->108873k (417472K), which indicates the size of the Java heap (total heap 417472K) before (392829K) and after garbage collection (108873K) The heap size includes the Cenozoic and the old Generation) by the new generation and Java heap occupancy size can be calculated out of the old generation occupied space, such as Java heap size 417472K, the Cenozoic size of 310720K so the old generation occupied space is 417472k-310720k=106752k Garbage collection before the old age occupied space for 392829k-300865k=91964k garbage collection after the old age occupied space 108873k-6577k=102296k.
0.0176464 secs represents the time spent in the garbage collection process.
[times:user=0.06 sys=0.00, real=0.01 secs] provides CPU usage and time consumption, user mode garbage collection consumes CPU time, The garbage collector consumes 0.06 seconds of user-state CPU time in the instance, SYS is the CPU time consumed by the system, and real refers to the actual time consumed by the garbage collector.
-xx:+printgcdetails output Format:
293.289: [Full GC [psyounggen:6577k->0k (310720K)]
[Psoldgen:102295k->102198k (134208K)] 108873k->102198k (444928K)
[pspermgen:59082k->58479k (104192K)], 0.3332354 secs]
[times:user=0.33 sys=0.00, real=0.33 secs]
Description
Full GC indicates the global garbage collection is performed
[psyounggen:6577k->0k (310720K)] Provides a new generation of spatial information, explaining ibid.
[Psoldgen:102295k->102198k (134208K)] provides the information of the old generation space;
108873k->102198k (444928K) entire heap space information;
[pspermgen:59082k->58479k (104192K)] provides persistent generation space information.
------------------------------------------------------------
JVM "-client"
GlassFish Application Server default-client start garbage collector The default combination is
Cenozoic: Serial serial GC (Cenozoic uses-XX:+USESERIALGC collector)
Older generation and durable generation: Serial old serial GC
GC Log Printing information:
-xx:+printgctimestamps output Format:
9.007: [GC 9.007: [defnew:13526k->1060k (14400K), 0.0041350 secs] 44692k->32226k (46108K), 0.0041767 secs] [times:u ser=0.01 sys=0.00, real=0.01 secs]
9.259: [GC 9.259: [defnew:13924k->1089k (14400K), 0.0042760 secs] 45090k->32650k (46108K), 0.0043143 secs] [times:u ser=0.02 sys=0.00, real=0.02 secs]
Description
Defnew indicates that the Cenozoic uses serial serial GC garbage collector, Defnew provides the Cenozoic space information;
Defnewgeneration is the default new generation.
-xx:+printgcdetails output Format:
9.348: [GC 9.348: [defnew:13953k->976k (14400K), 0.0040943 secs]9.352: [tenured:32163k->32220k (32220K), 0.1182207 secs] 45514k->32338k (46620K), [perm:30467k->30467k (65536K)], 0.1224318 secs] [times:user=0.12 sys= 0.00, real=0.13 secs]
Defnew: Indicates the Cenozoic uses serial serial GC garbage collector, Defnew provides the Cenozoic space information;
Tenured: Provide space information for older generations;
45514k->32338k (46620K): The whole heap space size information;
Perm: Provide persistent generation space information;
Java GC Log Parsing