-
Enhancement
-
Resolution: Unresolved
-
P4
-
16, 17
In the slow path for PLAB allocation G1 needs to determine whether it should discard the current PLAB buffer to allocate an object or do direct allocation.
To keep the waste percentage goal of 10% (i.e. ParallelGCBufferWastePct) it always directly allocates objects that are larger than ParallelGCBufferWastePct percent of the current PLAB size.
This works to keep this goal, but raises one question and one issue:
- wouldn't it be more direct to check for whether the remaining PLAB space is < 10% of PLAB size? (I think the checks are equivalent in this case; document this!)
- there can be a pathological case (which the test/hotspot/jtreg/gc/g1/plab/TestPLABPromotion.java test exercises) where if the application only has allocations larger than that threshold, no PLAB allocation will be done after some point - which is slow.
There should be some dynamic change (increase) of that threshold based on failures.
This heuristic has been in G1 since initial import.
To keep the waste percentage goal of 10% (i.e. ParallelGCBufferWastePct) it always directly allocates objects that are larger than ParallelGCBufferWastePct percent of the current PLAB size.
This works to keep this goal, but raises one question and one issue:
- wouldn't it be more direct to check for whether the remaining PLAB space is < 10% of PLAB size? (I think the checks are equivalent in this case; document this!)
- there can be a pathological case (which the test/hotspot/jtreg/gc/g1/plab/TestPLABPromotion.java test exercises) where if the application only has allocations larger than that threshold, no PLAB allocation will be done after some point - which is slow.
There should be some dynamic change (increase) of that threshold based on failures.
This heuristic has been in G1 since initial import.
- relates to
-
JDK-8288966 Better handle very spiky promotion in G1
- Resolved
-
JDK-8290966 G1: Record number of PLAB filled and number of direct allocations
- Resolved
-
JDK-8315219 G1: Improve allocator pathological case where it keeps doing direct allocations instead of retiring a PLAB
- Resolved