diff options
3 files changed, 7 insertions, 8 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/AllocationOptimizer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/AllocationOptimizer.java index 2befd69f893..9a8b01f33af 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/AllocationOptimizer.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/AllocationOptimizer.java @@ -48,11 +48,11 @@ public class AllocationOptimizer { for (int nodes = limits.min().nodes(); nodes <= limits.max().nodes(); nodes++) { if (nodes % groups != 0) continue; - ClusterResources next = new ClusterResources(nodes, - groups, - nodeResourcesWith(nodes, groups, - limits, targetLoad, current, clusterModel)); - var allocatableResources = AllocatableClusterResources.from(next, current.clusterSpec(), limits, + var resources = new ClusterResources(nodes, + groups, + nodeResourcesWith(nodes, groups, + limits, targetLoad, current, clusterModel)); + var allocatableResources = AllocatableClusterResources.from(resources, current.clusterSpec(), limits, hosts, nodeRepository); if (allocatableResources.isEmpty()) continue; if (bestAllocation.isEmpty() || allocatableResources.get().preferableTo(bestAllocation.get())) @@ -76,7 +76,6 @@ public class AllocationOptimizer { .multiply(clusterModel.loadWith(nodes, groups)) // redundancy aware adjustment with these counts .divide(clusterModel.redundancyAdjustment()) // correct for double redundancy adjustment .scaled(current.realResources().nodeResources()); - // Combine the scaled resource values computed here // with the currently configured non-scaled values, given in the limits, if any var nonScaled = limits.isEmpty() || limits.min().nodeResources().isUnspecified() 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 689b5a9a950..36bc54a86b3 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 @@ -76,7 +76,8 @@ public class Autoscaler { if (! worthRescaling(currentAllocation.realResources(), bestAllocation.get().realResources())) { if (bestAllocation.get().fulfilment() < 1) - return Advice.dontScale(Status.insufficient, "Configured limits prevents better scaling of this cluster"); + return Advice.dontScale(Status.insufficient, "Configured limits prevents better scaling of this cluster" + + " (" + bestAllocation.get() + " real " + bestAllocation.get().realResources() + ")"); else return Advice.dontScale(Status.ideal, "Cluster is ideally scaled"); } 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 5f372a01b1c..76f993b67fd 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 @@ -124,7 +124,6 @@ public class AutoscalingTest { fixture.tester().clock().advance(duration.negated()); fixture.loader().zeroTraffic(20); - //System.out.println("Average " + fixture.clusterModel().averageLoad()); //System.out.println("Ideal " + fixture.clusterModel().idealLoad()); //System.out.println("Adjustment to " + fixture.clusterModel().loadAdjustment()); fixture.tester().assertResources("Scaled down", |