diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-11-01 23:51:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 23:51:48 +0100 |
commit | fe4ec91963557a8c02de81b0acf3cf55282d00ac (patch) | |
tree | fb54e053d0a4994d47022d7d29e33641b46b3f98 | |
parent | 4984373de8e6b5b4b6d62d13e7efbaf0f025b2c5 (diff) | |
parent | adf811944fa8cef4349d10daf0bbca602ffd8497 (diff) |
Merge pull request #24701 from vespa-engine/bratseth/more-detail-on-no-fulfilment
Add more detail on insufficient fulfilment
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", |