summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-01-17 17:34:00 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2022-01-17 17:34:00 +0100
commit033575d95d8c152947abe6ba4a3f4787df66bb36 (patch)
tree01248406fc75792567c48abc7905756e4362336d /config-model
parent85cca2cbb63fe3f3bfd32b5e5cf716b1458b318a (diff)
We only need a single arena for netty buffer management for clustercontroller. That is a low volume, less than a cpu core maintainer.
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java16
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java2
2 files changed, 12 insertions, 6 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java
index eafc460bfb5..20c3e007e3b 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java
@@ -40,9 +40,11 @@ public class ClusterControllerContainer extends Container implements
private static final ComponentSpecification CLUSTERCONTROLLER_BUNDLE = new ComponentSpecification("clustercontroller-apps");
private static final ComponentSpecification ZOOKEEPER_SERVER_BUNDLE = new ComponentSpecification("zookeeper-server");
private static final ComponentSpecification REINDEXING_CONTROLLER_BUNDLE = new ComponentSpecification("clustercontroller-reindexer");
- // The below adjustments to default netty settings reduces default chunkSize from 16M to 1M
+ // The below adjustments to default netty settings reduces default chunkSize from 16M to 128K
private static final int DEFAULT_NETTY_PAGE_SIZE = 4096; // Reduced from nettys default of 8192
- private static final int DEFAULT_NETTY_MAX_ORDER = 8; // Reduced from nettys default of 11
+ private static final int DEFAULT_NETTY_MAX_ORDER = 5; // Reduced from nettys default of 11
+ private static final int DEFAULT_NETTY_NUM_DIRECT_ARENAS = 1; // Reduced from nettys default of 2*cores
+ private static final int DEFAULT_NETTY_NUM_HEAP_ARENAS = 1; // Reduced from nettys default of 2*cores
private final Set<String> bundles = new TreeSet<>();
@@ -72,12 +74,16 @@ public class ClusterControllerContainer extends Container implements
addFileBundle("zookeeper-server");
configureReindexing();
configureZooKeeperServer(runStandaloneZooKeeper);
- prependJvmOptions(defaultNettyBufferSize(DEFAULT_NETTY_PAGE_SIZE, DEFAULT_NETTY_MAX_ORDER));
+ prependJvmOptions(defaultNettyBufferSize(DEFAULT_NETTY_NUM_HEAP_ARENAS, DEFAULT_NETTY_NUM_DIRECT_ARENAS,
+ DEFAULT_NETTY_PAGE_SIZE, DEFAULT_NETTY_MAX_ORDER));
}
- private static String defaultNettyBufferSize(int pageSize, int maxOrder) {
+ private static String defaultNettyBufferSize(int numHeapArenas, int numDirectArenas, int pageSize, int maxOrder) {
return new StringBuffer("-Dio.netty.allocator.pageSize=").append(pageSize)
- .append(" -Dio.netty.allocator.maxOrder=").append(maxOrder).toString();
+ .append(" -Dio.netty.allocator.maxOrder=").append(maxOrder)
+ .append(" -Dio.netty.allocator.numHeapArenas=").append(numHeapArenas)
+ .append(" -Dio.netty.allocator.numDirectArenas=").append(numDirectArenas)
+ .toString();
}
@Override
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java
index 41c7f6d72e2..8012a00076b 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java
@@ -291,7 +291,7 @@ public class ClusterControllerTestCase extends DomBuilderTest {
Service cc = model.getService("admin/cluster-controllers/0").get();
assertTrue(cc instanceof ClusterControllerContainer);
- assertEquals("-Dio.netty.allocator.pageSize=4096 -Dio.netty.allocator.maxOrder=8", cc.getJvmOptions());
+ assertEquals("-Dio.netty.allocator.pageSize=4096 -Dio.netty.allocator.maxOrder=5 -Dio.netty.allocator.numHeapArenas=1 -Dio.netty.allocator.numDirectArenas=1", cc.getJvmOptions());
}
private boolean existsHostsWithClusterControllerConfigId(VespaModel model) {