diff --git a/distribution/src/config/jvm.options b/distribution/src/config/jvm.options index 58fe4721723..699664cb254 100644 --- a/distribution/src/config/jvm.options +++ b/distribution/src/config/jvm.options @@ -81,6 +81,7 @@ -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 +-Dio.netty.allocator.numDirectArenas=0 # log4j 2 -Dlog4j.shutdownHookEnabled=false diff --git a/distribution/tools/launchers/src/main/java/org/elasticsearch/tools/launchers/JvmErgonomics.java b/distribution/tools/launchers/src/main/java/org/elasticsearch/tools/launchers/JvmErgonomics.java index c0b57c62dc0..d18ac681d75 100644 --- a/distribution/tools/launchers/src/main/java/org/elasticsearch/tools/launchers/JvmErgonomics.java +++ b/distribution/tools/launchers/src/main/java/org/elasticsearch/tools/launchers/JvmErgonomics.java @@ -64,9 +64,6 @@ final class JvmErgonomics { ergonomicChoices.add("-Dio.netty.allocator.type=pooled"); } } - if (systemProperties.containsKey("io.netty.allocator.numDirectArenas") == false) { - ergonomicChoices.add("-Dio.netty.allocator.numDirectArenas=0"); - } final long maxDirectMemorySize = extractMaxDirectMemorySize(finalJvmOptions); if (maxDirectMemorySize == 0) { ergonomicChoices.add("-XX:MaxDirectMemorySize=" + heapSize / 2);