aboutsummaryrefslogtreecommitdiffstats
path: root/node-repository/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'node-repository/src/main/java')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java39
1 files changed, 18 insertions, 21 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 b6b31d9c34f..dac9a0f3518 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
@@ -121,12 +121,29 @@ public class ClusterModel {
public Application application() { return application; }
public ClusterSpec clusterSpec() { return clusterSpec; }
- public Cluster cluster() { return cluster; }
+ private ClusterNodesTimeseries nodeTimeseries() { return nodeTimeseries; }
+ private ClusterTimeseries clusterTimeseries() { return clusterTimeseries; }
+
+ /** Returns the instant this model was created. */
+ public Instant at() { return at;}
public boolean isEmpty() {
return nodeTimeseries().isEmpty();
}
+ /** Returns the predicted duration of a rescaling of this cluster */
+ public Duration scalingDuration() { return scalingDuration; }
+
+ /** Returns the average of the peak load measurement in each dimension, from each node. */
+ public Load peakLoad() {
+ return nodeTimeseries().peakLoad();
+ }
+
+ /** Returns the relative load adjustment accounting for redundancy in this. */
+ public Load redundancyAdjustment() {
+ return loadWith(nodeCount(), groupCount());
+ }
+
/** Returns the relative load adjustment that should be made to this cluster given available measurements. */
public Load loadAdjustment() {
if (nodeTimeseries().measurementsPerNode() < 0.5) return Load.one(); // Don't change based on very little data
@@ -162,19 +179,6 @@ public class ClusterModel {
return Duration.ofMinutes(5);
}
- /** Returns the predicted duration of a rescaling of this cluster */
- public Duration scalingDuration() { return scalingDuration; }
-
- /** Returns the average of the peak load measurement in each dimension, from each node. */
- public Load peakLoad() {
- return nodeTimeseries().peakLoad();
- }
-
- /** Returns the relative load adjustment accounting for redundancy in this. */
- public Load redundancyAdjustment() {
- return loadWith(nodeCount(), groupCount());
- }
-
/**
* Returns the relative load adjustment accounting for redundancy given these nodes+groups
* relative to node nodes+groups in this.
@@ -232,9 +236,6 @@ public class ClusterModel {
cpu.costPerQuery().orElse(0));
}
- /** Returns the instant this model was created. */
- public Instant at() { return at;}
-
private Load adjustQueryDependentIdealLoadByBcpGroupInfo(Load ideal) {
double currentClusterTotalVcpuPerGroup = nodes.not().retired().first().get().resources().vcpu() * groupSize();
@@ -256,10 +257,6 @@ public class ClusterModel {
return lastCompletion.get().isAfter(clock.instant().minus(period));
}
- private ClusterNodesTimeseries nodeTimeseries() { return nodeTimeseries; }
-
- private ClusterTimeseries clusterTimeseries() { return clusterTimeseries; }
-
/**
* Returns the predicted max query growth rate per minute as a fraction of the average traffic
* in the scaling window.