aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-07-06 12:15:30 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2022-07-06 12:15:30 +0200
commit71354c405ee87632caa6bb229f064ba0bf1cd3b7 (patch)
tree9953833f1959d63f136a8d5355153c9ad86b3fd6 /config-model/src/main
parentf93264f1055023d08bc3a5da57b6d7c539393c21 (diff)
- Control number of rpc targets.
- Control number of write events before waking up thread. - For mbus in java, mbus in c++ and the rpc connection towards content nodes.
Diffstat (limited to 'config-model/src/main')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java37
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java6
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java12
3 files changed, 55 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
index 5f189a63701..5d64dfe7041 100644
--- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
+++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
@@ -80,6 +80,12 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
private boolean sharedStringRepoNoReclaim = false;
private boolean mbus_dispatch_on_decode = true;
private boolean mbus_dispatch_on_encode = true;
+ private int mbus_java_num_targets = 1;
+ private int mbus_java_events_before_wakeup = 1;
+ private int mbus_cpp_num_targets = 1;
+ private int mbus_cpp_events_before_wakeup = 1;
+ private int rpc_num_targets = 1;
+ private int rpc_events_before_wakeup = 1;
private int mbus_threads = 4;
private int mbus_network_threads = 1;
private Architecture adminClusterNodeResourcesArchitecture = Architecture.getDefault();
@@ -141,6 +147,12 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
@Override public boolean mbusDispatchOnEncode() { return mbus_dispatch_on_encode; }
@Override public int mbusNetworkThreads() { return mbus_network_threads; }
@Override public int mbusThreads() { return mbus_threads; }
+ @Override public int mbusJavaRpcNumTargets() { return mbus_java_num_targets; }
+ @Override public int mbusJavaEventsBeforeWakeup() { return mbus_java_events_before_wakeup; }
+ @Override public int mbusCppRpcNumTargets() { return mbus_cpp_num_targets; }
+ @Override public int mbusCppEventsBeforeWakeup() { return mbus_cpp_events_before_wakeup; }
+ @Override public int rpcNumTargets() { return rpc_num_targets; }
+ @Override public int rpcEventsBeforeWakeup() { return rpc_events_before_wakeup; }
public TestProperties sharedStringRepoNoReclaim(boolean sharedStringRepoNoReclaim) {
@@ -385,6 +397,31 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
this.mbus_network_threads = value;
return this;
}
+ public TestProperties setMbusJavaRpcNumTargets(int value) {
+ this.mbus_java_num_targets = value;
+ return this;
+ }
+ public TestProperties setMbusJavaEventsBeforeWakeup(int value) {
+ this.mbus_java_events_before_wakeup = value;
+ return this;
+ }
+ public TestProperties setMbusCppEventsBeforeWakeup(int value) {
+ this.mbus_cpp_events_before_wakeup = value;
+ return this;
+ }
+ public TestProperties setMbusCppRpcNumTargets(int value) {
+ this.mbus_cpp_num_targets = value;
+ return this;
+ }
+ public TestProperties setRpcNumTargets(int value) {
+ this.rpc_num_targets = value;
+ return this;
+ }
+ public TestProperties setRpcEventsBeforeWakeup(int value) {
+ this.rpc_events_before_wakeup = value;
+ return this;
+ }
+
public TestProperties setAdminClusterNodeResourcesArchitecture(Architecture architecture) {
this.adminClusterNodeResourcesArchitecture = architecture;
return this;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
index cb4fe8f67ca..9785858b338 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
@@ -89,6 +89,8 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat
private MbusParams mbusParams;
private boolean messageBusEnabled = true;
+ private final int transport_events_before_wakeup;
+ private final int transport_connections_per_target;
private Integer memoryPercentage = null;
@@ -115,6 +117,8 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat
addMetricsHandlers();
addTestrunnerComponentsIfTester(deployState);
addPlatformBundlesForApplicationCluster();
+ transport_connections_per_target = deployState.featureFlags().mbusJavaRpcNumTargets();
+ transport_events_before_wakeup = deployState.featureFlags().mbusJavaEventsBeforeWakeup();
}
private void addPlatformBundlesForApplicationCluster() {
@@ -269,6 +273,8 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat
}
if (getDocproc() != null)
getDocproc().getConfig(builder);
+ builder.transport_events_before_wakeup(transport_events_before_wakeup);
+ builder.numconnectionspertarget(transport_connections_per_target);
}
@Override
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
index 0b0a512a1c8..776da1c8a95 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
@@ -25,6 +25,10 @@ public abstract class ContentNode extends AbstractService
private final boolean dispatch_on_decode;
private final int mbus_threads;
private final int mbus_network_threads;
+ private final int mbus_cpp_rpc_targets;
+ private final int mbus_events_before_wakeup;
+ private final int rpc_num_targets;
+ private final int rpc_events_before_wakeup;
public ContentNode(ModelContext.FeatureFlags featureFlags, AbstractConfigProducer<?> parent, String clusterName, String rootDirectory, int distributionKey) {
super(parent, "" + distributionKey);
@@ -34,6 +38,10 @@ public abstract class ContentNode extends AbstractService
dispatch_on_encode = featureFlags.mbusDispatchOnEncode();
mbus_threads = featureFlags.mbusThreads();
mbus_network_threads = featureFlags.mbusNetworkThreads();
+ mbus_cpp_rpc_targets = featureFlags.mbusCppRpcNumTargets();
+ mbus_events_before_wakeup = featureFlags.mbusCppEventsBeforeWakeup();
+ rpc_num_targets = featureFlags.rpcNumTargets();
+ rpc_events_before_wakeup = featureFlags.rpcEventsBeforeWakeup();
initialize();
setProp("clustertype", "content");
@@ -81,6 +89,10 @@ public abstract class ContentNode extends AbstractService
builder.mbus.dispatch_on_encode(dispatch_on_encode);
builder.mbus.num_threads(mbus_threads);
builder.mbus.num_network_threads(mbus_network_threads);
+ builder.mbus.num_rpc_targets(mbus_cpp_rpc_targets);
+ builder.mbus.events_before_wakeup(mbus_events_before_wakeup);
+ builder.rpc.num_targets_per_node(rpc_num_targets);
+ builder.rpc.events_before_wakeup(rpc_events_before_wakeup);
}
@Override