I have configured java to dump garbage collection information into the logs (verbose GC). I am unsure of what the garbage collection entries in the logs mean. A sample of these entries are posted below. I've searched around on Google and have not found solid explanations.
I have some reasonable guesses, but I'm looking for answers which provide strict definitions of what the numbers in the entries mean, backed up by credible sources. An automatic +1 to all answers which cite sun documentation. My questions are:
8109.128: [GC [PSYoungGen: 109884K->14201K(139904K)] 691015K->595332K(1119040K), 0.0454530 secs]
8112.111: [GC [PSYoungGen: 126649K->15528K(142336K)] 707780K->605892K(1121472K), 0.0934560 secs]
8112.802: [GC [PSYoungGen: 130344K->3732K(118592K)] 720708K->607895K(1097728K), 0.0682690 secs]
Java Garbage Collector (GC) logs are used for memory management and object allocation and promotion. GC logs consist of critical information such as the duration of the GC process, the number of objects promoted, and more. It includes details of the entire GC process and the resources it uses.
PSYoungGen refers to the garbage collector in use for the minor collection. PS stands for Parallel Scavenge. The first set of numbers are the before/after sizes of the young generation and the second set are for the entire heap. ( Diagnosing a Garbage Collection problem details the format)
An example of an associated full GC also shows the collectors used for the old and permanent generations:
3.757: [Full GC [PSYoungGen: 2672K->0K(35584K)] [ParOldGen: 3225K->5735K(43712K)] 5898K->5735K(79296K) [PSPermGen: 13533K->13516K(27584K)], 0.0860402 secs]
Finally, breaking down one line of your example log output:
8109.128: [GC [PSYoungGen: 109884K->14201K(139904K)] 691015K->595332K(1119040K), 0.0454530 secs]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With