Skip to content

Commit

Permalink
Merge pull request #26039 from vespa-engine/hmusum/more-memory-for-ar…
Browse files Browse the repository at this point in the history
…m64-cluster-controllers-in-cd

Give cluster controllers on arm64 in cd more memory
  • Loading branch information
Harald Musum authored Feb 14, 2023
2 parents 707663e + 48838e4 commit bdc3bb0
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.config.provision.SystemName;
import com.yahoo.config.provision.Zone;
import com.yahoo.vespa.flags.PermanentFlags;
import com.yahoo.vespa.flags.StringFlag;
Expand Down Expand Up @@ -89,7 +90,7 @@ public NodeResources defaultNodeResources(ClusterSpec clusterSpec, ApplicationId
Architecture architecture = adminClusterArchitecture(applicationId);

if (clusterSpec.id().value().equals("cluster-controllers")) {
return clusterControllerResources(clusterSpec).with(architecture);
return clusterControllerResources(clusterSpec, architecture).with(architecture);
}

return (nodeRepository.exclusiveAllocation(clusterSpec)
Expand All @@ -111,10 +112,15 @@ public NodeResources defaultNodeResources(ClusterSpec clusterSpec, ApplicationId
}
}

private NodeResources clusterControllerResources(ClusterSpec clusterSpec) {
private NodeResources clusterControllerResources(ClusterSpec clusterSpec, Architecture architecture) {
if (nodeRepository.exclusiveAllocation(clusterSpec)) {
return versioned(clusterSpec, Map.of(new Version(0), smallestExclusiveResources()));
}
// Note: Seems like we need more memory for cluster controllers on arm64, trying out in cd
if (architecture == Architecture.arm64 && zone.system() == SystemName.cd) {
return versioned(clusterSpec, Map.of(new Version(0), new NodeResources(0.25, 1.14, 10, 0.3),
new Version(8, 125, 23), new NodeResources(0.25, 1.5, 10, 0.3)));
}
return versioned(clusterSpec, Map.of(new Version(0), new NodeResources(0.25, 1.14, 10, 0.3)));
}

Expand Down

0 comments on commit bdc3bb0

Please sign in to comment.