diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2021-03-04 11:01:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 11:01:47 +0100 |
commit | 191f60dd67170c94971f5e616e04cc16ebe66b21 (patch) | |
tree | f8ad7b2bda7a8f618133b7041c1fbfc9b6dff514 /config-model | |
parent | 39db592d1970b48d7a4e1438a5652d3d774efe3b (diff) | |
parent | f8d3d215fde898545d76c15bcc54c1901137617b (diff) |
Merge pull request #16782 from vespa-engine/hmusum/reduce-max-heap-size-for-cluster-controllers-in-tests-as-well
Use 256 Mb for heap size for cluster controllers in tests and test pr…
Diffstat (limited to 'config-model')
6 files changed, 14 insertions, 16 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 6f729b24025..a95e924cb57 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 @@ -55,7 +55,7 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea private boolean useBucketExecutorForBucketMove; private boolean enableFeedBlockInDistributor = false; private double maxDeadBytesRatio = 0.2; - private int clusterControllerMaxHeapSizeInMb = 512; + private int clusterControllerMaxHeapSizeInMb = 256; private int metricsProxyMaxHeapSizeInMb = 512; private int maxActivationInhibitedOutOfSyncGroups = 0; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/LogserverContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/LogserverContainerCluster.java index 916c65e5f82..e0886fb8b24 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/LogserverContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/LogserverContainerCluster.java @@ -1,4 +1,4 @@ -// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.admin; import com.yahoo.config.model.deploy.DeployState; @@ -27,7 +27,7 @@ public class LogserverContainerCluster extends ContainerCluster<LogserverContain public void getConfig(QrStartConfig.Builder builder) { super.getConfig(builder); builder.jvm.heapsize(384) - .verbosegc(true); + .verbosegc(true); } protected boolean messageBusEnabled() { return false; } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java index 4fc73de3b48..abdbb3c90a3 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java @@ -35,11 +35,10 @@ public class ClusterControllerContainerCluster extends ContainerCluster<ClusterC @Override public void getConfig(QrStartConfig.Builder builder) { super.getConfig(builder); - int maxHeapSize = featureFlags.clusterControllerMaxHeapSizeInMb(); - boolean verboseGc = (maxHeapSize < 512); + builder.jvm - .verbosegc(verboseGc) - .heapsize(maxHeapSize); + .verbosegc(true) + .heapsize(featureFlags.clusterControllerMaxHeapSizeInMb()); } public ReindexingContext reindexingContext() { return reindexingContext; } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainer.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainer.java index 690900865ad..45af078f2a3 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainer.java @@ -15,7 +15,6 @@ import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.api.container.ContainerServiceType; import com.yahoo.config.model.deploy.DeployState; import com.yahoo.config.provision.ClusterMembership; -import com.yahoo.config.provision.ClusterSpec; import com.yahoo.search.config.QrStartConfig; import com.yahoo.vespa.model.HostResource; import com.yahoo.vespa.model.PortAllocBridge; @@ -150,9 +149,8 @@ public class MetricsProxyContainer extends Container implements if (clusterMembership.isPresent()) { int maxHeapSize = featureFlags.metricsProxyMaxHeapSizeInMb(clusterMembership.get().cluster().type()); - boolean verboseGc = (maxHeapSize < 512); builder.jvm - .verbosegc(verboseGc) + .verbosegc(true) .heapsize(maxHeapSize); } } @@ -173,4 +171,5 @@ public class MetricsProxyContainer extends Container implements protected String defaultPreload() { return ""; } + } 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 0a99797a53f..4ce52aaf4d3 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 @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.admin; import com.google.common.collect.Collections2; @@ -389,10 +389,10 @@ public class ClusterControllerTestCase extends DomBuilderTest { model.getConfig(qrBuilder, "admin/cluster-controllers/0/components/clustercontroller-bar-configurer"); QrStartConfig qrStartConfig = new QrStartConfig(qrBuilder); assertEquals(32, qrStartConfig.jvm().minHeapsize()); - assertEquals(512, qrStartConfig.jvm().heapsize()); + assertEquals(256, qrStartConfig.jvm().heapsize()); assertEquals(0, qrStartConfig.jvm().heapSizeAsPercentageOfPhysicalMemory()); assertEquals(2, qrStartConfig.jvm().availableProcessors()); - assertFalse(qrStartConfig.jvm().verbosegc()); + assertTrue(qrStartConfig.jvm().verbosegc()); assertEquals("-XX:+UseG1GC -XX:MaxTenuringThreshold=15", qrStartConfig.jvm().gcopts()); assertEquals(512, qrStartConfig.jvm().stacksize()); assertEquals(0, qrStartConfig.jvm().directMemorySizeCache()); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java index 30e3767e3dc..23c37666257 100755 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java @@ -107,7 +107,7 @@ public class ContainerClusterTest { private void verifyHeapSizeAsPercentageOfPhysicalMemory(boolean isHosted, boolean isCombinedCluster, Integer explicitMemoryPercentage, int expectedMemoryPercentage) { - ContainerCluster cluster = createContainerCluster(createRoot(isHosted), isCombinedCluster, explicitMemoryPercentage); + ContainerCluster<?> cluster = createContainerCluster(createRoot(isHosted), isCombinedCluster, explicitMemoryPercentage); QrStartConfig.Builder qsB = new QrStartConfig.Builder(); cluster.getConfig(qsB); QrStartConfig qsC= new QrStartConfig(qsB); @@ -171,7 +171,7 @@ public class ContainerClusterTest { cluster.getConfig(qrBuilder); QrStartConfig qrStartConfig = new QrStartConfig(qrBuilder); assertEquals(32, qrStartConfig.jvm().minHeapsize()); - assertEquals(512, qrStartConfig.jvm().heapsize()); + assertEquals(256, qrStartConfig.jvm().heapsize()); assertEquals(32, qrStartConfig.jvm().compressedClassSpaceSize()); assertEquals(0, qrStartConfig.jvm().heapSizeAsPercentageOfPhysicalMemory()); root.freezeModelTopology(); @@ -398,7 +398,7 @@ public class ContainerClusterTest { return cluster; } - private static ClusterInfoConfig getClusterInfoConfig(ContainerCluster cluster) { + private static ClusterInfoConfig getClusterInfoConfig(ContainerCluster<?> cluster) { ClusterInfoConfig.Builder builder = new ClusterInfoConfig.Builder(); cluster.getConfig(builder); return new ClusterInfoConfig(builder); |