-
Enhancement
-
Resolution: Unresolved
-
P3
-
9
Leading up to these GCs, as mentioned, there are typically many mixed GCs with their respective marking cycles, but these mixed GCs do not manage to reclaim anything, actually growing the heap.
There is the CRM Fuse benchmark where we particularly increased the heap region size (to 4M) to avoid very frequent large objects which G1 otherwise does not handle well at all at the moment.
Some initial investigation with -XX:+ParallelGCVerbose indicates that waste due to PLABs is already very high in the regular case (in total 8M for about 35-40M of copying into survivor or old gen), but extremely high in these cases when mixed GCs increases the heap size (>24M).
The current suspicion is that the allocators for the evacuation are not able to avoid waste; the PLAB resizing of G1 also likely contributes to that (PLABs may basically be additional large objects), but the main factor should be these frequent large objects (up to 2M) in the young gen, that cause G1 to retire the current allocation regions.
First, this situation must be investigated further, and the assumptions verified and some object size and fragmentation/waste information obtained; then some idea developed to mitigate this issue. Some possible solutions could be:
- limiting maximum PLAB size to decrease waste due to too large PLABs (if this is a problem)
- if the problem is the waste at the end of a region because of largish objects coming in: improve the allocator to not retire a region, but keep the tails available for further PLAB allocation, and just allocate the large object somewhere else
- analyze the current code that attempts to mitigate this issue (two allocation LABs per thread), maybe extending it
- something else
This is the umbrella issue resulting in further work/issues.
- relates to
-
JDK-8067339 PLAB reallocation might result in failure to allocate object in that recently allocated PLAB
- Resolved
-
JDK-8140585 PLAB statistics are flushed too late
- Resolved
-
JDK-8147121 Evacuation failure allocation statistics added too late
- Resolved
-
JDK-8185939 Random OOME while Stream.parallel().collect() when using GC1
- Closed
-
JDK-8046418 High system time for PLAB allocations in highly threaded applications
- Open
-
JDK-8067433 Keep waste at end of regions for further allocation during GC
- Open
-
JDK-8073051 Add information about copied data between and within generations
- Open
-
JDK-8133724 Reconsider allocation of larger objects in PLABs
- Open
-
JDK-8140330 Keep multiple retained old gen regions across GCs
- Open
-
JDK-8229373 Reserve more than MaxHeapSize for the heap to fight humongous object fragmentation in G1
- Open
-
JDK-6976350 G1: deal with fragmentation while copying objects during GC
- Resolved
-
JDK-8034948 Back out JDK-6976350 since it does not fix any issue
- Resolved
-
JDK-8040162 Avoid reallocating PLABs between GC phases in G1
- Resolved
-
JDK-8067336 Allow that PLAB allocations at the end of regions are flexible
- Resolved
-
JDK-8067341 Modify PLAB sizing algorithm to waste less
- Resolved
-
JDK-8071462 Remove G1ParGCAllocator::alloc_buffer_waste
- Resolved
-
JDK-8073466 Remove buffer retaining functionality and clean up in ParGCAllocBuffer
- Resolved
-
JDK-8074546 Rename and clean up the ParGCAllocBuffer class
- Resolved
-
JDK-8131319 Move G1Allocator::_summary_bytes_used back to G1CollectedHeap
- Resolved
-
JDK-8131344 Missing klass.inline.hpp include in compiler files
- Resolved
-
JDK-8133470 Uses of Atomic methods in plab.hpp should be moved to .inline.hpp file
- Resolved
-
JDK-8141141 Young and Old gen PLAB stats are similar in output with -XX:+PrintPLAB
- Resolved
-
JDK-8148376 Test for PLAB behavior at evacuation failure.
- Resolved
-
JDK-8073052 Rename and clean up the allocation manager hierarchy in g1Allocator.?pp
- Resolved
-
JDK-8133042 Remove some direct accesses of G1Allocator to G1CollectedHeap members
- Resolved
-
JDK-8133043 Clean up code related to termination stats printing
- Resolved
-
JDK-8133047 Rename G1ParScanThreadState::_queue_num to _worker_id
- Resolved
-
JDK-8073317 Move all region level allocation related things into AllocRegionManager
- Closed
-
JDK-8133805 Remove the bot_updates parameter from G1Allocator's allocation methods
- Closed
-
JDK-8073146 G1 merges thread local age tables too early with global age table
- Resolved
-
JDK-8079555 REDO - Determining the desired PLAB size adjusts to the the number of threads at the wrong place
- Resolved
-
JDK-8073204 Determining the desired PLAB size adjusts to the the number of threads at the wrong place
- Closed
-
JDK-8069085 PLAB sizing during young gc impacts mixed gc negatively
- Open
-
JDK-8073013 Add detailed information about PLAB memory usage
- Resolved
-
JDK-8133530 Add JFR event for evacuation statistics
- Resolved
-
JDK-8131166 Remove additional whitespace in G1Allocator
- Resolved