I found that when flink application start,the number of slots request is SUM(Maximum parallelism of each task), but when the application is running, the number of slots request is JobManager(1) + Maximum parallelism of all task.
For example if there are three tasks, the parallelism of task1(source/map) is 2, the parallelism of task2(keyby/window/apply) is 2, the parallelism of task3(sink) is 1.
The number of slots request is 5 when application is starting, the number of slots request is 3 when application is running.
That means the number of slots required when startup bigger than the Number of slots required for application running. This design, the hardware resources will be wasted.
My question is that:
- why flink design this mechanism for slots?
- Does the new flink version improve this mechanism?
- How could we save hardware for the current version.