You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/23 18:26:13 UTC

[GitHub] [flink-kubernetes-operator] gyfora commented on a diff in pull request #493: [FLINK-30464] Exclude metrics during stabilization and ensure a full metric window

gyfora commented on code in PR #493:
URL: https://github.com/apache/flink-kubernetes-operator/pull/493#discussion_r1056547504


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/ScalingMetricCollector.java:
##########
@@ -122,7 +130,15 @@ public CollectedMetrics getMetricsHistory(
 
         // Add scaling metrics to history if they were computed successfully
         scalingMetricHistory.put(clock.instant(), scalingMetrics);
-        scalingInformation.updateMetricHistory(currentJobStartTs, scalingMetricHistory);
+        scalingInformation.updateMetricHistory(currentJobUpdateTs, scalingMetricHistory);
+
+        if (currentJobUpdateTs
+                .plus(stabilizationDuration)
+                .isAfter(clock.instant().minus(metricsWindowDuration))) {

Review Comment:
   I would prefer to have a config setting for a minimum metrics window (that should default to the metrics window), so that we can have quick scaling decisions after stabilization.
   
   Ideally users would use longer metrics windows (15-30 minutes) and a minimum window of something much shorter like 5 mins.
   
   This is very beneficial also for testing new changes to the algorithm, or when tuning the paramaters.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org