diff --git a/core/src/main/java/io/questdb/PropServerConfiguration.java b/core/src/main/java/io/questdb/PropServerConfiguration.java index c4ddfb7e39c1301fce0550bc4a1b50376d5f29de..0591a2af13fb310b31d3f1a137a3b37c97422a2a 100644 --- a/core/src/main/java/io/questdb/PropServerConfiguration.java +++ b/core/src/main/java/io/questdb/PropServerConfiguration.java @@ -256,7 +256,7 @@ public class PropServerConfiguration implements ServerConfiguration { private String httpVersion; public PropServerConfiguration(String root, Properties properties) throws ServerConfigurationException, JsonException { - this.sharedWorkerCount = getInt(properties, "shared.worker.count", 2); + this.sharedWorkerCount = getInt(properties, "shared.worker.count", Math.max(1, Runtime.getRuntime().availableProcessors() - 1)); this.sharedWorkerAffinity = getAffinity(properties, "shared.worker.affinity", sharedWorkerCount); this.sharedWorkerHaltOnError = getBoolean(properties, "shared.worker.haltOnError", false); this.httpServerEnabled = getBoolean(properties, "http.enabled", true);