-
Bug
-
Resolution: Fixed
-
P4
-
24
-
b08
In `SerialHeap::mem_allocate_work`, the decision to allocate in the young generation or old generation is based on the size of the allocation request. If the requested size is too small and the young generation is too full, a full GC is triggered. However, this approach can lead to inefficiencies. For example, if the first object in the young generation is too large to fit into the old generation, it can leave a significant gap at the end of the old generation, wasting space and increasing the frequency of full GCs.
The attached benchmark from Tom Rodriguez demonstrates this issue. You can reproduce it using the following command:
`java -Xmx100m -XX:+UseSerialGC -Xlog:gc StressAdd.java`
When running this benchmark, one can observe over 1000 full GC pauses, highlighting the need for a more efficient allocation strategy.
Prior toJDK-8333786, Serial contains a boolean flag to detect such scenarios (a non empty young-gen after full-gc) so that old-gen is also attempted even for small objects.
The attached benchmark from Tom Rodriguez demonstrates this issue. You can reproduce it using the following command:
`java -Xmx100m -XX:+UseSerialGC -Xlog:gc StressAdd.java`
When running this benchmark, one can observe over 1000 full GC pauses, highlighting the need for a more efficient allocation strategy.
Prior to
- relates to
-
JDK-8333786 Serial: Remove SerialHeap::_incremental_collection_failed
-
- Resolved
-
-
JDK-8333386 TestAbortOnVMOperationTimeout test fails for client VM
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/ad01dfb6
-
Review(master) openjdk/jdk/22899
-
Review(master) openjdk/jdk/23270