Skip to content

Commit 3dfe309

Browse files
committed
[FLINK-32002] Autoscaler default config improvements
1 parent e399c9b commit 3dfe309

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

docs/layouts/shortcodes/generated/auto_scaler_configuration.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@
7070
</tr>
7171
<tr>
7272
<td><h5>kubernetes.operator.job.autoscaler.scale-up.max-factor</h5></td>
73-
<td style="word-wrap: break-word;">2.147483647E9</td>
73+
<td style="word-wrap: break-word;">100000.0</td>
7474
<td>Double</td>
7575
<td>Max scale up factor. 2.0 means job can only be scaled up with 200% of the current parallelism.</td>
7676
</tr>
7777
<tr>
7878
<td><h5>kubernetes.operator.job.autoscaler.scaling.effectiveness.detection.enabled</h5></td>
79-
<td style="word-wrap: break-word;">true</td>
79+
<td style="word-wrap: break-word;">false</td>
8080
<td>Boolean</td>
8181
<td>Whether to enable detection of ineffective scaling operations and allowing the autoscaler to block further scale ups.</td>
8282
</tr>

flink-kubernetes-operator-autoscaler/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/config/AutoScalerOptions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) {
102102
public static final ConfigOption<Double> MAX_SCALE_UP_FACTOR =
103103
autoScalerConfig("scale-up.max-factor")
104104
.doubleType()
105-
.defaultValue((double) Integer.MAX_VALUE)
105+
.defaultValue(100000.)
106106
.withDescription(
107107
"Max scale up factor. 2.0 means job can only be scaled up with 200% of the current parallelism.");
108108

@@ -130,7 +130,7 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) {
130130
public static final ConfigOption<Boolean> SCALING_EFFECTIVENESS_DETECTION_ENABLED =
131131
autoScalerConfig("scaling.effectiveness.detection.enabled")
132132
.booleanType()
133-
.defaultValue(true)
133+
.defaultValue(false)
134134
.withDescription(
135135
"Whether to enable detection of ineffective scaling operations and allowing the autoscaler to block further scale ups.");
136136

flink-kubernetes-operator-autoscaler/src/test/java/org/apache/flink/kubernetes/operator/autoscaler/JobVertexScalerTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ public void testScaleDownAfterScaleUpDetection() {
245245
@Test
246246
public void testIneffectiveScalingDetection() {
247247
var op = new JobVertexID();
248+
conf.set(AutoScalerOptions.SCALING_EFFECTIVENESS_DETECTION_ENABLED, true);
248249
conf.set(AutoScalerOptions.TARGET_UTILIZATION, 1.);
249250
conf.set(AutoScalerOptions.SCALE_UP_GRACE_PERIOD, Duration.ZERO);
250251

@@ -312,6 +313,7 @@ public void testIneffectiveScalingDetection() {
312313
@Test
313314
public void testSendingIneffectiveScalingEvents() {
314315
var jobVertexID = new JobVertexID();
316+
conf.set(AutoScalerOptions.SCALING_EFFECTIVENESS_DETECTION_ENABLED, true);
315317
conf.set(AutoScalerOptions.TARGET_UTILIZATION, 1.0);
316318
conf.set(AutoScalerOptions.SCALE_UP_GRACE_PERIOD, Duration.ZERO);
317319

0 commit comments

Comments
 (0)