From bd90d94db389100e2af642c02eadaff998ef9bee Mon Sep 17 00:00:00 2001 From: Shuo Date: Mon, 20 Jul 2020 13:41:29 +0800 Subject: [PATCH] fix: revert default asyncWorkers value (#114) --- .../java/com/xiaomi/infra/pegasus/client/ClientOptions.java | 2 +- src/main/java/com/xiaomi/infra/pegasus/rpc/ClusterOptions.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xiaomi/infra/pegasus/client/ClientOptions.java b/src/main/java/com/xiaomi/infra/pegasus/client/ClientOptions.java index 2552678c..2d1db356 100644 --- a/src/main/java/com/xiaomi/infra/pegasus/client/ClientOptions.java +++ b/src/main/java/com/xiaomi/infra/pegasus/client/ClientOptions.java @@ -34,7 +34,7 @@ public class ClientOptions { public static final String DEFAULT_META_SERVERS = "127.0.0.1:34601,127.0.0.1:34602,127.0.0.1:34603"; public static final Duration DEFAULT_OPERATION_TIMEOUT = Duration.ofMillis(1000); - public static final int DEFAULT_ASYNC_WORKERS = Runtime.getRuntime().availableProcessors(); + public static final int DEFAULT_ASYNC_WORKERS = 4; public static final boolean DEFAULT_ENABLE_PERF_COUNTER = true; public static final String DEFAULT_FALCON_PERF_COUNTER_TAGS = ""; public static final Duration DEFAULT_FALCON_PUSH_INTERVAL = Duration.ofSeconds(10); diff --git a/src/main/java/com/xiaomi/infra/pegasus/rpc/ClusterOptions.java b/src/main/java/com/xiaomi/infra/pegasus/rpc/ClusterOptions.java index c3a6fb46..f392adf9 100644 --- a/src/main/java/com/xiaomi/infra/pegasus/rpc/ClusterOptions.java +++ b/src/main/java/com/xiaomi/infra/pegasus/rpc/ClusterOptions.java @@ -15,8 +15,7 @@ public class ClusterOptions { public static final String PEGASUS_OPERATION_TIMEOUT_DEF = "1000"; public static final String PEGASUS_ASYNC_WORKERS_KEY = "async_workers"; - public static final String PEGASUS_ASYNC_WORKERS_DEF = - String.valueOf(Runtime.getRuntime().availableProcessors()); + public static final String PEGASUS_ASYNC_WORKERS_DEF = "4"; public static final String PEGASUS_ENABLE_PERF_COUNTER_KEY = "enable_perf_counter"; public static final String PEGASUS_ENABLE_PERF_COUNTER_DEF = "true";