diff options
author | Harald Musum <musum@yahooinc.com> | 2023-06-07 12:37:31 +0200 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2023-06-07 12:37:31 +0200 |
commit | d30ee2ca066ee89490205570f76cd6727f3477ff (patch) | |
tree | e4c7ab747c09f2f8952ea8e820931fe87db52516 /node-repository | |
parent | 11dbad013e267464044a6cc344f24c7e3ad2bbbf (diff) |
Give more memory to logserver nodes on arm64
Diffstat (limited to 'node-repository')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java index 049b345dad7..9449a9737a2 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/CapacityPolicies.java @@ -103,10 +103,18 @@ public class CapacityPolicies { if (clusterSpec.type() == ClusterSpec.Type.admin) { Architecture architecture = adminClusterArchitecture(applicationId); + if (nodeRepository.exclusiveAllocation(clusterSpec)) { + return versioned(clusterSpec, Map.of(new Version(0), smallestExclusiveResources())); + } + if (clusterSpec.id().value().equals("cluster-controllers")) { return clusterControllerResources(clusterSpec, architecture).with(architecture); } + if (clusterSpec.id().value().equals("logserver")) { + return logserverResources(architecture).with(architecture); + } + return (nodeRepository.exclusiveAllocation(clusterSpec) ? versioned(clusterSpec, Map.of(new Version(0), smallestExclusiveResources())) : versioned(clusterSpec, Map.of(new Version(0), smallestSharedResources()))) @@ -130,10 +138,6 @@ public class CapacityPolicies { } private NodeResources clusterControllerResources(ClusterSpec clusterSpec, Architecture architecture) { - if (nodeRepository.exclusiveAllocation(clusterSpec)) { - return versioned(clusterSpec, Map.of(new Version(0), smallestExclusiveResources())); - } - // 1.32 fits floor(8/1.32) = 6 cluster controllers on each 8Gb host, and each will have // 1.32-(0.7+0.6)*(1.32/8) = 1.1 Gb real memory given current taxes. if (architecture == Architecture.x86_64) @@ -146,6 +150,15 @@ public class CapacityPolicies { new Version(8, 173, 5), new NodeResources(0.25, 1.50, 10, 0.3))); } + private NodeResources logserverResources(Architecture architecture) { + if (zone.cloud().name().equals(CloudName.GCP)) + return new NodeResources(1, 4, 50, 0.3); + + return architecture == Architecture.arm64 + ? new NodeResources(0.5, 2.5, 50, 0.3) + : new NodeResources(0.5, 2, 50, 0.3); + } + private Architecture adminClusterArchitecture(ApplicationId instance) { return Architecture.valueOf(adminClusterNodeArchitecture.with(APPLICATION_ID, instance.serializedForm()).value()); } |