kfaraz commented on code in PR #19622:
URL: https://github.com/apache/druid/pull/19622#discussion_r3474052394


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/WeightedCostFunction.java:
##########
@@ -156,6 +157,19 @@ public CostResult computeCost(
     return new CostResult(cost, lagCost, weightedIdleCost);
   }
 
+  /**
+   * Derives the current idle ratio from measured utilization ({@code 
avgProcessingRate / maxObservedRate}).
+   */
+  static double estimateIdleFromUtilization(CostMetrics metrics)
+  {
+    final Double maxObservedRate = metrics.getMaxObservedRate();
+    if (maxObservedRate == null || maxObservedRate <= 0) {
+      return IDEAL_IDLE_RATIO;

Review Comment:
   Thanks! We can tune it further based on how it performs in real clusters.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to