-
Enhancement
-
Resolution: Fixed
-
P4
-
9
-
b81
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8141886 | emb-9 | Thomas Schatzl | P4 | Resolved | Fixed | team |
Currently G1 uses separate allocation buffers for the different gc phases (evacuation, soft reference processing): however, PLAB size is determined by overall allocation behavior. It is very expensive in terms of memory usage to size the buffers the same in phases that have a wildly different allocation behavior: evacuation typically allocates a lot, while other phases (soft reference processing) does not.
This often wastes a lot of memory at the end of the phases that do not allocate a lot. Particularly in the soft-reference processing phase, very often only a few objects are kept alive, although G1 sizes the buffer to the same size as for the actual evacuation phase which has a lot more survivors.
Fix this.
One suggestion is to use per-thread single instances of G1ParGCAllocBuffers during the whole GC phase.
This often wastes a lot of memory at the end of the phases that do not allocate a lot. Particularly in the soft-reference processing phase, very often only a few objects are kept alive, although G1 sizes the buffer to the same size as for the actual evacuation phase which has a lot more survivors.
Fix this.
One suggestion is to use per-thread single instances of G1ParGCAllocBuffers during the whole GC phase.
- backported by
-
JDK-8141886 Avoid reallocating PLABs between GC phases in G1
-
- Resolved
-
- blocks
-
JDK-8073146 G1 merges thread local age tables too early with global age table
-
- Resolved
-
- relates to
-
JDK-8030849 Investigate high fragmentation/waste in some situations during allocation during GC in G1
-
- Open
-