summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java12
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterNodesTimeseries.java3
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Load.java63
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsResponse.java45
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDb.java13
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java8
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java2
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiHandler.java2
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java5
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepoStatsTest.java21
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java52
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Loader.java4
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsV2MetricsFetcherTest.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/NodeMetricsDbTest.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDbTest.java6
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTester.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainerTest.java2
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java4
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json16
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json8
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/stats.json24
22 files changed, 111 insertions, 187 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 986ab830283..1e4a11fdea2 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
@@ -233,13 +233,11 @@ public class ClusterModel {
double queryCpu = queryCpuPerGroup * groupCount() / groups;
double writeCpu = (double)groupSize() / groupSize;
return new Load(cpu.queryFraction() * queryCpu + (1 - cpu.queryFraction()) * writeCpu,
- (1 - memory.fixedFraction()) * (double) groupSize() / groupSize + memory.fixedFraction() * 1,
- (double)groupSize() / groupSize,
- 1,
- 1);
+ (1 - memory.fixedFraction()) * (double)groupSize() / groupSize + memory.fixedFraction() * 1,
+ (double)groupSize() / groupSize);
}
else {
- return new Load((double) nodeCount() / nodes, 1, 1, 1, 1);
+ return new Load((double)nodeCount() / nodes, 1, 1);
}
}
@@ -248,7 +246,7 @@ public class ClusterModel {
* if one of the nodes go down.
*/
public Load idealLoad() {
- var ideal = new Load(cpu.idealLoad(), memory.idealLoad(), disk.idealLoad(), cpu.idealLoad(), memory.idealLoad()).divide(redundancyAdjustment());
+ var ideal = new Load(cpu.idealLoad(), memory.idealLoad(), disk.idealLoad()).divide(redundancyAdjustment());
if ( !cluster.bcpGroupInfo().isEmpty() && cluster.bcpGroupInfo().queryRate() > 0) {
// Since we have little local information, use information about query cost in other groups
Load bcpGroupIdeal = adjustQueryDependentIdealLoadByBcpGroupInfo(ideal);
@@ -394,7 +392,7 @@ public class ClusterModel {
if (averageQueryRate().isEmpty() || averageQueryRate().getAsDouble() == 0.0) return OptionalDouble.empty();
// TODO: Query rate should generally be sampled at the time where we see the peak resource usage
int fanOut = clusterSpec.type().isContainer() ? 1 : groupSize();
- return OptionalDouble.of(peakLoad().cpu() * cpu.queryFraction() * fanOut * nodes.not().retired().first().get().resources().vcpu()
+ return OptionalDouble.of(peakLoad().cpu() * cpu.queryFraction() * fanOut * nodes.not().retired().first().get().resources().vcpu()
/ averageQueryRate().getAsDouble() / groupCount());
}
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterNodesTimeseries.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterNodesTimeseries.java
index 6978e269c3d..e1ef21ebd13 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterNodesTimeseries.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterNodesTimeseries.java
@@ -67,8 +67,7 @@ public class ClusterNodesTimeseries {
* the average of the highest reading for that dimension on each node.
*/
public Load peakLoad() {
- return new Load(peakLoad(Load.Dimension.cpu), peakLoad(Load.Dimension.memory), peakLoad(Load.Dimension.disk),
- peakLoad(Load.Dimension.gpu), peakLoad(Load.Dimension.gpuMemory));
+ return new Load(peakLoad(Load.Dimension.cpu), peakLoad(Load.Dimension.memory), peakLoad(Load.Dimension.disk));
}
private double peakLoad(Load.Dimension dimension) {
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Load.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Load.java
index 22c13795d18..799ed621807 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Load.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Load.java
@@ -3,7 +3,9 @@ package com.yahoo.vespa.hosted.provision.autoscale;
import com.yahoo.config.provision.NodeResources;
+import java.util.Objects;
import java.util.function.DoubleBinaryOperator;
+import java.util.function.DoubleFunction;
import java.util.function.DoubleUnaryOperator;
import java.util.function.Predicate;
@@ -12,36 +14,32 @@ import java.util.function.Predicate;
*
* @author bratseth
*/
-public record Load(double cpu, double memory, double disk, double gpu, double gpuMemory) {
+public class Load {
- public enum Dimension { cpu, memory, disk, gpu, gpuMemory }
+ public enum Dimension { cpu, memory, disk }
- public Load(double cpu, double memory, double disk, double gpu, double gpuMemory) {
+ private final double cpu, memory, disk;
+
+ public Load(double cpu, double memory, double disk) {
this.cpu = requireNormalized(cpu, "cpu");
this.memory = requireNormalized(memory, "memory");
this.disk = requireNormalized(disk, "disk");
- this.gpu = requireNormalized(gpu, "gpu");
- this.gpuMemory = requireNormalized(gpuMemory, "gpuMemory");
}
public double cpu() { return cpu; }
public double memory() { return memory; }
public double disk() { return disk; }
- public double gpu() { return gpu; }
- public double gpuMemory() { return gpuMemory; }
- public Load withCpu(double cpu) { return new Load(cpu, memory, disk, gpu, gpuMemory); }
- public Load withMemory(double memory) { return new Load(cpu, memory, disk, gpu, gpuMemory); }
- public Load withDisk(double disk) { return new Load(cpu, memory, disk, gpu, gpuMemory); }
- public Load withGpu(double gpu) { return new Load(cpu, memory, disk, gpu, gpuMemory); }
- public Load withGpuMemory(double gpuMemory) { return new Load(cpu, memory, disk, gpu, gpuMemory); }
+ public Load withCpu(double cpu) { return new Load(cpu, memory, disk); }
+ public Load withMemory(double memory) { return new Load(cpu, memory, disk); }
+ public Load withDisk(double disk) { return new Load(cpu, memory, disk); }
public Load add(Load other) {
return join(other, (a, b) -> a + b);
}
public Load multiply(NodeResources resources) {
- return new Load(cpu * resources.vcpu(), memory * resources.memoryGb(), disk * resources.diskGb(), gpu * resources.gpuResources().count(), gpu * resources.gpuResources().memoryGb());
+ return new Load(cpu * resources.vcpu(), memory * resources.memoryGb(), disk * resources.diskGb());
}
public Load multiply(double factor) {
return map(v -> v * factor);
@@ -57,25 +55,21 @@ public record Load(double cpu, double memory, double disk, double gpu, double gp
return map(v -> divide(v, divisor));
}
public Load divide(NodeResources resources) {
- return new Load(divide(cpu, resources.vcpu()), divide(memory, resources.memoryGb()), divide(disk, resources.diskGb()), divide(gpu, resources.gpuResources().count()), divide(gpuMemory, resources.gpuResources().memoryGb()));
+ return new Load(divide(cpu, resources.vcpu()), divide(memory, resources.memoryGb()), divide(disk, resources.diskGb()));
}
/** Returns the load where the given function is applied to each dimension of this. */
public Load map(DoubleUnaryOperator f) {
return new Load(f.applyAsDouble(cpu),
f.applyAsDouble(memory),
- f.applyAsDouble(disk),
- f.applyAsDouble(gpu),
- f.applyAsDouble(gpuMemory));
+ f.applyAsDouble(disk));
}
/** Returns the load where the given function is applied to each dimension of this and the given load. */
public Load join(Load other, DoubleBinaryOperator f) {
return new Load(f.applyAsDouble(this.cpu(), other.cpu()),
f.applyAsDouble(this.memory(), other.memory()),
- f.applyAsDouble(this.disk(), other.disk()),
- f.applyAsDouble(this.gpu(), other.gpu()),
- f.applyAsDouble(this.gpuMemory(), other.gpuMemory()));
+ f.applyAsDouble(this.disk(), other.disk()));
}
/** Returns true if any dimension matches the predicate. */
@@ -94,8 +88,6 @@ public record Load(double cpu, double memory, double disk, double gpu, double gp
case cpu -> cpu();
case memory -> memory();
case disk -> disk();
- case gpu -> gpu();
- case gpuMemory -> gpuMemory();
};
}
@@ -103,7 +95,7 @@ public record Load(double cpu, double memory, double disk, double gpu, double gp
if (Double.isNaN(value))
throw new IllegalArgumentException(name + " must be a number but is NaN");
if (value < 0)
- throw new IllegalArgumentException(name + " must be zero or larger, but is " + value);
+ throw new IllegalArgumentException(name + " must be zero or lager, but is " + value);
return value;
}
@@ -113,19 +105,28 @@ public record Load(double cpu, double memory, double disk, double gpu, double gp
}
@Override
+ public boolean equals(Object o) {
+ if (o == this) return true;
+ if ( ! (o instanceof Load other)) return false;
+ if (other.cpu() != this.cpu()) return false;
+ if (other.memory() != this.memory()) return false;
+ if (other.disk() != this.disk()) return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() { return Objects.hash(cpu, memory, disk); }
+
+ @Override
public String toString() {
- return "load: " + cpu + " cpu, " + memory + " memory, " + disk + " disk," + gpu + " gpu," + gpuMemory + " gpuMemory";
+ return "load: " + cpu + " cpu, " + memory + " memory, " + disk + " disk";
}
- public static Load zero() { return new Load(0, 0, 0, 0, 0); }
- public static Load one() { return new Load(1, 1, 1, 1, 1); }
+ public static Load zero() { return new Load(0, 0, 0); }
+ public static Load one() { return new Load(1, 1, 1); }
public static Load byDividing(NodeResources a, NodeResources b) {
- return new Load(divide(a.vcpu(), b.vcpu()),
- divide(a.memoryGb(), b.memoryGb()),
- divide(a.diskGb(), b.diskGb()),
- divide(a.gpuResources().count(), b.gpuResources().count()),
- divide(a.gpuResources().memoryGb(), b.gpuResources().memoryGb()));
+ return new Load(divide(a.vcpu(), b.vcpu()), divide(a.memoryGb(), b.memoryGb()), divide(a.diskGb(), b.diskGb()));
}
}
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsResponse.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsResponse.java
index f35879d0b24..a6882e49efa 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsResponse.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsResponse.java
@@ -76,10 +76,8 @@ public class MetricsResponse {
nodeMetrics.add(new Pair<>(hostname, new NodeMetricSnapshot(at,
new Load(Metric.cpu.from(nodeValues),
Metric.memory.from(nodeValues),
- Metric.disk.from(nodeValues),
- Metric.gpu.from(nodeValues),
- Metric.gpuMemory.from(nodeValues)),
- (long) Metric.generation.from(nodeValues),
+ Metric.disk.from(nodeValues)),
+ (long)Metric.generation.from(nodeValues),
Metric.inService.from(nodeValues) > 0,
clusterIsStable(node.get(), applicationNodes, nodeValues),
Metric.queryRate.from(nodeValues))));
@@ -128,7 +126,6 @@ public class MetricsResponse {
@Override
public List<String> metricResponseNames() {
- // TODO(mpolden): Track only CPU util once we support proper GPU scaling
return List.of(HostedNodeAdminMetrics.CPU_UTIL.baseName(), HostedNodeAdminMetrics.GPU_UTIL.baseName());
}
@@ -142,7 +139,6 @@ public class MetricsResponse {
@Override
public List<String> metricResponseNames() {
- // TODO(mpolden): Track only CPU memory once we support proper GPU scaling
return List.of(HostedNodeAdminMetrics.MEM_UTIL.baseName(),
SearchNodeMetrics.CONTENT_PROTON_RESOURCE_USAGE_MEMORY.average(),
HostedNodeAdminMetrics.GPU_MEM_USED.baseName(),
@@ -151,7 +147,7 @@ public class MetricsResponse {
@Override
double computeFinal(ListMap<String, Double> values) {
- return Math.max(cpuMemUtil(values), gpuMemory.computeFinal(values));
+ return Math.max(gpuMemUtil(values), cpuMemUtil(values));
}
private double cpuMemUtil(ListMap<String, Double> values) {
@@ -164,6 +160,12 @@ public class MetricsResponse {
return 0;
}
+ private double gpuMemUtil(ListMap<String, Double> values) {
+ var usedGpuMemory = values.get(HostedNodeAdminMetrics.GPU_MEM_USED.baseName()).stream().mapToDouble(v -> v).sum();
+ var totalGpuMemory = values.get(HostedNodeAdminMetrics.GPU_MEM_TOTAL.baseName()).stream().mapToDouble(v -> v).sum();
+ return totalGpuMemory > 0 ? usedGpuMemory / totalGpuMemory : 0;
+ }
+
},
disk { // a node resource
@@ -185,35 +187,6 @@ public class MetricsResponse {
}
},
- gpu { // a node resource
-
- @Override
- public List<String> metricResponseNames() {
- return List.of(HostedNodeAdminMetrics.GPU_UTIL.baseName());
- }
-
- @Override
- double computeFinal(ListMap<String, Double> values) {
- return values.values().stream().flatMap(List::stream).mapToDouble(v -> v).max().orElse(0) / 100; // % to ratio
- }
-
- },
- gpuMemory { // a node resource
-
- @Override
- public List<String> metricResponseNames() {
- return List.of(HostedNodeAdminMetrics.GPU_MEM_USED.baseName(),
- HostedNodeAdminMetrics.GPU_MEM_TOTAL.baseName());
- }
-
- @Override
- double computeFinal(ListMap<String, Double> values) {
- var usedGpuMemory = values.get(HostedNodeAdminMetrics.GPU_MEM_USED.baseName()).stream().mapToDouble(v -> v).sum();
- var totalGpuMemory = values.get(HostedNodeAdminMetrics.GPU_MEM_TOTAL.baseName()).stream().mapToDouble(v -> v).sum();
- return totalGpuMemory > 0 ? usedGpuMemory / totalGpuMemory : 0;
- }
-
- },
generation { // application config generation active on the node
@Override
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDb.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDb.java
index c0de9a43f7f..38127fa3093 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDb.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDb.java
@@ -144,8 +144,6 @@ public class QuestMetricsDb extends AbstractComponent implements MetricsDb {
row.putBool(6, snapshot.getSecond().inService());
row.putBool(7, snapshot.getSecond().stable());
row.putFloat(8, (float) snapshot.getSecond().queryRate());
- row.putFloat(9, (float) snapshot.getSecond().load().gpu());
- row.putFloat(10, (float) snapshot.getSecond().load().gpuMemory());
row.append();
}
writer.commit();
@@ -245,9 +243,6 @@ public class QuestMetricsDb extends AbstractComponent implements MetricsDb {
private void ensureNodeTableIsUpdated() {
try {
// Example: nodeTable.ensureColumnExists("write_rate", "float");
- // TODO(mpolden): Remove after January 2024
- nodeTable.ensureColumnExists("gpu_util", "float");
- nodeTable.ensureColumnExists("gpu_mem_total_util", "float");
} catch (Exception e) {
nodeTable.repair(e);
}
@@ -267,9 +262,7 @@ public class QuestMetricsDb extends AbstractComponent implements MetricsDb {
try {
issue("create table " + nodeTable.name +
" (hostname string, at timestamp, cpu_util float, mem_total_util float, disk_util float," +
- " application_generation long, inService boolean, stable boolean, queries_rate float," +
- " gpu_util float, gpu_mem_total_util float" +
- " )" +
+ " application_generation long, inService boolean, stable boolean, queries_rate float)" +
" timestamp(at)" +
"PARTITION BY DAY;",
newContext());
@@ -318,9 +311,7 @@ public class QuestMetricsDb extends AbstractComponent implements MetricsDb {
new NodeMetricSnapshot(Instant.ofEpochMilli(record.getTimestamp(1) / 1000),
new Load(record.getFloat(2),
record.getFloat(3),
- record.getFloat(4),
- record.getFloat(9),
- record.getFloat(10)),
+ record.getFloat(4)),
record.getLong(5),
record.getBool(6),
record.getBool(7),
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java
index 6f325700401..c4e7d3b9acc 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java
@@ -76,8 +76,6 @@ public class ApplicationSerializer {
private static final String cpuKey = "cpu";
private static final String memoryKey = "memory";
private static final String diskKey = "disk";
- private static final String gpuKey = "gpu";
- private static final String gpuMemory = "gpuMemory";
private static final String fromKey = "from";
private static final String toKey = "to";
private static final String generationKey = "generation";
@@ -203,16 +201,12 @@ public class ApplicationSerializer {
loadObject.setDouble(cpuKey, load.cpu());
loadObject.setDouble(memoryKey, load.memory());
loadObject.setDouble(diskKey, load.disk());
- loadObject.setDouble(gpuKey, load.gpu());
- loadObject.setDouble(gpuMemory, load.gpuMemory());
}
private static Load loadFromSlime(Inspector loadObject) {
return new Load(loadObject.field(cpuKey).asDouble(),
loadObject.field(memoryKey).asDouble(),
- loadObject.field(diskKey).asDouble(),
- loadObject.field(gpuKey).asDouble(),
- loadObject.field(gpuMemory).asDouble());
+ loadObject.field(diskKey).asDouble());
}
private static void toSlime(Autoscaling.Metrics metrics, Cursor metricsObject) {
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java
index 89853896104..225eb3e4e8d 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java
@@ -98,8 +98,6 @@ public class ApplicationSerializer {
loadObject.setDouble("cpu", load.cpu());
loadObject.setDouble("memory", load.memory());
loadObject.setDouble("disk", load.disk());
- loadObject.setDouble("gpu", load.gpu());
- loadObject.setDouble("gpuMemory", load.gpuMemory());
}
private static void toSlime(Autoscaling.Metrics metrics, Cursor metricsObject) {
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiHandler.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiHandler.java
index 0b157e8635b..9080030f026 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiHandler.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiHandler.java
@@ -502,8 +502,6 @@ public class NodesV2ApiHandler extends ThreadedHttpRequestHandler {
object.setDouble("cpu", load.cpu());
object.setDouble("memory", load.memory());
object.setDouble("disk", load.disk());
- object.setDouble("gpu", load.gpu());
- object.setDouble("gpuMemory", load.gpuMemory());
}
/** Returns a copy of the given URI with the host and port from the given URI and the path set to the given path */
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java
index d3b88997059..fe6b204ed31 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java
@@ -40,6 +40,7 @@ import com.yahoo.vespa.hosted.provision.applications.Cluster;
import com.yahoo.vespa.hosted.provision.autoscale.Autoscaling;
import com.yahoo.vespa.hosted.provision.autoscale.Load;
import com.yahoo.vespa.hosted.provision.autoscale.MemoryMetricsDb;
+import com.yahoo.vespa.hosted.provision.lb.LoadBalancerService;
import com.yahoo.vespa.hosted.provision.node.Agent;
import com.yahoo.vespa.hosted.provision.node.IP;
import com.yahoo.vespa.hosted.provision.node.Status;
@@ -238,8 +239,8 @@ public class MockNodeRepository extends NodeRepository {
Optional.of(new ClusterResources(4, 1,
new NodeResources(3, 16, 100, 1))),
clock().instant(),
- new Load(0.1, 0.2, 0.3, 0, 0),
- new Load(0.4, 0.5, 0.6, 0, 0),
+ new Load(0.1, 0.2, 0.3),
+ new Load(0.4, 0.5, 0.6),
new Autoscaling.Metrics(0.7, 0.8, 0.9)));
try (Mutex lock = applications().lock(app1Id)) {
applications().put(app1.with(cluster1), lock);
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepoStatsTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepoStatsTest.java
index b2e04ba2233..0a26678d37e 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepoStatsTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepoStatsTest.java
@@ -15,6 +15,7 @@ import com.yahoo.vespa.hosted.provision.autoscale.NodeMetricSnapshot;
import com.yahoo.vespa.hosted.provision.provisioning.ProvisioningTester;
import org.junit.Test;
+import java.time.Duration;
import java.util.List;
import static org.junit.Assert.assertEquals;
@@ -98,7 +99,7 @@ public class NodeRepoStatsTest {
else {
loadFactor = loadApp3;
}
- var snapshot = new NodeMetricSnapshot(now, new Load(1.0, 0.9, 0.8, 0, 0).multiply(loadFactor), 1, true, true, 1.0 );
+ var snapshot = new NodeMetricSnapshot(now, new Load(1.0, 0.9, 0.8).multiply(loadFactor), 1, true, true, 1.0 );
tester.nodeRepository().metricsDb().addNodeMetrics(List.of(new Pair<>(node.hostname(), snapshot)));
}
@@ -107,8 +108,8 @@ public class NodeRepoStatsTest {
assertEquals(26, stats.totalCost(), delta);
assertEquals(8.319999999999999, stats.totalAllocatedCost(), delta);
- assertLoad(new Load(0.6180,0.5562,0.4944, 0, 0), stats.load());
- assertLoad(new Load(0.4682,0.4214,0.3745, 0, 0), stats.activeLoad());
+ assertLoad(new Load(0.6180,0.5562,0.4944), stats.load());
+ assertLoad(new Load(0.4682,0.4214,0.3745), stats.activeLoad());
var app1Stats = stats.applicationStats().get(0);
var app2Stats = stats.applicationStats().get(2);
@@ -118,27 +119,25 @@ public class NodeRepoStatsTest {
assertEquals(3.6400, app1Stats.cost(), delta);
assertEquals(0.8676, app1Stats.utilizedCost(), delta);
assertEquals(2.7724, app1Stats.unutilizedCost(), delta);
- assertLoad(new Load(0.2571, 0.2314, 0.2057, 0, 0), app1Stats.load());
+ assertLoad(new Load(0.2571, 0.2314, 0.2057), app1Stats.load());
assertEquals(app2, app2Stats.id());
assertEquals(2.0799, app2Stats.cost(), delta);
assertEquals(0.7712, app2Stats.utilizedCost(), delta);
assertEquals(1.3087, app2Stats.unutilizedCost(), delta);
- assertLoad(new Load(.40, 0.36, 0.32, 0, 0), app2Stats.load());
+ assertLoad(new Load(.40, 0.36, 0.32), app2Stats.load());
assertEquals(app3, app3Stats.id());
assertEquals(2.6000, app3Stats.cost(), delta);
assertEquals(1.2049, app3Stats.utilizedCost(), delta);
assertEquals(1.3950, app3Stats.unutilizedCost(), delta);
- assertLoad(new Load(0.5, 0.45, 0.40, 0, 0), app3Stats.load());
+ assertLoad(new Load(0.5, 0.45, 0.40), app3Stats.load());
}
private static void assertLoad(Load expected, Load actual) {
- assertEquals("cpu", expected.cpu(), actual.cpu(), delta);
- assertEquals("memory", expected.memory(), actual.memory(), delta);
- assertEquals("disk", expected.disk(), actual.disk(), delta);
- assertEquals("gpu", expected.gpu(), actual.gpu(), delta);
- assertEquals("gpuMemory", expected.gpuMemory(), actual.gpuMemory(), delta);
+ assertEquals("cpu", expected.cpu(), actual.cpu(), delta);
+ assertEquals("memory", expected.memory(), actual.memory(), delta);
+ assertEquals("disk", expected.disk(), actual.disk(), delta);
}
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java
index 4236f7ac968..d4d34ab66e5 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java
@@ -44,7 +44,7 @@ public class AutoscalingTest {
.capacity(Capacity.from(min, max))
.build();
fixture.tester.clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.8f, 0.17, 0.12, 0, 0), 1, true, true, 100);
+ fixture.loader().applyLoad(new Load(0.8f, 0.17, 0.12), 1, true, true, 100);
var result = fixture.autoscale();
assertTrue(result.resources().isEmpty());
assertEquals(Autoscaling.Status.insufficient, result.status());
@@ -63,13 +63,13 @@ public class AutoscalingTest {
.capacity(Capacity.from(min, max))
.build();
fixture.tester.clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.8f, 0.17, 0.12, 0, 0), 1, true, true, 100);
+ fixture.loader().applyLoad(new Load(0.8f, 0.17, 0.12), 1, true, true, 100);
var result = fixture.autoscale();
assertTrue(result.resources().isEmpty());
assertEquals(Autoscaling.Status.insufficient, result.status());
fixture.tester.clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.08f, 0.17, 0.12, 0, 0), 1, true, true, 100);
+ fixture.loader().applyLoad(new Load(0.08f, 0.17, 0.12), 1, true, true, 100);
fixture.tester().assertResources("Scaling down",
8, 1, 16, 32, 200,
fixture.autoscale());
@@ -128,8 +128,8 @@ public class AutoscalingTest {
@Test
public void test_autoscaling_up_is_fast() {
var fixture = DynamicProvisioningTester.fixture().awsProdSetup(true).build();
- fixture.loader().applyLoad(new Load(0.1, 0.1, 0.1, 0, 0), 3);
- fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0, 0, 0), 1);
+ fixture.loader().applyLoad(new Load(0.1, 0.1, 0.1), 3);
+ fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 1);
fixture.tester().assertResources("Scaling up since resource usage is too high",
8, 1, 5.3, 17.0, 75.1,
fixture.autoscale());
@@ -148,7 +148,7 @@ public class AutoscalingTest {
.build();
fixture.tester().setScalingDuration(fixture.applicationId(), fixture.clusterSpec.id(), Duration.ofMinutes(5));
- fixture.loader().applyLoad(new Load(0.01, 0.38, 0, 0, 0), 5);
+ fixture.loader().applyLoad(new Load(0.01, 0.38, 0), 5);
fixture.tester().assertResources("Scaling down",
2, 1, 4, 8, 50,
fixture.autoscale());
@@ -190,7 +190,7 @@ public class AutoscalingTest {
public void test_only_autoscaling_up_quickly() {
var fixture = DynamicProvisioningTester.fixture().awsProdSetup(true).build();
fixture.setScalingDuration(Duration.ofHours(12)); // Fixture sets last completion to be 1 day into the past
- fixture.loader().applyLoad(new Load(1.0, 0.1, 1.0, 0, 0), 10);
+ fixture.loader().applyLoad(new Load(1.0, 0.1, 1.0), 10);
fixture.tester().assertResources("Scaling up (only) since resource usage is too high",
5, 1, 11.7, 14.9, 131.5,
fixture.autoscale());
@@ -202,7 +202,7 @@ public class AutoscalingTest {
var fixture = DynamicProvisioningTester.fixture().awsProdSetup(true).build();
fixture.setScalingDuration(Duration.ofHours(12)); // Fixture sets last completion to be 1 day into the past
fixture.tester.clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(1.0, 0.1, 1.0, 0, 0), 10);
+ fixture.loader().applyLoad(new Load(1.0, 0.1, 1.0), 10);
fixture.tester().assertResources("Scaling cpu and disk up and memory down",
5, 1, 11.7, 4.0, 131.5,
fixture.autoscale());
@@ -213,7 +213,7 @@ public class AutoscalingTest {
var fixture = DynamicProvisioningTester.fixture().awsProdSetup(false).build();
fixture.setScalingDuration(Duration.ofHours(6));
fixture.tester.clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(1.0, 0.1, 1.0, 0, 0), 10);
+ fixture.loader().applyLoad(new Load(1.0, 0.1, 1.0), 10);
fixture.tester().assertResources("Scaling cpu and disk up, memory follows",
16, 1, 4, 8.0, 28.3,
fixture.autoscale());
@@ -264,7 +264,7 @@ public class AutoscalingTest {
.clusterType(ClusterSpec.Type.container)
.awsProdSetup(false)
.build();
- var duration = fixture.loader().addMeasurements(new Load(0.04, 0.39, 0.01, 0, 0), 20);
+ var duration = fixture.loader().addMeasurements(new Load(0.04, 0.39, 0.01), 20);
fixture.tester().clock().advance(duration.negated());
fixture.loader().zeroTraffic(20, 1);
fixture.tester().assertResources("Scaled down",
@@ -358,7 +358,7 @@ public class AutoscalingTest {
fixture.setScalingDuration(Duration.ofHours(6));
fixture.tester().clock().advance(Duration.ofDays(1));
- fixture.loader().applyLoad(new Load(0.25, 0.95, 0.95, 0, 0), 120);
+ fixture.loader().applyLoad(new Load(0.25, 0.95, 0.95), 120);
fixture.tester().assertResources("Scaling up to limit since resource usage is too high",
6, 1, 2.4, 78.0, 79.0,
fixture.autoscale());
@@ -372,7 +372,7 @@ public class AutoscalingTest {
// deploy
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.05f, 0.05f, 0.05f, 0, 0), 120);
+ fixture.loader().applyLoad(new Load(0.05f, 0.05f, 0.05f), 120);
fixture.tester().assertResources("Scaling down to limit since resource usage is low",
4, 1, 1.8, 7.4, 23.4,
fixture.autoscale());
@@ -395,7 +395,7 @@ public class AutoscalingTest {
2, 1, defaultResources,
fixture.nodes().toResources());
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.25, 0.95, 0.95, 0, 0), 120);
+ fixture.loader().applyLoad(new Load(0.25, 0.95, 0.95), 120);
fixture.tester().assertResources("Scaling up",
5, 1,
defaultResources.vcpu(), defaultResources.memoryGb(), defaultResources.diskGb(),
@@ -461,7 +461,7 @@ public class AutoscalingTest {
.build();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.01, 0.01, 0.01, 0, 0), 120);
+ fixture.loader().applyLoad(new Load(0.01, 0.01, 0.01), 120);
Autoscaling suggestion = fixture.suggest();
fixture.tester().assertResources("Choosing the remote disk flavor as it has less disk",
2, 1, 3.0, 100.0, 10.0,
@@ -498,7 +498,7 @@ public class AutoscalingTest {
public void not_using_out_of_service_measurements() {
var fixture = DynamicProvisioningTester.fixture().awsProdSetup(true).build();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.9, 0.6, 0.7, 0, 0), 1, false, true, 120);
+ fixture.loader().applyLoad(new Load(0.9, 0.6, 0.7), 1, false, true, 120);
assertTrue("Not scaling up since nodes were measured while cluster was out of service",
fixture.autoscale().resources().isEmpty());
}
@@ -507,7 +507,7 @@ public class AutoscalingTest {
public void not_using_unstable_measurements() {
var fixture = DynamicProvisioningTester.fixture().awsProdSetup(true).build();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.9, 0.6, 0.7, 0, 0), 1, true, false, 120);
+ fixture.loader().applyLoad(new Load(0.9, 0.6, 0.7), 1, true, false, 120);
assertTrue("Not scaling up since nodes were measured while cluster was unstable",
fixture.autoscale().resources().isEmpty());
}
@@ -536,7 +536,7 @@ public class AutoscalingTest {
.build();
fixture.setScalingDuration(Duration.ofHours(6));
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.5, 0.8, 0.1, 0, 0), 120);
+ fixture.loader().applyLoad(new Load(0.5, 0.8, 0.1), 120);
fixture.tester().assertResources("Suggesting resources where disk is 3x memory (this is a content cluster)",
11, 1, 13.0, 60.0, 179.9,
fixture.tester().suggest(fixture.applicationId, fixture.clusterSpec.id(), min, min));
@@ -557,7 +557,7 @@ public class AutoscalingTest {
.build();
fixture.setScalingDuration(Duration.ofHours(6));
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.5, 0.8, 0.1, 0, 0), 120);
+ fixture.loader().applyLoad(new Load(0.5, 0.8, 0.1), 120);
fixture.tester().assertResources("Suggesting resources where disk is 3x memory (this is a content cluster)",
13, 1, 36.0, 72.0, 900.0,
fixture.tester().suggest(fixture.applicationId, fixture.clusterSpec.id(), min, min));
@@ -668,7 +668,7 @@ public class AutoscalingTest {
.capacity(Capacity.from(min, max))
.build();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.16, 0.02, 0.5, 0, 0), 120);
+ fixture.loader().applyLoad(new Load(0.16, 0.02, 0.5), 120);
fixture.tester().assertResources("Scaling down memory",
6, 1, 2.1, 4.0, 96.2,
fixture.autoscale());
@@ -826,7 +826,7 @@ public class AutoscalingTest {
.zone(new Zone(Environment.dev, RegionName.from("us-east")))
.build();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0, 0, 0), 200);
+ fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 200);
assertTrue("Not attempting to scale up because policies dictate we'll only get one node",
fixture.autoscale().resources().isEmpty());
}
@@ -842,7 +842,7 @@ public class AutoscalingTest {
.capacity(Capacity.from(min, max, IntRange.of(3, 5), false, true, Optional.empty(), ClusterInfo.empty()))
.build();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0, 0, 0), 200);
+ fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 200);
assertEquals("Don't autoscale: Autoscaling is disabled in single node clusters", fixture.autoscale().toString());
}
@@ -866,7 +866,7 @@ public class AutoscalingTest {
.zone(new Zone(Environment.dev, RegionName.from("us-east")))
.build();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0, 0, 0), 200);
+ fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 200);
fixture.tester().assertResources("We scale even in dev because resources are 'required'",
3, 1, 1.0, 13.4, 62.5,
fixture.autoscale());
@@ -889,7 +889,7 @@ public class AutoscalingTest {
.zone(new Zone(Environment.dev, RegionName.from("us-east")))
.build();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0, 0, 0), 200);
+ fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 200);
fixture.tester().assertResources("We scale even in dev because resources are required",
3, 1, 1.5, 8, 50,
fixture.autoscale());
@@ -927,13 +927,13 @@ public class AutoscalingTest {
fixture.currentResources().advertisedResources());
fixture.tester().deploy(fixture.applicationId(), clusterSpec(false), fixture.capacity());
- fixture.loader().applyLoad(new Load(0.1, 0.1, 0.1, 0, 0), 5);
+ fixture.loader().applyLoad(new Load(0.1, 0.1, 0.1), 5);
fixture.tester().assertResources("Exclusive nodes makes no difference here",
2, 1, 4, 8, 100.0,
fixture.autoscale());
fixture.tester().deploy(fixture.applicationId(), clusterSpec(true), fixture.capacity());
- fixture.loader().applyLoad(new Load(0.1, 0.1, 0.1, 0, 0), 5);
+ fixture.loader().applyLoad(new Load(0.1, 0.1, 0.1), 5);
fixture.tester().assertResources("Reverts to the initial resources",
2, 1, 4, 8, 100,
fixture.currentResources().advertisedResources());
@@ -952,7 +952,7 @@ public class AutoscalingTest {
.build();
var initialNodes = fixture.nodes().asList();
fixture.tester().clock().advance(Duration.ofDays(2));
- fixture.loader().applyLoad(new Load(0.06, 0.52, 0.27, 0, 0), 100);
+ fixture.loader().applyLoad(new Load(0.06, 0.52, 0.27), 100);
var autoscaling = fixture.autoscale();
fixture.tester().assertResources("Scaling down",
7, 1, 2, 15.8, 384.0,
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Loader.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Loader.java
index 8dc3945223f..2e953a0f67c 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Loader.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/Loader.java
@@ -49,7 +49,7 @@ public class Loader {
var idealLoad = fixture.clusterModel().idealLoad();
NodeList nodes = fixture.nodes();
float oneExtraNodeFactor = (float)(nodes.size() - 1.0) / (nodes.size());
- Load load = new Load(value, idealLoad.memory(), idealLoad.disk(), 0, 0).multiply(oneExtraNodeFactor);
+ Load load = new Load(value, idealLoad.memory(), idealLoad.disk()).multiply(oneExtraNodeFactor);
Instant initialTime = fixture.tester().clock().instant();
for (int i = 0; i < count; i++) {
fixture.tester().clock().advance(samplingInterval);
@@ -101,7 +101,7 @@ public class Loader {
var idealLoad = fixture.clusterModel().idealLoad();
NodeList nodes = fixture.nodes();
float oneExtraNodeFactor = (float)(nodes.size() - 1.0) / (nodes.size());
- Load load = new Load(idealLoad.cpu(), value, idealLoad.disk(), 0, 0).multiply(oneExtraNodeFactor);
+ Load load = new Load(idealLoad.cpu(), value, idealLoad.disk()).multiply(oneExtraNodeFactor);
for (int i = 0; i < count; i++) {
fixture.tester().clock().advance(samplingInterval);
for (Node node : nodes) {
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsV2MetricsFetcherTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsV2MetricsFetcherTest.java
index a984306b577..4ec4ecd6d84 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsV2MetricsFetcherTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/MetricsV2MetricsFetcherTest.java
@@ -99,8 +99,6 @@ public class MetricsV2MetricsFetcherTest {
assertEquals("host-3.yahoo.com", values.get(0).getFirst());
assertEquals(0.13, values.get(0).getSecond().load().cpu(), delta);
assertEquals(0.9375, values.get(0).getSecond().load().memory(), delta);
- assertEquals(0.13, values.get(0).getSecond().load().gpu(), delta);
- assertEquals(0.9375, values.get(0).getSecond().load().gpuMemory(), delta);
assertFalse("Unstable because buckets are being merged", values.get(0).getSecond().stable());
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/NodeMetricsDbTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/NodeMetricsDbTest.java
index 71ed5bafc3d..e8d1368de71 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/NodeMetricsDbTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/NodeMetricsDbTest.java
@@ -40,7 +40,7 @@ public class NodeMetricsDbTest {
Collection<Pair<String, NodeMetricSnapshot>> values = new ArrayList<>();
for (int i = 0; i < 40; i++) {
values.add(new Pair<>(node0, new NodeMetricSnapshot(clock.instant(),
- new Load(0.9, 0.6, 0.6, 0, 0),
+ new Load(0.9, 0.6, 0.6),
0,
true,
false,
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDbTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDbTest.java
index 96588250674..d52ec12d486 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDbTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/QuestMetricsDbTest.java
@@ -57,8 +57,6 @@ public class QuestMetricsDbTest {
assertEquals(0.1, snapshot.load().cpu(), delta);
assertEquals(0.2, snapshot.load().memory(), delta);
assertEquals(0.4, snapshot.load().disk(), delta);
- assertEquals(0.5, snapshot.load().gpu(), delta);
- assertEquals(0.6, snapshot.load().gpuMemory(), delta);
assertEquals(1, snapshot.generation(), delta);
assertEquals(30, snapshot.queryRate(), delta);
@@ -232,7 +230,7 @@ public class QuestMetricsDbTest {
for (int i = 1; i <= countPerHost; i++) {
for (String host : hosts)
timeseries.add(new Pair<>(host, new NodeMetricSnapshot(clock.instant(),
- new Load(i * 0.1, i * 0.2, i * 0.4, i * 0.5, i * 0.6),
+ new Load(i * 0.1, i * 0.2, i * 0.4),
i % 100,
true,
true,
@@ -246,7 +244,7 @@ public class QuestMetricsDbTest {
Collection<Pair<String, NodeMetricSnapshot>> timeseries = new ArrayList<>();
for (int i = 1; i <= countPerHost; i++) {
for (String host : hosts)
- timeseries.add(new Pair<>(host, new NodeMetricSnapshot(at, new Load(i * 0.1, i * 0.2, i * 0.4, i * 0.5, i * 0.6),
+ timeseries.add(new Pair<>(host, new NodeMetricSnapshot(at, new Load(i * 0.1, i * 0.2, i * 0.4),
i % 100,
true,
false,
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTester.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTester.java
index 4f9b2de4da0..e4a712d3898 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTester.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/AutoscalingMaintainerTester.java
@@ -77,7 +77,7 @@ public class AutoscalingMaintainerTester {
for (Node node : nodes)
nodeRepository().metricsDb().addNodeMetrics(List.of(new Pair<>(node.hostname(),
new NodeMetricSnapshot(clock().instant(),
- new Load(cpu, mem, disk, 0, 0),
+ new Load(cpu, mem, disk),
generation,
true,
true,
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java
index 152f743900b..d4771594569 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/MetricsReporterTest.java
@@ -270,7 +270,7 @@ public class MetricsReporterTest {
Optional.empty(),
tester.clock().instant(),
Load.zero(),
- new Load(0.1, 0.2, 0.3, 0, 0),
+ new Load(0.1, 0.2, 0.3),
Autoscaling.Metrics.zero()));
tester.nodeRepository().applications().put(application.with(cluster), tester.nodeRepository().applications().lock(applicationId));
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 f8be27300fe..0a78874405d 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
@@ -139,7 +139,7 @@ public class ScalingSuggestionsMaintainerTest {
for (Node node : nodes)
nodeRepository.metricsDb().addNodeMetrics(List.of(new Pair<>(node.hostname(),
new NodeMetricSnapshot(nodeRepository.clock().instant(),
- new Load(cpu, memory, disk, 0, 0),
+ new Load(cpu, memory, disk),
generation,
true,
true,
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java
index 918a9043c93..7a00c84faf6 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java
@@ -57,8 +57,8 @@ public class ApplicationSerializerTest {
Optional.of(new ClusterResources(20, 10,
new NodeResources(0.5, 4, 14, 16))),
Instant.ofEpochMilli(1234L),
- new Load(0.1, 0.2, 0.3, 0.4, 0.5),
- new Load(0.4, 0.5, 0.6, 0.7, 0.8),
+ new Load(0.1, 0.2, 0.3),
+ new Load(0.4, 0.5, 0.6),
new Autoscaling.Metrics(0.7, 0.8, 0.9)),
new Autoscaling(Autoscaling.Status.insufficient,
"Autoscaling status",
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 7b2cf1dc8e4..28bde7bd966 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
@@ -63,16 +63,12 @@
"peak" : {
"cpu" : 0.0,
"memory" : 0.0,
- "disk" : 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk" : 0.0
},
"ideal" : {
"cpu" : 0.0,
"memory" : 0.0,
- "disk" : 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk" : 0.0
},
"metrics" : {
"queryRate" : 0.0,
@@ -100,16 +96,12 @@
"peak" : {
"cpu" : 0.1,
"memory" : 0.2,
- "disk" : 0.3,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk" : 0.3
},
"ideal" : {
"cpu" : 0.4,
"memory" : 0.5,
- "disk" : 0.6,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk" : 0.6
},
"metrics" : {
"queryRate" : 0.7,
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json
index 10173089f75..05a62ff944d 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application2.json
@@ -50,16 +50,12 @@
"peak" : {
"cpu" : 0.0,
"memory" : 0.0,
- "disk" : 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk" : 0.0
},
"ideal" : {
"cpu" : 0.0,
"memory" : 0.0,
- "disk" : 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk" : 0.0
},
"metrics" : {
"queryRate" : 0.0,
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/stats.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/stats.json
index b031e0deba0..788eb6d359f 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/stats.json
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/stats.json
@@ -4,16 +4,12 @@
"load": {
"cpu": 0.0,
"memory": 0.0,
- "disk": 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk": 0.0
},
"activeLoad": {
"cpu": 0.0,
"memory": 0.0,
- "disk": 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk": 0.0
},
"applications": [
{
@@ -21,9 +17,7 @@
"load": {
"cpu": 0.0,
"memory": 0.0,
- "disk": 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk": 0.0
},
"cost": 0.0,
"unutilizedCost": 0.0
@@ -33,9 +27,7 @@
"load": {
"cpu": 0.0,
"memory": 0.0,
- "disk": 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk": 0.0
},
"cost": 0.0,
"unutilizedCost": 0.0
@@ -45,9 +37,7 @@
"load": {
"cpu": 0.0,
"memory": 0.0,
- "disk": 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk": 0.0
},
"cost": 0.0,
"unutilizedCost": 0.0
@@ -57,9 +47,7 @@
"load": {
"cpu": 0.0,
"memory": 0.0,
- "disk": 0.0,
- "gpu": 0.0,
- "gpuMemory": 0.0
+ "disk": 0.0
},
"cost": 0.0,
"unutilizedCost": 0.0