diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-06-08 17:39:02 +0200 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-06-08 17:39:02 +0200 |
commit | 12ba2fae9ed9e7bf1b7bedc5c342af7cabf75240 (patch) | |
tree | 24ccf8ab9c3a69c80b715abb3d1346c44c75c5c0 | |
parent | 1f29e0a0d025c25ef97db01d0e2b66390a29204e (diff) |
Always use 16 distribution bits in perf environments
This avoids any noise and issues caused by shuffling distribution
bit limits around when sizing clusters, and makes the initial
bucket parallelization levels of perf equal those of prod envs.
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java | 7 | ||||
-rw-r--r-- | config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java index dfdfa9303a7..2592beca6c6 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java @@ -519,7 +519,7 @@ public class ContentCluster extends TreeConfigProducer<AnyConfigProducer> implem * in config and not remove it again if they reduce the node count. */ public int distributionBits() { - if (zone.environment() == Environment.prod && ! zone.equals(Zone.defaultZone())) { + if (zoneEnvImplies16DistributionBits() && ! zone.equals(Zone.defaultZone())) { return 16; } else { // hosted test zone, or self-hosted system @@ -529,6 +529,11 @@ public class ContentCluster extends TreeConfigProducer<AnyConfigProducer> implem } } + private boolean zoneEnvImplies16DistributionBits() { + // We want perf to behave like prod as much as possible. + return (zone.environment() == Environment.prod) || (zone.environment() == Environment.perf); + } + public boolean isHosted() { return isHosted; } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java index f9b1edf4f35..4ce7119f5f7 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java @@ -629,6 +629,9 @@ public class ContentClusterTest extends ContentBaseTest { ContentCluster prodWith16Bits = createWithZone(xml, new Zone(Environment.prod, RegionName.from("us-east-3"))); assertDistributionBitsInConfig(prodWith16Bits, 16); + ContentCluster perfWith16Bits = createWithZone(xml, new Zone(Environment.perf, RegionName.from("us-east-3"))); + assertDistributionBitsInConfig(perfWith16Bits, 16); + ContentCluster stagingNot16Bits = createWithZone(xml, new Zone(Environment.staging, RegionName.from("us-east-3"))); assertDistributionBitsInConfig(stagingNot16Bits, 8); } |