Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As described in FLINK-15959, currently ResourceManager will only start a a new worker when there's resource requirements from job. But in certain scenarios, it is necessary to maintain a certain amount of slots as soon as ResourceManager is started. And these slots should not release even if all slots are free. Here are some scenarios which can benefit from this proposal:

  1. Users actually know how many resources are needed when

...

  1. running a single job, initialize all workers when cluster starts can speed up startup process

  2. Job schedule in topology order, the next operator won't schedule until prior execution slot allocated. The TaskExecutors will start in several

...

  1. batches . In some cases, it might slow down the startup speed

  2. Flink

...

  1. supports FLINK-12122

...

  1. [Spread out tasks evenly across all available registered TaskManagers], but it will only effect if all TMs are registered.

...

  1. Starting all TMs at

...

  1. the beginning can

...

  1. solve this problem

  2. For session clusters running short lived-jobs,

...

  1. clusters should have workers all the time to reduce job's E2E

...

  1. latency


Public Interfaces

A public interface is any change to the following:

Option nameDefault Value
slotmanager.number-of-slots.min0
slotmanager.min-total-resource.cpuno default value, it can be derived from slotmanager.number-of-slots.min
slotmanager.min-total-resource.memoryno default value, it can be derived from slotmanager.number-of-slots.min

...


Each time when SlotManager need needs to reconcile the cluster resources or fulfill job resource requirements, the DefaultResourceAllocationStrategy will check if the minimum resource requirement has been fulfilled. If it is not, DefaultResourceAllocationStrategy will add PendingTaskManagers to the ResourceAllocationResult/ResourceReconcileResult and FineGrainedSlotManager will allocate new worker resources accordingly.

...

After minimum required resource options is are introduced, user users can configure both minimum and maximum required resource resources in SlotManager, which might lead to worker resource oscillation. Here is an example:

...

In this case, the minimum required worker number derived from DefaultResourceAllocationStrategy is 3 but this will exceed the max total resource limit, which is 14 slots.

To Avoid avoid this oscillation, we need to check the worker number derived from minimum and maximum resource configuration is consistent before starting the SlotManager.


Compatibility, Deprecation, and Migration Plan

...