diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-03-10 12:31:18 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-03-10 12:31:18 +0100 |
commit | 5a39d9a02841c2dfc86acfe5ba86b2042cad697d (patch) | |
tree | 3ad606ad2d6afc966bb5248ff2f50c3292a37fbf /node-repository | |
parent | d8aba5c8b45ec3871eb808b8b69cbe76b4f409b8 (diff) |
Improve status messages
Diffstat (limited to 'node-repository')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java index 0fc86cf4c5f..5d5c6fdac5a 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java @@ -64,21 +64,20 @@ public class Autoscaler { Duration scalingWindow = cluster.scalingDuration(clusterNodes.clusterSpec()); if (scaledIn(scalingWindow, cluster)) - return Advice.dontScale("Won't autoscale now: Less than " + scalingWindow + " since last rescaling"); + return Advice.dontScale("Won't autoscale now: Less than " + scalingWindow + " since last resource change"); var clusterNodesTimeseries = new ClusterNodesTimeseries(scalingWindow, cluster, clusterNodes, metricsDb); var currentAllocation = new AllocatableClusterResources(clusterNodes.asList(), nodeRepository, cluster.exclusive()); int measurementsPerNode = clusterNodesTimeseries.measurementsPerNode(); if (measurementsPerNode < minimumMeasurementsPerNode(scalingWindow)) - return Advice.none("Collecting more data before making new scaling decisions: " + - "Have " + measurementsPerNode + " measurements per node but require " + - minimumMeasurementsPerNode(scalingWindow)); + return Advice.none("Collecting more data before making new scaling decisions: Need to measure for " + + scalingWindow + " since the last resource change completed"); int nodesMeasured = clusterNodesTimeseries.nodesMeasured(); if (nodesMeasured != clusterNodes.size()) return Advice.none("Collecting more data before making new scaling decisions: " + - "Have measurements from " + nodesMeasured + " but require from " + clusterNodes.size()); + "Have measurements from " + nodesMeasured + " nodes, but require from " + clusterNodes.size()); var clusterTimeseries = metricsDb.getClusterTimeseries(application.id(), cluster.id()); @@ -87,15 +86,16 @@ public class Autoscaler { Optional<AllocatableClusterResources> bestAllocation = allocationOptimizer.findBestAllocation(target, currentAllocation, limits); if (bestAllocation.isEmpty()) - return Advice.dontScale("No allocation changes are possible within configured limits"); + return Advice.dontScale("No allocation improvements are possible within configured limits"); if (similar(bestAllocation.get().realResources(), currentAllocation.realResources())) return Advice.dontScale("Cluster is ideally scaled within configured limits"); if (isDownscaling(bestAllocation.get(), currentAllocation) && scaledIn(scalingWindow.multipliedBy(3), cluster)) - return Advice.dontScale("Waiting " + scalingWindow.multipliedBy(3) + " since last rescaling before reducing resources"); + return Advice.dontScale("Waiting " + scalingWindow.multipliedBy(3) + + " since the last change before reducing resources"); - return Advice.scaleTo(bestAllocation.get().advertisedResources(), "Limits " + limits + " target " + target); + return Advice.scaleTo(bestAllocation.get().advertisedResources()); } /** Returns true if both total real resources and total cost are similar */ @@ -180,8 +180,8 @@ public class Autoscaler { private static Advice none(String reason) { return new Advice(Optional.empty(), false, reason); } private static Advice dontScale(String reason) { return new Advice(Optional.empty(), true, reason); } - private static Advice scaleTo(ClusterResources target, String message) { - return new Advice(Optional.of(target), true, "Scaling to " + target + " due to load changes: " + message); + private static Advice scaleTo(ClusterResources target) { + return new Advice(Optional.of(target), true, "Scheduled scaling to " + target + " due to load changes"); } @Override |