Skip to content

Commit 3b8a1c1

Browse files
committedNov 8, 2019
8233850: Shenandoah: Shenandoah thread count ergonomics should be container aware
Reviewed-by: rkennke
1 parent b7dd1af commit 3b8a1c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void ShenandoahArguments::initialize() {
7171
// compromise here.
7272
bool ergo_conc = FLAG_IS_DEFAULT(ConcGCThreads);
7373
if (ergo_conc) {
74-
FLAG_SET_DEFAULT(ConcGCThreads, MAX2(1, os::processor_count() / 4));
74+
FLAG_SET_DEFAULT(ConcGCThreads, MAX2(1, os::initial_active_processor_count() / 4));
7575
}
7676

7777
if (ConcGCThreads == 0) {
@@ -85,7 +85,7 @@ void ShenandoahArguments::initialize() {
8585
// the number of concurrent threads.
8686
bool ergo_parallel = FLAG_IS_DEFAULT(ParallelGCThreads);
8787
if (ergo_parallel) {
88-
FLAG_SET_DEFAULT(ParallelGCThreads, MAX2(1, os::processor_count() / 2));
88+
FLAG_SET_DEFAULT(ParallelGCThreads, MAX2(1, os::initial_active_processor_count() / 2));
8989
}
9090

9191
if (ParallelGCThreads == 0) {

0 commit comments

Comments
 (0)
Please sign in to comment.