summaryrefslogtreecommitdiffstats
path: root/node-repository
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2022-12-07 16:49:06 +0100
committerGitHub <noreply@github.com>2022-12-07 16:49:06 +0100
commitd660106248ad0450f8442cc03bd814f365cacdff (patch)
tree6556be87bbbd50f22be662fa6537483360387b12 /node-repository
parenteb4118ba63a27ada16bdf0e307228110e22378cb (diff)
parent8cb41b53fc0ce80c8b047cf0c62c70f825c25860 (diff)
Merge pull request #25154 from vespa-engine/bratseth/more-container-memory
Increase ideal container memory
Diffstat (limited to 'node-repository')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java12
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java4
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json2
3 files changed, 10 insertions, 8 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java
index d8e4f92fc06..0facc6d37ea 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java
@@ -31,8 +31,10 @@ public class ClusterModel {
static final double idealQueryCpuLoad = 0.8;
static final double idealWriteCpuLoad = 0.95;
- static final double idealMemoryLoad = 0.65;
- static final double idealAdminMemoryLoad = 0.75;
+
+ static final double idealContainerMemoryLoad = 0.8;
+ static final double idealContentMemoryLoad = 0.65;
+
static final double idealContainerDiskLoad = 0.95;
static final double idealContentDiskLoad = 0.6;
@@ -308,9 +310,9 @@ public class ClusterModel {
}
private double idealMemoryLoad() {
- if (clusterSpec.type() == ClusterSpec.Type.admin)
- return idealAdminMemoryLoad; // Not autoscaled, but ideal shown in console
- return idealMemoryLoad;
+ if (clusterSpec.type().isContainer()) return idealContainerMemoryLoad;
+ if (clusterSpec.type() == ClusterSpec.Type.admin) return idealContainerMemoryLoad; // Not autoscaled, but ideal shown in console
+ return idealContentMemoryLoad;
}
private double idealDiskLoad() {
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java
index 508168261df..b43baf444c8 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java
@@ -70,7 +70,7 @@ public class ScalingSuggestionsMaintainerTest {
new TestMetric());
maintainer.maintain();
- assertEquals("12 nodes with [vcpu: 6.0, memory: 5.5 Gb, disk 10.0 Gb, bandwidth: 0.1 Gbps, architecture: x86_64]",
+ assertEquals("13 nodes with [vcpu: 5.5, memory: 4.5 Gb, disk 10.0 Gb, bandwidth: 0.1 Gbps, architecture: x86_64]",
suggestionOf(app1, cluster1, tester).get().resources().toString());
assertEquals("8 nodes with [vcpu: 11.0, memory: 4.4 Gb, disk 11.8 Gb, bandwidth: 0.1 Gbps, architecture: x86_64]",
suggestionOf(app2, cluster2, tester).get().resources().toString());
@@ -80,7 +80,7 @@ public class ScalingSuggestionsMaintainerTest {
addMeasurements(0.10f, 0.10f, 0.10f, 0, 500, app1, tester.nodeRepository());
maintainer.maintain();
assertEquals("Suggestion stays at the peak value observed",
- "12 nodes with [vcpu: 6.0, memory: 5.5 Gb, disk 10.0 Gb, bandwidth: 0.1 Gbps, architecture: x86_64]",
+ "13 nodes with [vcpu: 5.5, memory: 4.5 Gb, disk 10.0 Gb, bandwidth: 0.1 Gbps, architecture: x86_64]",
suggestionOf(app1, cluster1, tester).get().resources().toString());
// Utilization is still way down and a week has passed
tester.clock().advance(Duration.ofDays(7));
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json
index 9ae495a7396..6adcb1199eb 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json
@@ -75,7 +75,7 @@
"currentCpu": 0.0,
"peakCpu": 0.0,
"memory" : 0.0,
- "idealMemory": 0.65,
+ "idealMemory": 0.8,
"currentMemory": 0.0,
"peakMemory": 0.0,
"disk" : 0.0,