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


##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java:
##########
@@ -222,6 +222,18 @@ private static ConfigOptions.OptionBuilder 
autoScalerConfig(String key) {
                     .withDescription(
                             "Processing rate increase threshold for detecting 
ineffective scaling threshold. 0.1 means if we do not accomplish at least 10% 
of the desired capacity increase with scaling, the action is marked 
ineffective.");
 
+    public static final ConfigOption<Double> GC_PRESSURE_THRESHOLD =
+            autoScalerConfig("memory.gc-pressure.threshold")
+                    .doubleType()
+                    .defaultValue(0.3)
+                    .withDescription("Max allowed GC pressure during scaling 
operations");
+
+    public static final ConfigOption<Double> HEAP_USAGE_THRESHOLD =
+            autoScalerConfig("memory.heap-usage.threshold")
+                    .doubleType()
+                    .defaultValue(0.9)

Review Comment:
   1. You are right but I still think the current logic is valuable because GC 
metrics will only be available in Flink 1.19. With the heap usage based logic 
we can also support older Flink versions. Also keep in mind that this is the 
average heap usage. With 90% average usage you are extremely likely to be close 
to out of heap in most cases.
   
   2. This is a very good point and happens often. I think we could definitely 
build this logic on top of the newly introduced metrics + scaling history as a 
follow up. It would probably be a very good addition. (but definitely out of 
scope for this PR)



-- 
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]

Reply via email to