dmvk commented on a change in pull request #18757:
URL: https://github.com/apache/flink/pull/18757#discussion_r806910231



##########
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`
+Adaptive Batch Scheduler will only decide parallelism for job vertices whose 
parallelism is not specified by users (parallelism is `-1`). So if you want the 
parallelism of vertices can be decided automatically, you should configure as 
follows:
+- Set `paralleims.default` to `-1`

Review comment:
       typo

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

Review comment:
       What's the target audience? Does regular Flink user supposed to know 
what the job vertex is? Overall this page feels bit too low level 🤔.
   
   On the other hand I don't think that other pages withing this section are 
all much better in this regard 🤔 
   
   

##########
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`
+Adaptive Batch Scheduler will only decide parallelism for job vertices whose 
parallelism is not specified by users (parallelism is `-1`). So if you want the 
parallelism of vertices can be decided automatically, you should configure as 
follows:
+- Set `paralleims.default` to `-1`
+- Set `table.exec.resource.default-parallelism` to -1 in SQL jobs.
+- Don't call `setParallelism()` for operators in datastream jobs.
+
+### Performance tuning
+
+1. It's recommended to use `Sort Shuffle` and set 
[`taskmanager.network.memory.buffers-per-channel`]({{< ref 
"docs/deployment/config" >}}#taskmanager-network-memory-buffers-per-channel) to 
`0`. This can decouple the network memory consumption from parallelism, so for 
large scale jobs, the possibility of "Insufficient number of network buffers" 
error can be decreased.
+2. It's not recommended to configure an excessive value for 
[`jobmanager.scheduler.adaptive-batch.max-parallelism`]({{< ref 
"docs/deployment/config" 
>}}#jobmanager-scheduler-adaptive-batch-max-parallelism), otherwise it will 
affect the performance. Because this option can affect the number of 
subpartitions produced by upstream tasks, excessive number of subpartitions may 
degrade the performance of hash shuffle and the performance of network 
transmission due to small packets.
+                                                                               
                                                                                
                                                                                
                                       
+### Limitations
+
+- **ALL-EDGES-BLOCKING batch jobs only**: The first version of Adaptive Batch 
Scheduler only supports ALL-EDGES-BLOCKING batch jobs only.

Review comment:
       What does this mean? (from the user perspective)

##########
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:

Review comment:
       typo `AdpaptiveBatch`

##########
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:
       Why don't we set the defaults automatically when the ABS is enabled? Are 
there cases where we can't assume that this is what user wants?

##########
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`
+Adaptive Batch Scheduler will only decide parallelism for job vertices whose 
parallelism is not specified by users (parallelism is `-1`). So if you want the 
parallelism of vertices can be decided automatically, you should configure as 
follows:
+- Set `paralleims.default` to `-1`
+- Set `table.exec.resource.default-parallelism` to -1 in SQL jobs.
+- Don't call `setParallelism()` for operators in datastream jobs.
+
+### Performance tuning
+
+1. It's recommended to use `Sort Shuffle` and set 
[`taskmanager.network.memory.buffers-per-channel`]({{< ref 
"docs/deployment/config" >}}#taskmanager-network-memory-buffers-per-channel) to 
`0`. This can decouple the network memory consumption from parallelism, so for 
large scale jobs, the possibility of "Insufficient number of network buffers" 
error can be decreased.

Review comment:
       Would it make sense to link this with a blog post?

##########
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`
+Adaptive Batch Scheduler will only decide parallelism for job vertices whose 
parallelism is not specified by users (parallelism is `-1`). So if you want the 
parallelism of vertices can be decided automatically, you should configure as 
follows:
+- Set `paralleims.default` to `-1`
+- Set `table.exec.resource.default-parallelism` to -1 in SQL jobs.
+- Don't call `setParallelism()` for operators in datastream jobs.
+
+### Performance tuning
+
+1. It's recommended to use `Sort Shuffle` and set 
[`taskmanager.network.memory.buffers-per-channel`]({{< ref 
"docs/deployment/config" >}}#taskmanager-network-memory-buffers-per-channel) to 
`0`. This can decouple the network memory consumption from parallelism, so for 
large scale jobs, the possibility of "Insufficient number of network buffers" 
error can be decreased.
+2. It's not recommended to configure an excessive value for 
[`jobmanager.scheduler.adaptive-batch.max-parallelism`]({{< ref 
"docs/deployment/config" 
>}}#jobmanager-scheduler-adaptive-batch-max-parallelism), otherwise it will 
affect the performance. Because this option can affect the number of 
subpartitions produced by upstream tasks, excessive number of subpartitions may 
degrade the performance of hash shuffle and the performance of network 
transmission due to small packets.

Review comment:
       What is an excessive value in this context?




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