diff options
author | Valerij Fredriksen <freva@users.noreply.github.com> | 2022-11-06 17:35:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-06 17:35:26 +0100 |
commit | b40c389a135778c5a2817732f4839bfaa7fe1776 (patch) | |
tree | 46f6c020cf3730ba2efbb6ce8271669597f41e0c /node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java | |
parent | 3b6df7e9ae9950744c6b8401026388f483f9c3a2 (diff) | |
parent | ab9e6d39a300a395461d2c970278c309d667d4d3 (diff) |
Merge pull request #24769 from vespa-engine/bratseth/no-trafficv8.79.36
Handle no traffic
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModel.java | 5 |
1 files changed, 2 insertions, 3 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 3025124b174..22a6a5812b2 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 @@ -225,15 +225,14 @@ public class ClusterModel { growthRateHeadroom = Math.min(growthRateHeadroom, 1 / queryFractionOfMax() + 0.1); // How much headroom is needed to handle sudden arrival of additional traffic due to another zone going down? - double maxTrafficShiftHeadroom = 10.0; // Cap to avoid extreme sizes from a current very small share double trafficShiftHeadroom; if (application.status().maxReadShare() == 0) // No traffic fraction data trafficShiftHeadroom = 2.0; // assume we currently get half of the global share of traffic else if (application.status().currentReadShare() == 0) - trafficShiftHeadroom = maxTrafficShiftHeadroom; + trafficShiftHeadroom = 1/application.status().maxReadShare(); else trafficShiftHeadroom = application.status().maxReadShare() / application.status().currentReadShare(); - trafficShiftHeadroom = Math.min(trafficShiftHeadroom, maxTrafficShiftHeadroom); + trafficShiftHeadroom = Math.min(trafficShiftHeadroom, 1/application.status().maxReadShare()); // Assumptions: 1) Write load is not organic so we should not grow to handle more. // (TODO: But allow applications to set their target write rate and size for that) |