Java Reference
In-Depth Information
5.350: [GC pause (young) (initial-mark) 0.349: [G1Ergonomics
(CSet Construction) start choosing CSet, _pending_cards:
1624, predicted base time: 19.74 ms, remaining time: 180.26 ms,
target pause time: 200.00 ms]
This indicates that the humongous allocation occurred, triggering a concurrent G1 cycle. In
this entry, the allocation succeeded without other effects on GC (G1 happened to find the
needed contiguous regions).
If no contiguous regions are found, G1 will run a full GC:
25.270: [G1Ergonomics (Heap Sizing) attempt heap expansion,
reason: allocation request failed, allocation request: 48 bytes]
25.270: [G1Ergonomics (Heap Sizing) expand the heap,
requested expansion amount: 1048576 bytes,
attempted expansion amount: 1048576 bytes]
25.270: [G1Ergonomics (Heap Sizing) did not expand the heap,
reason: heap expansion operation failed]
25.270: [Full GC 1535M->1521M(3072M), 1.0358230 secs]
[Eden: 0.0B(153.0M)->0.0B(153.0M)
Survivors: 0.0B->0.0B Heap: 1535.9M(3072.0M)->1521.3M(3072.0M)]
[Times: user=5.24 sys=0.00, real=1.04 secs]
Because the heap could not be expanded to accommodate the new humongous object, G1
had to perform a full GC to compact the heap in order to provide the contiguous regions
needed to fulfill the request, Without the additional logging provided by enabling PrintAd-
aptiveSizePolicy , the standard G1 GC log does not provide enough information to dia-
gnose this situation.
To prevent this full GC, first determine the size of the humongous objects that are causing
the issue (that value is in the log above: 524,304 bytes in this example). A better next step is
to reduce the size of those objects rather than tune the JVM around them. If that is not pos-
sible, calculate the region size that will be needed to accommodate those objects. G1 con-
siders an object to be humongous if it will fill more than 50% of a region. Hence, if the ob-
ject in question is 524,304 bytes, the G1 region size needs to be at least 1.1 MB. Since G1 re-
gions are always a power of 2, the G1 region size must be set to 2 MB in order for those ob-
jects to be allocated in a standard G1 region.
Search WWH ::

Custom Search