wanglijie95 commented on a change in pull request #18757: URL: https://github.com/apache/flink/pull/18757#discussion_r807748121
########## File path: docs/content/docs/deployment/adaptive_batch_scheduler.md ########## @@ -0,0 +1,63 @@ +--- +title: Adaptive Batch Scheduler +weight: 5 +type: docs + +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## Adaptive Batch Scheduler + +The Adaptive Batch Scheduler can automatically decide parallelisms of job vertices for batch jobs. If a job vertex is not set with a parallelism, the scheduler will decide parallelism for the job vertex according to the size of its consumed datasets. This can bring many benefits: +- Batch job users can be relieved from parallelism tuning +- Automatically tuned parallelisms can be vertex level and can better fit consumed datasets which have a varying volume size every day +- Vertices from SQL batch jobs can be assigned with different parallelisms which are automatically tuned + +### Usage + +To automatically decide parallelisms for job vertices through Adaptive Batch Scheduler, you need to: +- Configure to use Adaptive Batch Scheduler. +- Set the parallelism of job vertices to `-1`. + +#### Configure to use Adaptive Batch Scheduler +To use Adaptive Batch Scheduler, you need to set the [`jobmanager.scheduler`]({{< ref "docs/deployment/config" >}}#jobmanager-scheduler) to `AdpaptiveBatch`. In addition, there are several optional config options that might need adjustment when using Adaptive Batch Scheduler: +- [`jobmanager.scheduler.adaptive-batch.min-parallelism`]({{< ref "docs/deployment/config" >}}#jobmanager-scheduler-adaptive-batch-min-parallelism): The lower bound of allowed parallelism to set adaptively +- [`jobmanager.scheduler.adaptive-batch.max-parallelism`]({{< ref "docs/deployment/config" >}}#jobmanager-scheduler-adaptive-batch-max-parallelism): The upper bound of allowed parallelism to set adaptively +- [`jobmanager.scheduler.adaptive-batch.data-volume-per-task`]({{< ref "docs/deployment/config" >}}#jobmanager-scheduler-adaptive-batch-data-volume-per-task): The size of data volume to expect each task instance to process +- [`jobmanager.scheduler.adaptive-batch.source-parallelism.default`]({{< ref "docs/deployment/config" >}}#jobmanager-scheduler-adaptive-batch-source-parallelism-default): The default parallelism of source vertices + +#### Set the parallelism of job vertices to `-1` Review comment: If users explicitly configure the `parallelism.default` (with a value > 0) in `flink-conf`, but we override this value with `-1`, I think this may give the users a feeling that the configuration does not take effect. Maybe we can check the value of `parallelism.default` and then print an `ERROR` or `WARNING` log if the value > 0 ? -- 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]
