未验证 提交 9d1bb069 编写于 作者: V Vlad Ilyushchenko 提交者: GitHub

chore: set default shared worker pool size to cpu count - 1 (#521)

上级 56f1792b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册