-
Bug
-
Resolution: Fixed
-
P3
-
9, 11, 12, 13, 14, 15, 16
-
b02
When using hbase PerformanceEvaluation to do some writing performance tests,I found jdk11 slower by about 20%-30% than jdk8 with -XX:-ResizePLAB.
The returned desired_plab_sz is different between 8 and 11. When disabling ResizePLAB the desired_plab_sz should return default PLAB size, but actually in jdk11 the code returns PLABSize/no_of_gc_workers. JDK8 returns the default PLAB size.
Young/OldPLABSize are different in jdk11, resulting in much more direct allocation in some situations, e.g. hbase PerformanceEvaluation which will create many big objects.
The same result for jdk/jdk
Proposed fix:
diff --git a/src/hotspot/share/gc/shared/plab.cpp b/src/hotspot/share/gc/shared/plab.cpp
index 2afde91..7a5e108 100644
--- a/src/hotspot/share/gc/shared/plab.cpp
+++ b/src/hotspot/share/gc/shared/plab.cpp
@@ -135,6 +135,9 @@ void PLABStats::log_sizing(size_t calculated_words, size_t net_desired_words) {
// Calculates plab size for current number of gc worker threads.
size_t PLABStats::desired_plab_sz(uint no_of_gc_workers) {
+ if (!ResizePLAB) {
+ return _desired_net_plab_sz;
+ }
return align_object_size(clamp(_desired_net_plab_sz / no_of_gc_workers, min_size(), max_size()));
}
The returned desired_plab_sz is different between 8 and 11. When disabling ResizePLAB the desired_plab_sz should return default PLAB size, but actually in jdk11 the code returns PLABSize/no_of_gc_workers. JDK8 returns the default PLAB size.
Young/OldPLABSize are different in jdk11, resulting in much more direct allocation in some situations, e.g. hbase PerformanceEvaluation which will create many big objects.
The same result for jdk/jdk
Proposed fix:
diff --git a/src/hotspot/share/gc/shared/plab.cpp b/src/hotspot/share/gc/shared/plab.cpp
index 2afde91..7a5e108 100644
--- a/src/hotspot/share/gc/shared/plab.cpp
+++ b/src/hotspot/share/gc/shared/plab.cpp
@@ -135,6 +135,9 @@ void PLABStats::log_sizing(size_t calculated_words, size_t net_desired_words) {
// Calculates plab size for current number of gc worker threads.
size_t PLABStats::desired_plab_sz(uint no_of_gc_workers) {
+ if (!ResizePLAB) {
+ return _desired_net_plab_sz;
+ }
return align_object_size(clamp(_desired_net_plab_sz / no_of_gc_workers, min_size(), max_size()));
}
- relates to
-
JDK-8079555 REDO - Determining the desired PLAB size adjusts to the the number of threads at the wrong place
-
- Resolved
-
-
JDK-8258481 gc.g1.plab.TestPLABPromotion fails on Linux x86
-
- Resolved
-