Serial and CMS GC implement the GCOverheadLimit mechanism that makes the VM bail out with an OOME if the amount of GC activity has been too high recently.
The implementation in CollectedHeap::common_mem_allocate_noinit() however only considers GC activity in the super-slow path when calling CollectedHeap::mem_allocate().
Any GC issued during the call to allocate_from_tlab() is not considered in this calculation, but both Serial and CMS may run GCs at that time.
So both collectors might issue many more GCs before bailing out.
Parallel GC is fine, it does never issue a GC while trying to allocate a new TLAB.
This seems to be a "day one" omission.
The implementation in CollectedHeap::common_mem_allocate_noinit() however only considers GC activity in the super-slow path when calling CollectedHeap::mem_allocate().
Any GC issued during the call to allocate_from_tlab() is not considered in this calculation, but both Serial and CMS may run GCs at that time.
So both collectors might issue many more GCs before bailing out.
Parallel GC is fine, it does never issue a GC while trying to allocate a new TLAB.
This seems to be a "day one" omission.
- relates to
-
JDK-8309265 Serial: Remove the code related to GC overhead limit
- Resolved
-
JDK-8308983 Let UseGCOverheadLimit work independently of UseAdaptiveSizePolicy in parallel GC
- Open
- links to
-
Review openjdk/jdk/14120