8233850: Shenandoah: Shenandoah thread count ergonomics should be container aware
authorzgu
Fri, 08 Nov 2019 11:41:17 -0500
changeset 58989 f92ef5d182b5
parent 58987 3760767a7231
child 58990 7f1d2c3a99da
8233850: Shenandoah: Shenandoah thread count ergonomics should be container aware Reviewed-by: rkennke
src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp	Fri Nov 08 08:12:04 2019 -0800
+++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp	Fri Nov 08 11:41:17 2019 -0500
@@ -71,7 +71,7 @@
   // compromise here.
   bool ergo_conc = FLAG_IS_DEFAULT(ConcGCThreads);
   if (ergo_conc) {
-    FLAG_SET_DEFAULT(ConcGCThreads, MAX2(1, os::processor_count() / 4));
+    FLAG_SET_DEFAULT(ConcGCThreads, MAX2(1, os::initial_active_processor_count() / 4));
   }
 
   if (ConcGCThreads == 0) {
@@ -85,7 +85,7 @@
   // the number of concurrent threads.
   bool ergo_parallel = FLAG_IS_DEFAULT(ParallelGCThreads);
   if (ergo_parallel) {
-    FLAG_SET_DEFAULT(ParallelGCThreads, MAX2(1, os::processor_count() / 2));
+    FLAG_SET_DEFAULT(ParallelGCThreads, MAX2(1, os::initial_active_processor_count() / 2));
   }
 
   if (ParallelGCThreads == 0) {