I do not understand what exactly the G1GC GC logs mean(when adding PrintGCDetails and PrintGCTimeStamps). Can someone shed light on the syntax?
[
GC pause (young), 0.03067078 secs]
[SATB Drain Time: 0.2 ms]
[Parallel Time: 22.6 ms]
[GC Worker Start Time (ms): 165213430.0 165213430.0 165213430.0 165213430.0 165213430.0 165213430.0 165213430.1 165213430.1]
[Update RS (ms): 10.7 10.0 11.1 9.9 9.9 11.2 10.6 8.6
Avg: 10.3, Min: 8.6, Max: 11.2]
[Processed Buffers : 14 8 8 12 9 11 10 8
Sum: 80, Avg: 10, Min: 8, Max: 14]
[Ext Root Scanning (ms): 2.5 2.6 2.9 3.4 3.3 2.7 2.6 2.4
Avg: 2.8, Min: 2.4, Max: 3.4]
[Mark Stack Scanning (ms): 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2
Avg: 0.3, Min: 0.0, Max: 2.2]
[Scan RS (ms): 4.0 4.1 3.1 3.7 3.9 3.2 3.8 3.9
Avg: 3.7, Min: 3.1, Max: 4.1]
[Object Copy (ms): 4.7 5.3 4.7 4.8 4.7 4.7 4.8 4.7
Avg: 4.8, Min: 4.7开发者_StackOverflow中文版, Max: 5.3]
[Termination (ms): 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Avg: 0.0, Min: 0.0, Max: 0.0]
[Termination Attempts : 23 1 26 23 19 29 22 25
Sum: 168, Avg: 21, Min: 1, Max: 29]
[GC Worker End Time (ms): 165213452.3 165213452.3 165213452.3 165213452.3 165213452.3 165213452.3 165213452.3 165213452.3]
[Other: 0.7 ms]
[Clear CT: 0.6 ms]
[Other: 7.3 ms]
[Choose CSet: 0.0 ms]
[ 3329M->3245M(6000M)]
And what does full GC mean ? Is it a pause is it parallelized ? which GC algorithm is used? Why did G1 decided to use it ?
5.941: [Full GC 7891K->4756K(6000M), 0.1939233 secs]
Few information on "Is it a pause is it parallelized ?" In Java parlance, GC are two types (based on concurrency with mutator i.e. application) - (1)Stop-the-world (2)Concurrent
Stop-the-world GC are further sub-categorized as - 1a)Stop-the-world if the number of GC threads is one 1b)Parallel if the number of GC threads is more than one
The following is from reading between the lines of the (rather limited) material I could find online on G1 GC. (There's a paper from 2004 behind a paywall, a slideshow from JavaWorld 2008, and the G1 GC page. If anyone has other links, please add them.)
And what does full GC mean ?
As with other HotSpot GCs, the heap is divided into a New or Eden space, Survivor space(s) and Old or Tenured Object space. However, unlike other HotSpot GCs, G1 uses multiple regions to hold the spaces.
Normally, the G1 collector runs incrementally in parallel with application threads, tracing and "evacuating" objects into other regions. However, it appears that the collector can sometimes get so far behind that it has to stop everything, and use all available processors to collect all of the heap regions. I think that this is a full GC.
Is it a pause is it parallelized ?
I think it is parallelized, but also stop-the-world.
which GC algorithm is used?
It is not clear.
Why did G1 decided to use it ?
See above. It got too far behind and the heap was full of garbage.
From oracle g1gc blog and technetwork article
And what does full GC mean ?
For G1GC, any object that is more than half a region size is considered a "Humongous object". Such an object is allocated directly in the old generation into "Humongous regions". These Humongous regions are a contiguous set of regions.
Dead Humongous objects are freed
at the end of the marking cycle during the cleanup phase also during a full garbage collection cycle.
In-order to reduce copying overhead, the Humongous objects are not included in any evacuation pause. A full garbage collection cycle compacts Humongous objects in place.
Generally Full GC is cleans entire Heap – both Young and Tenured spaces (old gen)
On a different note, you have to worry about how much time "application threads were stopped" irrespective of GC type : Young GC or Full GC etc.
Is it a pause is it parallelized?
YounGC is parallelized but not FullGC
Full GCs: Currently G1 full gc is single threaded and very slow,
we should try to avoid full gcs as much as possible ( From oracle article)
which GC algorithm is used?
Do you mean Young GC/Major GC/Full GC? From your logs, it's Full GC for last line and YounGC for first line.
Why did G1 decided to use it ?
Explained in response for first query.
Regarding G1GC fine tuning, have look at oracle article and related SE question
精彩评论