diff --git a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java index 4a4161d6005734..1d4ff48c2413d4 100644 --- a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java +++ b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/VertxCoreRecorder.java @@ -381,7 +381,10 @@ private static int calculateDefaultIOThreads() { //it's hard to say what this number should be, but it is also obvious //that for constrained environments we don't want a lot of event loops //lets start with 10mb and adjust as needed - int recommended = ProcessorInfo.availableProcessors() * 2; + //We used to recommend a default of twice the number of cores, + //but more recent developments seem to suggest matching the number of cores 1:1 + //being a more reasonable default. It also saves memory. + int recommended = ProcessorInfo.availableProcessors(); long mem = Runtime.getRuntime().maxMemory(); long memInMb = mem / (1024 * 1024); long maxAllowed = memInMb / 10; diff --git a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/config/VertxConfiguration.java b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/config/VertxConfiguration.java index 464b453c6d4711..375dbcf200228e 100644 --- a/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/config/VertxConfiguration.java +++ b/extensions/vertx/runtime/src/main/java/io/quarkus/vertx/core/runtime/config/VertxConfiguration.java @@ -23,7 +23,7 @@ public class VertxConfiguration { public boolean classpathResolving; /** - * The number of event loops. 2 x the number of core by default. + * The number of event loops. By default, it matches the number of CPUs detected on the system. */ @ConfigItem public OptionalInt eventLoopsPoolSize;