Understand Java GC logs and JavaGC logs
Analyze the following GC logs:
[GC [PSYoungGen: 9216 K-> 1024 K (9216 K)] 1246196 K-> 1246220 K (1287040 K), 0.2398360 secs] [Times: user = 0.29 sys = 0.01, real = 0.24 secs]
[Full GC [PSYoungGen: 1024 K-> 0 K (9216 K)] [ParOldGen: 1245196 K-> 1245509 K (1492992 K)] 1246220 K-> 1245509 K (1502208 K) [PSPermGen: 2402 K-> 2402 K (21248 K)], 11.7459250 secs] [Times: user = 19.42 sys = 0.03, real = 11.75 secs]
- The GC and Full GC at the beginning of the log indicate the pause type of garbage collection;
- The most advanced PS in PSYoungGen indicates that the garbage collector is the Parallel Scavenge collector, and the reclaimed area is the new generation (YoungGen)
- The first Par in ParOldGen indicates that the garbage collector is the ParNew collector, and the reclaimed area is the old age (YoungGen ).
- 9216 K-> 1024 K (9216 K) in square brackets) 9 indicates that the memory area used before GC-> the memory area used after GC (the total capacity of the memory area ).
- 1246196 K-> 1246220 K (1287040 K) indicates the capacity used by the Java heap before GC-> the capacity used by the Java heap after GC (the total capacity of the Java heap ).
- 0.2398360 secs indicates the time occupied by GC.